From: Intel-wired-lan <[email protected]> On Behalf Of Behera, VIVEK Sent: Friday, December 5, 2025 1:40 PM To: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; "David S. Miller" <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]> Cc: [email protected]; [email protected]; [email protected]; Behera, Vivek <[email protected]> Subject: [Intel-wired-lan] [PATCH] igc: Fix trigger of incorrect irq in igc_xsk_wakeup function
>From 4e3ebdc0af6baa83ccfc17c61c1eb61408095ffd Mon Sep 17 00:00:00 2001 From: Vivek Behera <[email protected]<mailto:[email protected]>> Date: Fri, 5 Dec 2025 10:26:05 +0100 Subject: [PATCH] igc: Fix trigger of incorrect irq in igc_xsk_wakeup function When the i226 is configured to use only 2 combined queues using ethtool or in an environment with only 2 active CPU cores the 4 irq lines are used in a split configuration with one irq assigned to each of the two rx and tx queues (see console output below) ... Signed-off-by: Vivek Behera <[email protected]<mailto:[email protected]>> --- drivers/net/ethernet/intel/igc/igc_main.c | 31 +++++++++++++++++++---- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 7aafa60ba0c8..0cfcd20a2536 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -6930,21 +6930,42 @@ int igc_xsk_wakeup(struct net_device *dev, u32 queue_id, u32 flags) if (!igc_xdp_is_enabled(adapter)) return -ENXIO; - if (queue_id >= adapter->num_rx_queues) + if ((flags & XDP_WAKEUP_RX) && (flags & XDP_WAKEUP_TX)) { + /* If both TX and RX need to be woken up queue pair per IRQ is needed */ + if (!(adapter->flags & IGC_FLAG_QUEUE_PAIRS)) + return -EINVAL; /* igc queue pairs are not activated. + * Can't trigger irq + */ It looks like not a malformed input, but as unsupported operation for the current device/IRQ configuration. In net drivers, -EOPNOTSUPP is the expected errno for "the device cannot perform this requested operation in this configuration," while -EINVAL signals a bad argument. Am I right? + /* Just get the ring params from Rx */ + if (queue_id >= adapter->num_rx_queues) + return -EINVAL; + ring = adapter->rx_ring[queue_id]; + } else if (flags & XDP_WAKEUP_TX) { + if (queue_id >= adapter->num_tx_queues) + return -EINVAL; + /* Get the ring params from Tx */ + ring = adapter->tx_ring[queue_id]; + } else if (flags & XDP_WAKEUP_RX) { + if (queue_id >= adapter->num_rx_queues) + return -EINVAL; + /* Get the ring params from Rx */ + ring = adapter->rx_ring[queue_id]; + } else { + /* Invalid Flags */ return -EINVAL; ... -- 2.34.1
