🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
2 messages
2 total messages Started by Eric Dumazet Wed, 18 Nov 2026 21:35
[PATCH net-next] idpf: batch RCU grace periods when deleting NAPIs
#18766
Author: Eric Dumazet
Date: Wed, 18 Nov 2026 21:35
44 lines
9167 bytes
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
Re: [PATCH net-next] idpf: batch RCU grace periods when deleting NAPIs
#20071
Author: patchwork-bot+netdevbpf
Date: Sat, 21 Nov 2026 02:00
24 lines
8624 bytes
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
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