🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
2 messages
2 total messages Started by Dimitri Daskalakis Tue, 17 Nov 2026 21:54
[PATCH net v2 2/5] eth: fbnic: skip disabled Tx rings when setting the queue NAPI
#18124
Author: Dimitri Daskalakis
Date: Tue, 17 Nov 2026 21:54
50 lines
13312 bytes
From: Dimitri Daskalakis <daskald@meta.com>

When Rx and Tx channels are not combined, each Rx vector gets a Tx
triad whose sub0 is disabled with a q_idx of 0. fbnic_set_netif_napi()
and fbnic_reset_netif_napi() don't skip it, so every Rx vector
associates Tx queue 0 with its own NAPI, and the netlink queue info
reports the wrong NAPI for Tx queue 0.

This bug was found by AI and verified on HW.

Reproduced with "ethtool -L eth0 combined 0 rx 34 tx 34", and reading
the NAPI IDs with "ynl --family netdev --dump queue-get":

  before: tx 0 napi-id 580, tx 1 napi-id 514, rx 33 napi-id 580
                       ^^^ rx 33's NAPI, not vector 0's
  after:  tx 0 napi-id 513, tx 1 napi-id 514, rx 33 napi-id 580

Fixes: cf4facfb132a ("eth: fbnic: Add support for XDP queues")
Signed-off-by: Dimitri Daskalakis <daskald@meta.com>
---
 drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
index 5efed21e5932..89e7b806363b 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
@@ -2184,6 +2184,9 @@ static void fbnic_set_netif_napi(struct fbnic_napi_vector *nv)
 	for (i = 0; i < nv->txt_count; i++) {
 		struct fbnic_q_triad *qt = &nv->qt[i];
 
+		if (qt->sub0.flags & FBNIC_RING_F_DISABLED)
+			continue;
+
 		netif_queue_set_napi(nv->napi.dev, qt->sub0.q_idx,
 				     NETDEV_QUEUE_TYPE_TX, &nv->napi);
 	}
@@ -2205,6 +2208,9 @@ static void fbnic_reset_netif_napi(struct fbnic_napi_vector *nv)
 	for (i = 0; i < nv->txt_count; i++) {
 		struct fbnic_q_triad *qt = &nv->qt[i];
 
+		if (qt->sub0.flags & FBNIC_RING_F_DISABLED)
+			continue;
+
 		netif_queue_set_napi(nv->napi.dev, qt->sub0.q_idx,
 				     NETDEV_QUEUE_TYPE_TX, NULL);
 	}
-- 
2.52.1
Re: [PATCH net v2 2/5] eth: fbnic: skip disabled Tx rings when setting the queue NAPI
#18522
Author: Björn Töpel
Date: Wed, 18 Nov 2026 13:15
24 lines
9244 bytes
Dimitri Daskalakis <dimitri.daskalakis1@gmail.com> writes:

> From: Dimitri Daskalakis <daskald@meta.com>
>
> When Rx and Tx channels are not combined, each Rx vector gets a Tx
> triad whose sub0 is disabled with a q_idx of 0. fbnic_set_netif_napi()
> and fbnic_reset_netif_napi() don't skip it, so every Rx vector
> associates Tx queue 0 with its own NAPI, and the netlink queue info
> reports the wrong NAPI for Tx queue 0.
>
> This bug was found by AI and verified on HW.
>
> Reproduced with "ethtool -L eth0 combined 0 rx 34 tx 34", and reading
> the NAPI IDs with "ynl --family netdev --dump queue-get":
>
>   before: tx 0 napi-id 580, tx 1 napi-id 514, rx 33 napi-id 580
>                        ^^^ rx 33's NAPI, not vector 0's
>   after:  tx 0 napi-id 513, tx 1 napi-id 514, rx 33 napi-id 580
>
> Fixes: cf4facfb132a ("eth: fbnic: Add support for XDP queues")
> Signed-off-by: Dimitri Daskalakis <daskald@meta.com>

Reviewed-by: Björn Töpel <bjorn@kernel.org>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads