diff mbox series

atl1c: use netif_tx_napi_add() for Tx NAPI

Message ID 20220715042131.1237-1-liew.s.piaw@gmail.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series atl1c: use netif_tx_napi_add() for Tx NAPI | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 29 this patch: 29
netdev/cc_maintainers warning 3 maintainers not CCed: cai.huoqing@linux.dev chris.snook@gmail.com edumazet@google.com
netdev/build_clang success Errors and warnings before: 2 this patch: 2
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 29 this patch: 29
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Sieng-Piaw Liew July 15, 2022, 4:21 a.m. UTC
Use netif_tx_napi_add() for NAPI in Tx direction instead of the regular
netif_napi_add() function.

Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>
---
 drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jakub Kicinski July 15, 2022, 4:38 a.m. UTC | #1
On Fri, 15 Jul 2022 12:21:31 +0800 Sieng-Piaw Liew wrote:
> Use netif_tx_napi_add() for NAPI in Tx direction instead of the regular
> netif_napi_add() function.
> 
> Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>

Please use netif_napi_add_tx(), since you use the default weight 
anyway there's no need to specify it.

> diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
> index 948584761e66..bf293a3ed4c9 100644
> --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
> +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
> @@ -2734,8 +2734,8 @@ static int atl1c_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  		netif_napi_add(netdev, &adapter->rrd_ring[i].napi,
>  			       atl1c_clean_rx, 64);
>  	for (i = 0; i < adapter->tx_queue_count; ++i)
> -		netif_napi_add(netdev, &adapter->tpd_ring[i].napi,
> -			       atl1c_clean_tx, 64);
> +		netif_napi_add_tx_weight(netdev, &adapter->tpd_ring[i].napi,
> +					 atl1c_clean_tx, 64);
>  	timer_setup(&adapter->phy_config_timer, atl1c_phy_config, 0);
>  	/* setup the private structure */
>  	err = atl1c_sw_init(adapter);
diff mbox series

Patch

diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 948584761e66..bf293a3ed4c9 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -2734,8 +2734,8 @@  static int atl1c_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		netif_napi_add(netdev, &adapter->rrd_ring[i].napi,
 			       atl1c_clean_rx, 64);
 	for (i = 0; i < adapter->tx_queue_count; ++i)
-		netif_napi_add(netdev, &adapter->tpd_ring[i].napi,
-			       atl1c_clean_tx, 64);
+		netif_napi_add_tx_weight(netdev, &adapter->tpd_ring[i].napi,
+					 atl1c_clean_tx, 64);
 	timer_setup(&adapter->phy_config_timer, atl1c_phy_config, 0);
 	/* setup the private structure */
 	err = atl1c_sw_init(adapter);