[Intel-wired-lan] [PATCH] igc: Fix trigger of incorrect irq in igc_xsk_wakeup function
Loktionov, Aleksandr
aleksandr.loktionov at intel.com
Fri Dec 5 21:05:38 UTC 2025
From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of Behera, VIVEK
Sent: Friday, December 5, 2025 1:40 PM
To: Nguyen, Anthony L <anthony.l.nguyen at intel.com>; Kitszel, Przemyslaw <przemyslaw.kitszel at intel.com>; Andrew Lunn <andrew+netdev at lunn.ch>; "David S. Miller" <davem at davemloft.net>; Eric Dumazet <edumazet at google.com>; Jakub Kicinski <kuba at kernel.org>; Paolo Abeni <pabeni at redhat.com>
Cc: intel-wired-lan at lists.osuosl.org; netdev at vger.kernel.org; linux-kernel at vger.kernel.org; Behera, Vivek <vivek.behera at siemens.com>
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 <vivek.behera at siemens.com<mailto:vivek.behera at siemens.com>>
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 <vivek.behera at siemens.com<mailto:vivek.behera at siemens.com>>
---
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20251205/d3ea6b66/attachment-0001.htm>
More information about the Intel-wired-lan
mailing list