All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iwl-net] ixgbe: do not configure xps for XDP queues
@ 2026-05-18 11:15 ` Larysa Zaremba
  0 siblings, 0 replies; 6+ messages in thread
From: Larysa Zaremba @ 2026-05-18 11:15 UTC (permalink / raw)
  To: Tony Nguyen, intel-wired-lan
  Cc: Przemek Kitszel, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
	Jesper Dangaard Brouer, John Fastabend, Stanislav Fomichev,
	netdev, linux-kernel, bpf, Larysa Zaremba, Alexander Lobakin,
	Aleksandr Loktionov

netif_set_xps_queue() should not be called for an XDP Tx queue, since such
queues are not netdev-exposed. On systems with number of CPUs >=64, on E610
adapter, netdev is configured with maximum number queue pairs being 63
(due to MSI-X assignment), but configuring XDP results in 64 XDP queues.

So, during XDP program load, when netif_set_xps_queue() is called for the
last XDP queue, we get a WARNING with a call trace and KASAN report
afterwards (if enabled).

[ 2012.699800] WARNING: net/core/dev.c:2854 at __netif_set_xps_queue+0x116a/0x1e40, CPU#36: xdpsock/103668
[...]
[ 2012.700029] RIP: 0010:__netif_set_xps_queue+0x116a/0x1e40
[ 2012.700035] Code: b6 34 06 48 89 f8 83 e0 07 83 c0 01 40 38 f0 7c 09 40 84 f6 0f 85 03 0a 00 00 0f b7 44 24 40 66 43 89 44 6a 18 e9 01 fb ff ff <0f> 0b e9 f2 ee ff ff 44 8b 44 24 44 45 85 c0 74 50 4d 85 e4 0f 84
[ 2012.700040] RSP: 0018:ffff8882369aeb28 EFLAGS: 00010246
[ 2012.700046] RAX: 0000000000000000 RBX: 000000000000003f RCX: 0000000000000000
[ 2012.700050] RDX: 1ffff1111da3d891 RSI: ffff888120e34250 RDI: ffff8888ed1ec488
[ 2012.700054] RBP: ffff888913281560 R08: 0000000000000000 R09: ffff8888ed1ec000
[ 2012.700058] R10: ffff8888a2e83180 R11: 0000000000000000 R12: 0000000000007fa8
[ 2012.700061] R13: 000000000000003f R14: ffff888120e34854 R15: ffff8889132817c8
[ 2012.700065] FS:  00007fc8ea9ff740(0000) GS:ffff88884cefe000(0000) knlGS:0000000000000000
[ 2012.700069] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2012.700073] CR2: 00007f81c8000020 CR3: 00000002299f8006 CR4: 00000000007726f0
[ 2012.700077] PKRU: 55555554
[ 2012.700080] Call Trace:
[ 2012.700084]  <TASK>
[ 2012.700087]  ? ktime_get+0x61/0x150
[ 2012.700097]  ? usleep_range_state+0x133/0x1b0
[ 2012.700108]  ? __pfx_usleep_range_state+0x10/0x10
[ 2012.700114]  netif_set_xps_queue+0x31/0x50
[ 2012.700119]  ixgbe_configure_tx_ring+0x472/0x920 [ixgbe]
[...]
[ 2012.700486]  ixgbe_xdp+0x38f/0x750 [ixgbe]

[...]

[ 2012.701094] BUG: KASAN: slab-out-of-bounds in __netif_set_xps_queue+0x1ac5/0x1e40
[ 2012.701100] Write of size 4 at addr ffff88888d43cff8 by task xdpsock/103668

Skip XPS configuration for XDP Tx queues.

Fixes: 33fdc82f0883 ("ixgbe: add support for XDP_TX action")
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index e0a986f1c96a..bd689dc8201e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -3964,7 +3964,8 @@ void ixgbe_configure_tx_ring(struct ixgbe_adapter *adapter,
 	}
 
 	/* initialize XPS */
-	if (!test_and_set_bit(__IXGBE_TX_XPS_INIT_DONE, ring->state)) {
+	if (!ring_is_xdp(ring) &&
+	    !test_and_set_bit(__IXGBE_TX_XPS_INIT_DONE, ring->state)) {
 		struct ixgbe_q_vector *q_vector = ring->q_vector;
 
 		if (q_vector)
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Intel-wired-lan] [PATCH iwl-net] ixgbe: do not configure xps for XDP queues
@ 2026-05-18 11:15 ` Larysa Zaremba
  0 siblings, 0 replies; 6+ messages in thread
