Skip to contentSkip to conversation

crypto: caam/qi2 - switch to netif_napi_add_tx_weight()

PATCH In review Jakub Kicinski 3 participants 3 messages Jul 5, 2022 – Jul 15, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: caam/qi2 - switch to netif_napi_add_tx_weight()

caam has its own special NAPI weights. It's also a crypto device so presumably it can't be used for packet Rx. Switch to the (new) correct API.

---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 drivers/crypto/caam/caamalg_qi2.c | 5 +++--
 drivers/crypto/caam/qi.c          | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/crypto/caam/caamalg_qi2.c +3 -2
index 6753f0e6e55d..56bbfdfb0d9f 100644
@@ -5083,8 +5083,9 @@ static int __cold dpaa2_dpseci_setup(struct fsl_mc_device *ls_dev)
 
 		ppriv->net_dev.dev = *dev;
 		INIT_LIST_HEAD(&ppriv->net_dev.napi_list);
-		netif_napi_add(&ppriv->net_dev, &ppriv->napi, dpaa2_dpseci_poll,
-			       DPAA2_CAAM_NAPI_WEIGHT);
+		netif_napi_add_tx_weight(&ppriv->net_dev, &ppriv->napi,
+					 dpaa2_dpseci_poll,
+					 DPAA2_CAAM_NAPI_WEIGHT);
 	}
 
 	return 0;
drivers/crypto/caam/qi.c +2 -2
index 8163f5df8ebf..1c9450b29583 100644
@@ -749,8 +749,8 @@ int caam_qi_init(struct platform_device *caam_pdev)
 		net_dev->dev = *qidev;
 		INIT_LIST_HEAD(&net_dev->napi_list);
 
-		netif_napi_add(net_dev, irqtask, caam_qi_poll,
-			       CAAM_NAPI_WEIGHT);
+		netif_napi_add_tx_weight(net_dev, irqtask, caam_qi_poll,
+					 CAAM_NAPI_WEIGHT);
 
 		napi_enable(irqtask);
 	}
Signature · 1 line
2.36.1
#1 lore raw

Hi Meenakshi, Vabhav

Please help to review the below patch..

Regards
Gaurav Jain

Quoted 62 lines

-----Original Message-----
From: Jakub Kicinski <[email protected]>
Sent: Wednesday, July 6, 2022 4:29 AM
To: [email protected]
Cc: Jakub Kicinski <[email protected]>; Horia Geanta <[email protected]>; Pankaj Gupta <[email protected]>; Gaurav Jain <[email protected]>; [email protected]
Subject: [EXT] [PATCH crypto-next] crypto: caam/qi2 - switch to netif_napi_add_tx_weight()

Caution: EXT Email

caam has its own special NAPI weights. It's also a crypto device so presumably it can't be used for packet Rx. Switch to the (new) correct API.

---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 drivers/crypto/caam/caamalg_qi2.c | 5 +++--
 drivers/crypto/caam/qi.c          | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/crypto/caam/caamalg_qi2.c +3 -2
index 6753f0e6e55d..56bbfdfb0d9f 100644
@@ -5083,8 +5083,9 @@ static int __cold dpaa2_dpseci_setup(struct
 fsl_mc_device *ls_dev)
 
                ppriv->net_dev.dev = *dev;
                INIT_LIST_HEAD(&ppriv->net_dev.napi_list);
-               netif_napi_add(&ppriv->net_dev, &ppriv->napi, dpaa2_dpseci_poll,
-                              DPAA2_CAAM_NAPI_WEIGHT);
+               netif_napi_add_tx_weight(&ppriv->net_dev, &ppriv->napi,
+                                        dpaa2_dpseci_poll,
+                                        DPAA2_CAAM_NAPI_WEIGHT);
        }
 
        return 0;
drivers/crypto/caam/qi.c index renamed from drivers/crypto/caam/qi.c +0 -0

8163f5df8ebf..1c9450b29583 100644

drivers/crypto/caam/qi.c +2 -3
@@ -749,8 +749,8 @@ int caam_qi_init(struct platform_device *caam_pdev)
                net_dev->dev = *qidev;
                INIT_LIST_HEAD(&net_dev->napi_list);
 
-               netif_napi_add(net_dev, irqtask, caam_qi_poll,
-                              CAAM_NAPI_WEIGHT);
+               netif_napi_add_tx_weight(net_dev, irqtask, caam_qi_poll,
+                                        CAAM_NAPI_WEIGHT);
 
                napi_enable(irqtask);
        }
--

2.36.1

maintainer
#2 lore raw
In reply to Jakub Kicinski
Quoted 11 lines · Jakub Kicinski

caam has its own special NAPI weights. It's also a crypto device so presumably it can't be used for packet Rx. Switch to the (new) correct API.

---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

Quoted 4 lines
---
 drivers/crypto/caam/caamalg_qi2.c | 5 +++--
 drivers/crypto/caam/qi.c          | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt