Re: [PATCH net v3 1/4] igb: don't disable rings that don't exist when disabling an XSK pool

From: Antonio Quartulli

Date: Fri Nov 20 2026 - 15:34:07 EST


Apparently Sashiko has hit a little, but valid, interesting hitch on this patch.

Will need a respin.

Regards,

pw-bot: cr

On 19/11/2026 15:04, Antonio Quartulli wrote:
xsk_get_pool_from_qid() checks the queue id against the stack's real
queue counts, which can be higher than the number of rings the device
has, e.g. after igb falls back from MSI-X to MSI on resume. Disabling
the pool of such a queue then passes a NULL ring to
igb_txrx_ring_disable().

Only disable and re-enable the rings the device has, as
igb_xsk_pool_enable() and igb_xsk_wakeup() already check.

Compile-tested only: the XSK pool path isn't reachable with the QEMU
82576 setup used for the rest of the series.

Fixes: 80f6ccf9f116 ("igb: Introduce XSK data structures and helpers")
Cc: stable@xxxxxxxxxxxxxxx # 6.14+
Link: https://lore.kernel.org/netdev/20261116153041.3002666-2-antonio@xxxxxxxxxxxxx/
Signed-off-by: Antonio Quartulli <antonio@xxxxxxxxxxxxx>
---
v3: new patch.

drivers/net/ethernet/intel/igb/igb_xsk.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_xsk.c b/drivers/net/ethernet/intel/igb/igb_xsk.c
index ce4a7b5..8ed82bb 100644
--- a/drivers/net/ethernet/intel/igb/igb_xsk.c
+++ b/drivers/net/ethernet/intel/igb/igb_xsk.c
@@ -148,7 +148,12 @@ static int igb_xsk_pool_disable(struct igb_adapter *adapter, u16 qid)
return -EINVAL;
rx_ring = adapter->rx_ring[qid];
- if_running = netif_running(adapter->netdev) && igb_xdp_is_enabled(adapter);
+ /* The stack can know more queues than the device has, e.g. after a
+ * fallback to fewer queues on resume: skip the rings it doesn't have.
+ */
+ if_running = netif_running(adapter->netdev) &&
+ igb_xdp_is_enabled(adapter) &&
+ qid < adapter->num_rx_queues;
if (if_running)
igb_txrx_ring_disable(adapter, qid);

--
Antonio Quartulli

CEO and Co-Founder
Mandelbit Srl
https://www.mandelbit.com