From: Larysa Zaremba @ 2026-05-18 11:15 UTC (permalink / raw)
  To: Tony Nguyen, intel-wired-lan
  Cc: Przemek Kitszel, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
	Jesper Dangaard Brouer, John Fastabend, Stanislav Fomichev,
	netdev, linux-kernel, bpf, Larysa Zaremba, Alexander Lobakin,
	Aleksandr Loktionov

netif_set_xps_queue() should not be called for an XDP Tx queue, since such
queues are not netdev-exposed. On systems with number of CPUs >=64, on E610
adapter, netdev is configured with maximum number queue pairs being 63
(due to MSI-X assignment), but configuring XDP results in 64 XDP queues.

So, during XDP program load, when netif_set_xps_queue() is called for the
last XDP queue, we get a WARNING with a call trace and KASAN report
afterwards (if enabled).

[ 2012.699800] WARNING: net/core/dev.c:2854 at __netif_set_xps_queue+0x116a/0x1e40, CPU#36: xdpsock/103668
[...]
[ 2012.700029] RIP: 0010:__netif_set_xps_queue+0x116a/0x1e40
[ 2012.700035] Code: b6 34 06 48 89 f8 83 e0 07 83 c0 01 40 38 f0 7c 09 40 84 f6 0f 85 03 0a 00 00 0f b7 44 24 40 66 43 89 44 6a 18 e9 01 fb ff ff <0f> 0b e9 f2 ee ff ff 44 8b 44 24 44 45 85 c0 74 50 4d 85 e4 0f 84
[ 2012.700040] RSP: 0018:ffff8882369aeb28 EFLAGS: 00010246
[ 2012.700046] RAX: 0000000000000000 RBX: 000000000000003f RCX: 0000000000000000
[ 2012.700050] RDX: 1ffff1111da3d891 RSI: ffff888120e34250 RDI: ffff8888ed1ec488
[ 2012.700054] RBP: ffff888913281560 R08: 0000000000000000 R09: ffff8888ed1ec000
[ 2012.700058] R10: ffff8888a2e83180 R11: 0000000000000000 R12: 0000000000007fa8
[ 2012.700061] R13: 000000000000003f R14: ffff888120e34854 R15: ffff8889132817c8
[ 2012.700065] FS:  00007fc8ea9ff740(0000) GS:ffff88884cefe000(0000) knlGS:0000000000000000
[ 2012.700069] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2012.700073] CR2: 00007f81c8000020 CR3: 00000002299f8006 CR4: 00000000007726f0
[ 2012.700077] PKRU: 55555554
[ 2012.700080] Call Trace:
[ 2012.700084]  <TASK>
[ 2012.700087]  ? ktime_get+0x61/0x150
[ 2012.700097]  ? usleep_range_state+0x133/0x1b0
[ 2012.700108]  ? __pfx_usleep_range_state+0x10/0x10
[ 2012.700114]  netif_set_xps_queue+0x31/0x50
[ 2012.700119]  ixgbe_configure_tx_ring+0x472/0x920 [ixgbe]
[...]
[ 2012.700486]  ixgbe_xdp+0x38f/0x750 [ixgbe]

[...]

[ 2012.701094] BUG: KASAN: slab-out-of-bounds in __netif_set_xps_queue+0x1ac5/0x1e40
[ 2012.701100] Write of size 4 at addr ffff88888d43cff8 by task xdpsock/103668

Skip XPS configuration for XDP Tx queues.

Fixes: 33fdc82f0883 ("ixgbe: add support for XDP_TX action")
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index e0a986f1c96a..bd689dc8201e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -3964,7 +3964,8 @@ void ixgbe_configure_tx_ring(struct ixgbe_adapter *adapter,
 	}
 
 	/* initialize XPS */
