* [PATCH v1 net-next] net: ena: Support persistent per-NAPI config.
@ 2025-04-07 16:47 Kuniyuki Iwashima
2025-04-07 18:09 ` Joe Damato
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kuniyuki Iwashima @ 2025-04-07 16:47 UTC (permalink / raw)
To: Shay Agroskin, Arthur Kiyanovski, David Arinzon, Saeed Bishara,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni
Cc: Joe Damato, Kuniyuki Iwashima, Kuniyuki Iwashima, netdev
Let's pass the queue index to netif_napi_add_config() to preserve
per-NAPI config.
Test:
Set 100 to defer-hard-irqs (default is 0) and check the value after
link down & up.
$ cat /sys/class/net/enp39s0/napi_defer_hard_irqs
0
$ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
--dump napi-get --json='{"ifindex": 2}'
[{'defer-hard-irqs': 0,
'gro-flush-timeout': 0,
'id': 65,
'ifindex': 2,
'irq': 29,
'irq-suspend-timeout': 0}]
$ sudo ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
--do napi-set --json='{"id": 65, "defer-hard-irqs": 100}'
$ sudo ip link set enp39s0 down && sudo ip link set enp39s0 up
Without patch:
$ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
--dump napi-get --json='{"ifindex": 2}'
[{'defer-hard-irqs': 0, <------------------- Reset to 0
'gro-flush-timeout': 0,
'id': 66, <------------------------------- New ID
'ifindex': 2,
'irq': 29,
'irq-suspend-timeout': 0}]
With patch:
$ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
--dump napi-get --json='{"ifindex": 2}'
[{'defer-hard-irqs': 100, <--------------+-- Preserved
'gro-flush-timeout': 0, |
'id': 65, <----------------------------'
'ifindex': 2,
'irq': 29,
'irq-suspend-timeout': 0}]
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
---
drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 70fa3adb4934..aa4a17edd98f 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -1777,7 +1777,7 @@ static void ena_init_napi_in_range(struct ena_adapter *adapter,
if (ENA_IS_XDP_INDEX(adapter, i))
napi_handler = ena_xdp_io_poll;
- netif_napi_add(adapter->netdev, &napi->napi, napi_handler);
+ netif_napi_add_config(adapter->netdev, &napi->napi, napi_handler, i);
if (!ENA_IS_XDP_INDEX(adapter, i))
napi->rx_ring = rx_ring;
--
2.48.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1 net-next] net: ena: Support persistent per-NAPI config.
2025-04-07 16:47 [PATCH v1 net-next] net: ena: Support persistent per-NAPI config Kuniyuki Iwashima
@ 2025-04-07 18:09 ` Joe Damato
2025-04-07 20:17 ` Kiyanovski, Arthur
2025-04-08 20:08 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Joe Damato @ 2025-04-07 18:09 UTC (permalink / raw)
To: Kuniyuki Iwashima
Cc: Shay Agroskin, Arthur Kiyanovski, David Arinzon, Saeed Bishara,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Kuniyuki Iwashima, netdev
On Mon, Apr 07, 2025 at 09:47:59AM -0700, Kuniyuki Iwashima wrote:
> Let's pass the queue index to netif_napi_add_config() to preserve
> per-NAPI config.
>
> Test:
>
> Set 100 to defer-hard-irqs (default is 0) and check the value after
> link down & up.
>
> $ cat /sys/class/net/enp39s0/napi_defer_hard_irqs
> 0
>
> $ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
> --dump napi-get --json='{"ifindex": 2}'
> [{'defer-hard-irqs': 0,
> 'gro-flush-timeout': 0,
> 'id': 65,
> 'ifindex': 2,
> 'irq': 29,
> 'irq-suspend-timeout': 0}]
>
> $ sudo ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
> --do napi-set --json='{"id": 65, "defer-hard-irqs": 100}'
>
> $ sudo ip link set enp39s0 down && sudo ip link set enp39s0 up
>
> Without patch:
>
> $ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
> --dump napi-get --json='{"ifindex": 2}'
> [{'defer-hard-irqs': 0, <------------------- Reset to 0
> 'gro-flush-timeout': 0,
> 'id': 66, <------------------------------- New ID
> 'ifindex': 2,
> 'irq': 29,
> 'irq-suspend-timeout': 0}]
>
> With patch:
>
> $ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
> --dump napi-get --json='{"ifindex": 2}'
> [{'defer-hard-irqs': 100, <--------------+-- Preserved
> 'gro-flush-timeout': 0, |
> 'id': 65, <----------------------------'
> 'ifindex': 2,
> 'irq': 29,
> 'irq-suspend-timeout': 0}]
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
> ---
> drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thank you for adding support for this!
Reviewed-by: Joe Damato <jdamato@fastly.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v1 net-next] net: ena: Support persistent per-NAPI config.
2025-04-07 16:47 [PATCH v1 net-next] net: ena: Support persistent per-NAPI config Kuniyuki Iwashima
2025-04-07 18:09 ` Joe Damato
@ 2025-04-07 20:17 ` Kiyanovski, Arthur
2025-04-08 20:08 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Kiyanovski, Arthur @ 2025-04-07 20:17 UTC (permalink / raw)
To: Iwashima, Kuniyuki, Allen, Neil, Arinzon, David, Bshara, Saeed,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni
Cc: Joe Damato, Kuniyuki Iwashima, netdev@vger.kernel.org
On Monday, April 7, 2025 9:48 AM, Iwashima, Kuniyuki wrote:
> Let's pass the queue index to netif_napi_add_config() to preserve per-NAPI
> config.
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
> ---
> drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Thank you for submitting this patch!
Reviewed-by: Arthur Kiyanovski <akiyano@amazon.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 net-next] net: ena: Support persistent per-NAPI config.
2025-04-07 16:47 [PATCH v1 net-next] net: ena: Support persistent per-NAPI config Kuniyuki Iwashima
2025-04-07 18:09 ` Joe Damato
2025-04-07 20:17 ` Kiyanovski, Arthur
@ 2025-04-08 20:08 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-04-08 20:08 UTC (permalink / raw)
To: Kuniyuki Iwashima
Cc: shayagr, akiyano, darinzon, saeedb, andrew+netdev, davem,
edumazet, kuba, pabeni, jdamato, kuni1840, netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 7 Apr 2025 09:47:59 -0700 you wrote:
> Let's pass the queue index to netif_napi_add_config() to preserve
> per-NAPI config.
>
> Test:
>
> Set 100 to defer-hard-irqs (default is 0) and check the value after
> link down & up.
>
> [...]
Here is the summary with links:
- [v1,net-next] net: ena: Support persistent per-NAPI config.
https://git.kernel.org/netdev/net-next/c/0f681b0ecd19
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-08 20:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07 16:47 [PATCH v1 net-next] net: ena: Support persistent per-NAPI config Kuniyuki Iwashima
2025-04-07 18:09 ` Joe Damato
2025-04-07 20:17 ` Kiyanovski, Arthur
2025-04-08 20:08 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).