* [PATCH net-next] idpf: batch RCU grace periods when deleting NAPIs
@ 2026-11-18 21:35 Eric Dumazet
2026-11-21 2:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2026-11-18 21:35 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni, Willem de Bruijn
Cc: Simon Horman, netdev, Eric Dumazet, Tony Nguyen, Przemek Kitszel,
Andrew Lunn
netif_napi_del() waits for an RCU grace period after each NAPI.
idpf_vport_intr_napi_del_all() calls it for every q_vector, so
stopping a vport with N vectors waits for N grace periods. This
happens on ifdown, and on each soft reset triggered by a channel,
ring size or MTU change.
Use __netif_napi_del() and a single synchronize_net() after the loop.
The callers are unchanged: idpf_vport_intr_deinit() still deletes the
NAPIs after they have been disabled and the DIM works drained, and
before the IRQs are released. The error path of idpf_vport_intr_init()
deletes NAPIs which were never enabled.
Compile tested only.
Signed-off-by: Eric Dumazet <edumazet@kernel.org>
---
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>
---
drivers/net/ethernet/intel/idpf/idpf_txrx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
index b346187bbf301847224cd7d1655a9294b893acb9..d76613310b12a074117662d0558d2467a21e3bc4 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
@@ -3864,7 +3864,10 @@ static irqreturn_t idpf_vport_intr_clean_queues(int __always_unused irq,
static void idpf_vport_intr_napi_del_all(struct idpf_q_vec_rsrc *rsrc)
{
for (u16 v_idx = 0; v_idx < rsrc->num_q_vectors; v_idx++)
- netif_napi_del(&rsrc->q_vectors[v_idx].napi);
+ __netif_napi_del(&rsrc->q_vectors[v_idx].napi);
+
+ /* Observe an RCU grace period after __netif_napi_del() calls. */
+ synchronize_net();
}
/**
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] idpf: batch RCU grace periods when deleting NAPIs
2026-11-18 21:35 [PATCH net-next] idpf: batch RCU grace periods when deleting NAPIs Eric Dumazet
@ 2026-11-21 2:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-11-21 2:00 UTC (permalink / raw)
To: Eric Dumazet
Cc: davem, kuba, pabeni, willemb, horms, netdev, anthony.l.nguyen,
przemyslaw.kitszel, andrew+netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 18 Nov 2026 22:35:38 +0100 you wrote:
> netif_napi_del() waits for an RCU grace period after each NAPI.
>
> idpf_vport_intr_napi_del_all() calls it for every q_vector, so
> stopping a vport with N vectors waits for N grace periods. This
> happens on ifdown, and on each soft reset triggered by a channel,
> ring size or MTU change.
>
> [...]
Here is the summary with links:
- [net-next] idpf: batch RCU grace periods when deleting NAPIs
https://git.kernel.org/netdev/net-next/c/bd5ce5c9ae25
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] 2+ messages in thread
end of thread, other threads:[~2026-11-21 2:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 21:35 [PATCH net-next] idpf: batch RCU grace periods when deleting NAPIs Eric Dumazet
2026-11-21 2:00 ` 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