-	if (!test_and_set_bit(__IXGBE_TX_XPS_INIT_DONE, ring->state)) {
+	if (!ring_is_xdp(ring) &&
+	    !test_and_set_bit(__IXGBE_TX_XPS_INIT_DONE, ring->state)) {
 		struct ixgbe_q_vector *q_vector = ring->q_vector;
 
 		if (q_vector)
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH iwl-net] ixgbe: do not configure xps for XDP queues
  2026-05-18 11:15 ` [Intel-wired-lan] " Larysa Zaremba
@ 2026-05-21 11:43   ` Simon Horman
  -1 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2026-05-21 11:43 UTC (permalink / raw)
  To: Larysa Zaremba
  Cc: Tony Nguyen, intel-wired-lan, Przemek Kitszel, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
	John Fastabend, Stanislav Fomichev, netdev, linux-kernel, bpf,
	Alexander Lobakin, Aleksandr Loktionov

On Mon, May 18, 2026 at 01:15:04PM +0200, Larysa Zaremba wrote:
> netif_set_xps_queue() should not be called for an XDP Tx queue, since such
> queues are not netdev-exposed. On systems with number of CPUs >=64, on E610
> adapter, netdev is configured with maximum number queue pairs being 63
> (due to MSI-X assignment), but configuring XDP results in 64 XDP queues.
> 
> So, during XDP program load, when netif_set_xps_queue() is called for the
> last XDP queue, we get a WARNING with a call trace and KASAN report
> afterwards (if enabled).
> 
> [ 2012.699800] WARNING: net/core/dev.c:2854 at __netif_set_xps_queue+0x116a/0x1e40, CPU#36: xdpsock/103668

...

> 
> Skip XPS configuration for XDP Tx queues.
> 
> Fixes: 33fdc82f0883 ("ixgbe: add support for XDP_TX action")
> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-net] ixgbe: do not configure xps for XDP queues
@ 2026-05-21 11:43   ` Simon Horman
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2026-05-21 11:43 UTC (permalink / raw)
  To: Larysa Zaremba
  Cc: Tony Nguyen, intel-wired-lan, Przemek Kitszel, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
	John Fastabend, Stanislav Fomichev, netdev, linux-kernel, bpf,
	Alexander Lobakin, Aleksandr Loktionov

On Mon, May 18, 2026 at 01:15:04PM +0200, Larysa Zaremba wrote:
> netif_set_xps_queue() should not be called for an XDP Tx queue, since such
> queues are not netdev-exposed. On systems with number of CPUs >=64, on E610
> adapter, netdev is configured with maximum number queue pairs being 63
> (due to MSI-X assignment), but configuring XDP results in 64 XDP queues.
> 
> So, during XDP program load, when netif_set_xps_queue() is called for the
> last XDP queue, we get a WARNING with a call trace and KASAN report
> afterwards (if enabled).
> 
> [ 2012.699800] WARNING: net/core/dev.c:2854 at __netif_set_xps_queue+0x116a/0x1e40, CPU#36: xdpsock/103668

...

> 
> Skip XPS configuration for XDP Tx queues.
> 
> Fixes: 33fdc82f0883 ("ixgbe: add support for XDP_TX action")
> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-net] ixgbe: do not configure xps for XDP queues
  2026-05-21 11:43   ` [Intel-wired-lan] " Simon Horman
@ 2026-06-03 14:30     ` Holda, Patryk
  -1 siblings, 0 replies; 6+ messages in thread
From: Holda, Patryk @ 2026-06-03 14:30 UTC (permalink / raw)
  To: Simon Horman, Zaremba, Larysa
  Cc: Nguyen, Anthony L, intel-wired-lan@lists.osuosl.org,
	Kitszel, Przemyslaw, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
	Jesper Dangaard Brouer, John Fastabend, Stanislav Fomichev,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org, Lobakin, Aleksander, Loktionov, Aleksandr

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Simon Horman
> Sent: Thursday, May 21, 2026 1:44 PM
> To: Zaremba, Larysa <larysa.zaremba@intel.com>
> Cc: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; intel-wired-
> lan@lists.osuosl.org; Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>;
> Andrew Lunn <andrew+netdev@lunn.ch>; David S. Miller
> <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub
> Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Alexei
7> Starovoitov <ast@kernel.org>; Daniel Borkmann <daniel@iogearbox.net>;
> Jesper Dangaard Brouer <hawk@kernel.org>; John Fastabend
> <john.fastabend@gmail.com>; Stanislav Fomichev <sdf@fomichev.me>;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; bpf@vger.kernel.org;
> Lobakin, Aleksander <aleksander.lobakin@intel.com>; Loktionov, Aleksandr
> <Aleksandr.Loktionov@intel.com>
> Subject: Re: [Intel-wired-lan] [PATCH iwl-net] ixgbe: do not configure xps for
> XDP queues
> Importance: High
> 
> On Mon, May 18, 2026 at 01:15:04PM +0200, Larysa Zaremba wrote:
> > netif_set_xps_queue() should not be called for an XDP Tx queue, since
> > such queues are not netdev-exposed. On systems with number of CPUs
> > >=64, on E610 adapter, netdev is configured with maximum number queue
> > pairs being 63 (due to MSI-X assignment), but configuring XDP results in 64
> XDP queues.
> >
> > So, during XDP program load, when netif_set_xps_queue() is called for
> > the last XDP queue, we get a WARNING with a call trace and KASAN
> > report afterwards (if enabled).
> >
> > [ 2012.699800] WARNING: net/core/dev.c:2854 at
> > __netif_set_xps_queue+0x116a/0x1e40, CPU#36: xdpsock/103668
> 
> ...
> 
> >
> > Skip XPS configuration for XDP Tx queues.
> >
> > Fixes: 33fdc82f0883 ("ixgbe: add support for XDP_TX action")
> > Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> > Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> > Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
> 
> Reviewed-by: Simon Horman <horms@kernel.org>

Tested-by: Patryk Holda <patryk.holda@intel.com> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [Intel-wired-lan] [PATCH iwl-net] ixgbe: do not configure xps for XDP queues
@ 2026-06-03 14:30     ` Holda, Patryk
  0 siblings, 0 replies; 6+ messages in thread
