Skip to contentSkip to conversation

eth: mtk: switch to netif_napi_add_tx()

PATCH Applied Jakub Kicinski 3 participants 4 messages Jul 7, 2022 – Jul 8, 2022

Subsystems (5)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/2 eth: mtk: switch to netif_napi_add_tx()

netif_napi_add_tx() does not require the weight argument.

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

---
 drivers/net/ethernet/mediatek/mtk_star_emac.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/mediatek/mtk_star_emac.c +1 -2
index 21c3668194eb..3f0e5e64de50 100644
@@ -1653,8 +1653,7 @@ static int mtk_star_probe(struct platform_device *pdev)
 
 	netif_napi_add(ndev, &priv->rx_napi, mtk_star_rx_poll,
 		       NAPI_POLL_WEIGHT);
-	netif_tx_napi_add(ndev, &priv->tx_napi, mtk_star_tx_poll,
-			  NAPI_POLL_WEIGHT);
+	netif_napi_add_tx(ndev, &priv->tx_napi, mtk_star_tx_poll);
 
 	return devm_register_netdev(dev, ndev);
 }
Signature · 1 line
2.36.1
author maintainer
#1 lore raw

PATCH 2/2 eth: sp7021: switch to netif_napi_add_tx()

The Tx NAPI should use netif_napi_add_tx().

---
CC: [email protected]

---
 drivers/net/ethernet/sunplus/spl2sw_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/sunplus/spl2sw_driver.c +1 -1
index 3773ce5e12cc..546206640492 100644
@@ -494,7 +494,7 @@ static int spl2sw_probe(struct platform_device *pdev)
 	/* Add and enable napi. */
 	netif_napi_add(ndev, &comm->rx_napi, spl2sw_rx_poll, NAPI_POLL_WEIGHT);
 	napi_enable(&comm->rx_napi);
-	netif_napi_add(ndev, &comm->tx_napi, spl2sw_tx_poll, NAPI_POLL_WEIGHT);
+	netif_napi_add_tx(ndev, &comm->tx_napi, spl2sw_tx_poll);
 	napi_enable(&comm->tx_napi);
 	return 0;
 
Signature · 1 line
2.36.1
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH net-next 2/2] eth: sp7021: switch to netif_napi_add_tx()

Quoted 24 lines

The Tx NAPI should use netif_napi_add_tx().

---
CC: [email protected]

---
 drivers/net/ethernet/sunplus/spl2sw_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/sunplus/spl2sw_driver.c +1 -2
index 3773ce5e12cc..546206640492 100644
@@ -494,7 +494,7 @@ static int spl2sw_probe(struct platform_device *pdev)
        /* Add and enable napi. */
        netif_napi_add(ndev, &comm->rx_napi, spl2sw_rx_poll, NAPI_POLL_WEIGHT);
        napi_enable(&comm->rx_napi);
-       netif_napi_add(ndev, &comm->tx_napi, spl2sw_tx_poll, NAPI_POLL_WEIGHT);
+       netif_napi_add_tx(ndev, &comm->tx_napi, spl2sw_tx_poll);
        napi_enable(&comm->tx_napi);
        return 0;
 
--
Quoted 2 lines

2.36.1

Thanks for fixing the bug.

I applied the patch and did some tests.
I did not find any problem with patch.

#3 lore raw
In reply to Jakub Kicinski
This series was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 11 lines · On Wed, 6 Jul 2022 20:00:19 -0700 you wrote:

netif_napi_add_tx() does not require the weight argument.

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

[...]

Here is the summary with links:
- [net-next,1/2] eth: mtk: switch to netif_napi_add_tx()

    https://git.kernel.org/netdev/net-next/c/c0f50574223c
  - [net-next,2/2] eth: sp7021: switch to netif_napi_add_tx()
    https://git.kernel.org/netdev/net-next/c/9157533a0a8b

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html