patch 'net/af_xdp: fix external mbuf transmit' has been queued to stable release 23.11.7

Shani Peretz shperetz at nvidia.com
Tue Mar 31 08:24:04 CEST 2026


Hi,

FYI, your patch has been queued to stable release 23.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/05/26. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/shanipr/dpdk-stable

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/eb3765a084d14c5a78fe82ec518e6036131c2bc3

Thanks.

Shani

---
>From eb3765a084d14c5a78fe82ec518e6036131c2bc3 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Mon, 5 Jan 2026 13:54:41 +0100
Subject: [PATCH] net/af_xdp: fix external mbuf transmit

[ upstream commit 10ed220497b31182385ca3ac62cd07c20842a4db ]

A mbuf may be pointing at external buffer like when forwarding a TSO
packet coming from a vhost-user port in OVS (see
RTE_VHOST_USER_EXTBUF_SUPPORT).

Checking the mbuf mempool to trigger the zero copy optimisation is
broken: the driver will (at best) read 0s or (at worse) crash when
reading more data than what the direct buffer can contain.

Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")

Signed-off-by: David Marchand <david.marchand at redhat.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 668b184b94..15bb060a3d 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -554,7 +554,7 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	for (i = 0; i < nb_pkts; i++) {
 		mbuf = bufs[i];
 
-		if (mbuf->pool == umem->mb_pool) {
+		if (RTE_MBUF_DIRECT(mbuf) && mbuf->pool == umem->mb_pool) {
 			if (!xsk_ring_prod__reserve(&txq->tx, 1, &idx_tx)) {
 				kick_tx(txq, cq);
 				if (!xsk_ring_prod__reserve(&txq->tx, 1,
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-31 00:32:33.131141088 +0300
+++ 0045-net-af_xdp-fix-external-mbuf-transmit.patch	2026-03-31 00:32:29.004223000 +0300
@@ -1 +1 @@
-From 10ed220497b31182385ca3ac62cd07c20842a4db Mon Sep 17 00:00:00 2001
+From eb3765a084d14c5a78fe82ec518e6036131c2bc3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 10ed220497b31182385ca3ac62cd07c20842a4db ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index f2a8fb95d1..10dbcf1333 100644
+index 668b184b94..15bb060a3d 100644
@@ -26 +27 @@
-@@ -608,7 +608,7 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -554,7 +554,7 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -32,2 +33 @@
- 			desc = reserve_and_fill(txq, mbuf, umem, NULL);
- 			if (!desc) {
+ 			if (!xsk_ring_prod__reserve(&txq->tx, 1, &idx_tx)) {
@@ -34,0 +35 @@
+ 				if (!xsk_ring_prod__reserve(&txq->tx, 1,


More information about the stable mailing list