From: Holda, Patryk @ 2026-06-03 14:30 UTC (permalink / raw)
  To: Simon Horman, Zaremba, Larysa
  Cc: Nguyen, Anthony L, intel-wired-lan@lists.osuosl.org,
	Kitszel, Przemyslaw, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
	Jesper Dangaard Brouer, John Fastabend, Stanislav Fomichev,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org, Lobakin, Aleksander, Loktionov, Aleksandr

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Simon Horman
> Sent: Thursday, May 21, 2026 1:44 PM
> To: Zaremba, Larysa <larysa.zaremba@intel.com>
> Cc: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; intel-wired-
> lan@lists.osuosl.org; Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>;
> Andrew Lunn <andrew+netdev@lunn.ch>; David S. Miller
> <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub
> Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Alexei
7> Starovoitov <ast@kernel.org>; Daniel Borkmann <daniel@iogearbox.net>;
> Jesper Dangaard Brouer <hawk@kernel.org>; John Fastabend
> <john.fastabend@gmail.com>; Stanislav Fomichev <sdf@fomichev.me>;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; bpf@vger.kernel.org;
> Lobakin, Aleksander <aleksander.lobakin@intel.com>; Loktionov, Aleksandr
> <Aleksandr.Loktionov@intel.com>
> Subject: Re: [Intel-wired-lan] [PATCH iwl-net] ixgbe: do not configure xps for
> XDP queues
> Importance: High
> 
> On Mon, May 18, 2026 at 01:15:04PM +0200, Larysa Zaremba wrote:
> > netif_set_xps_queue() should not be called for an XDP Tx queue, since
> > such queues are not netdev-exposed. On systems with number of CPUs
> > >=64, on E610 adapter, netdev is configured with maximum number queue
> > pairs being 63 (due to MSI-X assignment), but configuring XDP results in 64
> XDP queues.
> >
> > So, during XDP program load, when netif_set_xps_queue() is called for
> > the last XDP queue, we get a WARNING with a call trace and KASAN
> > report afterwards (if enabled).
> >
> > [ 2012.699800] WARNING: net/core/dev.c:2854 at
> > __netif_set_xps_queue+0x116a/0x1e40, CPU#36: xdpsock/103668
> 
> ...
> 
> >
> > Skip XPS configuration for XDP Tx queues.
> >
> > Fixes: 33fdc82f0883 ("ixgbe: add support for XDP_TX action")
> > Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> > Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> > Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
> 
> Reviewed-by: Simon Horman <horms@kernel.org>

Tested-by: Patryk Holda <patryk.holda@intel.com> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-06-03 14:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-18 11:15 [PATCH iwl-net] ixgbe: do not configure xps for XDP queues Larysa Zaremba
2026-05-18 11:15 ` [Intel-wired-lan] " Larysa Zaremba
2026-05-21 11:43 ` Simon Horman
2026-05-21 11:43   ` [Intel-wired-lan] " Simon Horman
2026-06-03 14:30   ` Holda, Patryk
2026-06-03 14:30     ` Holda, Patryk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.