Thread View: linux.kernel.netdev
3 messages
3 total messages
Started by Rosen Penev
Wed, 07 Oct 2026 17:36
[PATCH net-next v2] net: ag71xx: Use default NAPI weight
Author: Rosen Penev
Date: Wed, 07 Oct 2026 17:36
Date: Wed, 07 Oct 2026 17:36
62 lines
10112 bytes
10112 bytes
Drop the custom NAPI weight and let netif_napi_add() use the core default. The old comment claimed larger weights wasted cycles and cache, but recent RX and TX path changes altered those tradeoffs. Keep the driver on the standard default unless measurements show a device-specific value is needed. iperf3: Before: [ ID][Role] Interval Transfer Bitrate Retr [ 5][TX-C] 0.00-10.00 sec 327 MBytes 274 Mbits/sec 31 sender [ 5][TX-C] 0.00-10.00 sec 325 MBytes 273 Mbits/sec receiver [ 7][RX-C] 0.00-10.00 sec 170 MBytes 143 Mbits/sec 0 sender [ 7][RX-C] 0.00-10.00 sec 170 MBytes 143 Mbits/sec receiver After: [ ID][Role] Interval Transfer Bitrate Retr [ 5][TX-C] 0.00-10.00 sec 341 MBytes 286 Mbits/sec 30 sender [ 5][TX-C] 0.00-10.00 sec 338 MBytes 284 Mbits/sec receiver [ 7][RX-C] 0.00-10.00 sec 184 MBytes 154 Mbits/sec 0 sender [ 7][RX-C] 0.00-10.00 sec 184 MBytes 154 Mbits/sec receiver Assisted-by: LLM Signed-off-by: Rosen Penev <rosenp@gmail.com> --- v2: move out of patchset drivers/net/ethernet/atheros/ag71xx.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c index 4e4794c4dfdc..8a3c689f6825 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -40,11 +40,6 @@ #include <linux/io.h> #include <net/selftests.h> -/* For our NAPI weight bigger does *NOT* mean better - it means more - * D-cache misses and lots more wasted cycles than we'll ever - * possibly gain from saving instructions. - */ -#define AG71XX_NAPI_WEIGHT 32 #define AG71XX_OOM_REFILL (1 + HZ / 10) #define AG71XX_INT_ERR (AG71XX_INT_RX_BE | AG71XX_INT_TX_BE) @@ -1913,8 +1908,7 @@ static int ag71xx_probe(struct platform_device *pdev) return err; } - netif_napi_add_weight(ndev, &ag->napi, ag71xx_poll, - AG71XX_NAPI_WEIGHT); + netif_napi_add(ndev, &ag->napi, ag71xx_poll); ag71xx_wr(ag, AG71XX_REG_MAC_CFG1, 0); -- 2.56.0
Re: [PATCH net-next v2] net: ag71xx: Use default NAPI weight
Author: Andrew Lunn
Date: Wed, 07 Oct 2026 18:28
Date: Wed, 07 Oct 2026 18:28
34 lines
7126 bytes
7126 bytes
On Wed, Oct 07, 2026 at 10:36:28AM -0700, Rosen Penev wrote:
> Drop the custom NAPI weight and let netif_napi_add() use the core
> default.
>
> The old comment claimed larger weights wasted cycles and cache, but
> recent RX and TX path changes altered those tradeoffs. Keep the driver
> on the standard default unless measurements show a device-specific value
> is needed.
>
> iperf3:
>
> Before:
>
> [ ID][Role] Interval Transfer Bitrate Retr
> [ 5][TX-C] 0.00-10.00 sec 327 MBytes 274 Mbits/sec 31 sender
> [ 5][TX-C] 0.00-10.00 sec 325 MBytes 273 Mbits/sec receiver
> [ 7][RX-C] 0.00-10.00 sec 170 MBytes 143 Mbits/sec 0 sender
> [ 7][RX-C] 0.00-10.00 sec 170 MBytes 143 Mbits/sec receiver
>
> After:
>
> [ ID][Role] Interval Transfer Bitrate Retr
> [ 5][TX-C] 0.00-10.00 sec 341 MBytes 286 Mbits/sec 30 sender
> [ 5][TX-C] 0.00-10.00 sec 338 MBytes 284 Mbits/sec receiver
> [ 7][RX-C] 0.00-10.00 sec 184 MBytes 154 Mbits/sec 0 sender
> [ 7][RX-C] 0.00-10.00 sec 184 MBytes 154 Mbits/sec receiver
>
> Assisted-by: LLM
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
Re: [PATCH net-next v2] net: ag71xx: Use default NAPI weight
Author: patchwork-bot+netdevbpf
Date: Tue, 13 Oct 2026 10:40
Date: Tue, 13 Oct 2026 10:40
25 lines
6243 bytes
6243 bytes
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Wed, 7 Oct 2026 10:36:28 -0700 you wrote:
> Drop the custom NAPI weight and let netif_napi_add() use the core
> default.
>
> The old comment claimed larger weights wasted cycles and cache, but
> recent RX and TX path changes altered those tradeoffs. Keep the driver
> on the standard default unless measurements show a device-specific value
> is needed.
>
> [...]
Here is the summary with links:
- [net-next,v2] net: ag71xx: Use default NAPI weight
https://git.kernel.org/netdev/net-next/c/0063f777b58d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads