[RFC net-next 02/15] eth: fbnic: Report the logical XDP RX queue

From: Björn Töpel

Date: Fri Oct 02 2026 - 15:05:23 EST


XDP gives the RX queue to programs in ctx->rx_queue_index. fbnic
fills it from the header buffer queue index. The header and payload
buffer queues do not carry the netdev queue id, and the header queue
index is zero. So XDP programs see queue 0 for packets on every
queue.

Programs that act on the RX queue get the wrong value. For example,
the default AF_XDP program looks up its socket with
ctx->rx_queue_index, so it cannot find sockets on other queues.

Use the completion queue index. It is the netdev RX queue id, which
queue steering and AF_XDP socket binding use.

Tested on fbnic hardware (50G, firmware 25.08.05-004) with AF_XDP
zero-copy from the page-pool series: sockets on queue 43, and on four
queues at once, receive their packets.

Fixes: 894d4a4ea6cb ("eth: fbnic: move xdp_rxq_info_reg() to resource alloc")
Signed-off-by: Björn Töpel <bjorn@xxxxxxxxxx>
---
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 c62d885a678a..0c7b1ea002d8 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;
--
2.55.0