🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
3 messages
3 total messages Started by Björn Töpel Fri, 30 Oct 2026 14:14
[PATCH net] eth: fbnic: Report the logical RX queue to XDP
#8944
Author: Björn Töpel
Date: Fri, 30 Oct 2026 14:14
39 lines
9066 bytes
fbnic reports queue 0 to XDP on all RX queues. The XDP RX queue is
registered with the header buffer queue index, which is always 0,
instead of the completion queue index, which is the netdev queue id.

Any XDP program that reads rx_queue_index gets 0 on every queue, so a
program that uses the queue id uses the wrong queue. AF_XDP has the
same problem: XSKMAP finds the wrong socket, and redirect to a socket
on another queue fails.

Triggered on fbnic hardware (50G, firmware 25.08.05-004) with AF_XDP
zero-copy: sockets on queues other than 0 got no packets. With this
fix, a socket on queue 43, and sockets on four queues at once, get
their packets. On the QEMU model with two queues, a kprobe shows 0 and
0 before the fix, and 0 and 1 after it.

Fixes: 894d4a4ea6cb ("eth: fbnic: move xdp_rxq_info_reg() to resource alloc")
Signed-off-by: Björn Töpel <bjorn@kernel.org>
---
 drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
index c572a0062e77..0bcee152d47c 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
@@ -2072,7 +2072,7 @@ static int fbnic_alloc_rx_qt_resources(struct fbnic_net *fbn,
 
 	fbnic_bdq_set_page_size(&qt->sub1, rx_page_size);
 
-	err = xdp_rxq_info_reg(&qt->xdp_rxq, fbn->netdev, qt->sub0.q_idx,
+	err = xdp_rxq_info_reg(&qt->xdp_rxq, fbn->netdev, qt->cmpl.q_idx,
 			       nv->napi.napi_id);
 	if (err)
 		goto free_page_pools;

base-commit: d8a4f4c59da52b7c31ae337243b8473a19a3f819
-- 
2.56.0
Re: [PATCH net] eth: fbnic: Report the logical RX queue to XDP
#9177
Author: Simon Horman
Date: Sat, 31 Oct 2026 18:33
21 lines
9055 bytes
On Fri, Oct 30, 2026 at 03:14:50PM +0100, Björn Töpel wrote:
> fbnic reports queue 0 to XDP on all RX queues. The XDP RX queue is
> registered with the header buffer queue index, which is always 0,
> instead of the completion queue index, which is the netdev queue id.
> 
> Any XDP program that reads rx_queue_index gets 0 on every queue, so a
> program that uses the queue id uses the wrong queue. AF_XDP has the
> same problem: XSKMAP finds the wrong socket, and redirect to a socket
> on another queue fails.
> 
> Triggered on fbnic hardware (50G, firmware 25.08.05-004) with AF_XDP
> zero-copy: sockets on queues other than 0 got no packets. With this
> fix, a socket on queue 43, and sockets on four queues at once, get
> their packets. On the QEMU model with two queues, a kprobe shows 0 and
> 0 before the fix, and 0 and 1 after it.
> 
> Fixes: 894d4a4ea6cb ("eth: fbnic: move xdp_rxq_info_reg() to resource alloc")
> Signed-off-by: Björn Töpel <bjorn@kernel.org>

Reviewed-by: Simon Horman <horms@kernel.org>
Re: [PATCH net] eth: fbnic: Report the logical RX queue to XDP
#10159
Author: patchwork-bot+netdevbpf
Date: Tue, 03 Nov 2026 09:40
26 lines
8870 bytes
Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Fri, 30 Oct 2026 15:14:50 +0100 you wrote:
> fbnic reports queue 0 to XDP on all RX queues. The XDP RX queue is
> registered with the header buffer queue index, which is always 0,
> instead of the completion queue index, which is the netdev queue id.
> 
> Any XDP program that reads rx_queue_index gets 0 on every queue, so a
> program that uses the queue id uses the wrong queue. AF_XDP has the
> same problem: XSKMAP finds the wrong socket, and redirect to a socket
> on another queue fails.
> 
> [...]

Here is the summary with links:
  - [net] eth: fbnic: Report the logical RX queue to XDP
    https://git.kernel.org/netdev/net/c/c8848b2ca6e6

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
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