[PATCH net-next 4/7] eth: fbnic: Run XDP on provider queues

From
Björn Töpel <bjorn@kernel.org>
Date
2026-11-17 16:47:49
Also in
bpf, io-uring, linux-kselftest, lkml, netdev
Reply to
Björn Töpel, 2026-11-17
fbnic keeps headers in normal pages and attaches provider payload as
XDP fragments. The payload is mapped only for receive and must not be
sent with XDP_TX.

Drop XDP_TX while unreadable fragments remain and declare native XDP
support on provider queues. Normal page-backed packets keep their
existing behavior.

Signed-off-by: Björn Töpel <bjorn@kernel.org>
---
 drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
index 07d4b2e92362..52f461bdc62a 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
@@ -1130,7 +1130,8 @@ static long fbnic_pkt_tx(struct fbnic_napi_vector *nv,
 		frag = &shinfo->frags[0];
 	}
 
-	if (fbnic_desc_unused(ring) < nsegs) {
+	if (unlikely(xdp_buff_is_frag_unreadable(&pkt->buff)) ||
+	    fbnic_desc_unused(ring) < nsegs) {
 		u64_stats_update_begin(&ring->stats.syncp);
 		ring->stats.dropped++;
 		u64_stats_update_end(&ring->stats.syncp);
@@ -3124,4 +3125,5 @@ const struct netdev_queue_mgmt_ops fbnic_queue_mgmt_ops = {
 	.ndo_default_qcfg	= fbnic_default_qcfg,
 	.ndo_validate_qcfg	= fbnic_validate_qcfg,
 	.supported_params	= QCFG_RX_PAGE_SIZE,
+	.xdp_unreadable		= true,
 };
-- 
2.56.1
Thread (11 messages) 11 messages, 2 authors, last reply 1d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help