patch 'net/af_xdp: fix external mbuf transmit' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Feb 20 15:55:39 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/22/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2ea484783840b94206a1813a3ddad44e628af36c
Thanks.
Luca Boccassi
---
>From 2ea484783840b94206a1813a3ddad44e628af36c 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 092bcb73aa..6d8d942f03 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -558,7 +558,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.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-20 14:55:44.744883854 +0000
+++ 0037-net-af_xdp-fix-external-mbuf-transmit.patch 2026-02-20 14:55:43.212191210 +0000
@@ -1 +1 @@
-From 10ed220497b31182385ca3ac62cd07c20842a4db Mon Sep 17 00:00:00 2001
+From 2ea484783840b94206a1813a3ddad44e628af36c 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 092bcb73aa..6d8d942f03 100644
@@ -26 +27 @@
-@@ -608,7 +608,7 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -558,7 +558,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