Netdev List
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com, andrew+netdev@lunn.ch,
	netdev@vger.kernel.org
Cc: David Carlier <devnexen@gmail.com>,
	anthony.l.nguyen@intel.com, maciej.fijalkowski@intel.com,
	magnus.karlsson@intel.com, ast@kernel.org, daniel@iogearbox.net,
	hawk@kernel.org, john.fastabend@gmail.com, sdf@fomichev.me,
	bpf@vger.kernel.org, dima.ruinskiy@intel.com,
	advoretsky@gmail.com, stable@vger.kernel.org,
	Moriya Kadosh <moriyax.kadosh@intel.com>
Subject: [PATCH net 08/10] igc: remove napi_synchronize() in igc_down()
Date: Tue, 28 Jul 2026 14:09:05 -0700	[thread overview]
Message-ID: <20260728210909.3042004-9-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20260728210909.3042004-1-anthony.l.nguyen@intel.com>

From: David Carlier <devnexen@gmail.com>

When an AF_XDP zero-copy application is killed abruptly, the XSK pool is
torn down but NAPI keeps polling. igc_clean_rx_irq_zc() then returns the
full budget on every poll, so napi_complete_done() never clears
NAPI_STATE_SCHED.

igc_down() calls napi_synchronize() before napi_disable(), so it spins
forever waiting for that bit and the interface never goes down. Drop the
napi_synchronize() and let napi_disable() do the job -- it sets
NAPI_STATE_DISABLE, which forces the stuck poll to complete. Reorder it
ahead of igc_set_queue_napi() so the NAPI mapping is cleared only after
polling has stopped, matching the recent igb fix b1e067240379.

Fixes: fc9df2a0b520 ("igc: Enable RX via AF_XDP zero-copy")
Suggested-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: David Carlier <devnexen@gmail.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Reviewed-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
Tested-by: Moriya Kadosh <moriyax.kadosh@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 2c9e2dfd8499..b3883a5a7d7a 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -5352,9 +5352,8 @@ void igc_down(struct igc_adapter *adapter)
 
 	for (i = 0; i < adapter->num_q_vectors; i++) {
 		if (adapter->q_vector[i]) {
-			napi_synchronize(&adapter->q_vector[i]->napi);
-			igc_set_queue_napi(adapter, i, NULL);
 			napi_disable(&adapter->q_vector[i]->napi);
+			igc_set_queue_napi(adapter, i, NULL);
 		}
 	}
 
-- 
2.47.1


  parent reply	other threads:[~2026-07-28 21:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 21:08 [PATCH net 00/10][pull request] Intel Wired LAN Driver Updates 2026-07-28 (idpf, ice, igc, igbvf, e1000) Tony Nguyen
2026-07-28 21:08 ` [PATCH net 01/10] idpf: bound interrupt-vector register fill to the allocated array Tony Nguyen
2026-07-28 21:08 ` [PATCH net 02/10] idpf: adjust TxQ ring count minimum Tony Nguyen
2026-07-28 21:09 ` [PATCH net 03/10] idpf: Fix mailbox IRQ name leak on request failure Tony Nguyen
2026-07-28 21:09 ` [PATCH net 04/10] ice: wait for reset completion in ice_resume() Tony Nguyen
2026-07-28 21:09 ` [PATCH net 05/10] ice: fix VF interrupts cleanup Tony Nguyen
2026-07-28 21:09 ` [PATCH net 06/10] ice: fix memory leak in ice_lbtest_prepare_rings() Tony Nguyen
2026-07-28 21:09 ` [PATCH net 07/10] ice: suppress DPLL errors during reset recovery Tony Nguyen
2026-07-28 21:09 ` Tony Nguyen [this message]
2026-07-28 21:09 ` [PATCH net 09/10] igbvf: Fix leak in TX DMA error cleanup Tony Nguyen
2026-07-28 21:09 ` [PATCH net 10/10] e1000: fix memory leak in e1000_probe() Tony Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260728210909.3042004-9-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=advoretsky@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=devnexen@gmail.com \
    --cc=dima.ruinskiy@intel.com \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=moriyax.kadosh@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox