patch 'net/nbl: fix mbuf headroom usage in packet Tx' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Feb 26 14:09:34 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/70d1d9f1c7cf97a2994d71e3640192ba7cf1c547
Thanks.
Kevin
---
>From 70d1d9f1c7cf97a2994d71e3640192ba7cf1c547 Mon Sep 17 00:00:00 2001
From: Dimon Zhao <dimon.zhao at nebula-matrix.com>
Date: Mon, 26 Jan 2026 18:52:18 -0800
Subject: [PATCH] net/nbl: fix mbuf headroom usage in packet Tx
[ upstream commit 8e138e870f9b52069afd3a328521d06c435fa275 ]
Only use mbuf headroom when mbuf->refcnt == 1,
indicating exclusive ownership. For shared mbufs (refcnt > 1),
use next desc instead to avoid data corruption.
This prevents modifying shared buffers that may be used by other
processing contexts.
Implementation details:
- Check mbuf->refcnt before using headroom
- For refcnt == 1: use existing headroom (performance optimal)
- For refcnt > 1: use next desc
Fixes: e5fc1f78c78c ("net/nbl: support Tx and Rx burst")
Signed-off-by: Dimon Zhao <dimon.zhao at nebula-matrix.com>
---
drivers/net/nbl/nbl_hw/nbl_txrx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/nbl/nbl_hw/nbl_txrx.c b/drivers/net/nbl/nbl_hw/nbl_txrx.c
index 9d92ab9992..93d9f0f7de 100644
--- a/drivers/net/nbl/nbl_hw/nbl_txrx.c
+++ b/drivers/net/nbl/nbl_hw/nbl_txrx.c
@@ -512,5 +512,8 @@ nbl_res_txrx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, u16 nb_pkts, u
}
- if (rte_pktmbuf_headroom(tx_pkt) >= required_headroom) {
+ if (rte_mbuf_refcnt_read(tx_pkt) == 1 &&
+ RTE_MBUF_DIRECT(tx_pkt) &&
+ tx_pkt->nb_segs == 1 &&
+ rte_pktmbuf_headroom(tx_pkt) >= required_headroom) {
can_push = 1;
u = rte_pktmbuf_mtod_offset(tx_pkt, union nbl_tx_extend_head *,
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-26 10:16:50.677077889 +0000
+++ 0092-net-nbl-fix-mbuf-headroom-usage-in-packet-Tx.patch 2026-02-26 10:16:47.036459609 +0000
@@ -1 +1 @@
-From 8e138e870f9b52069afd3a328521d06c435fa275 Mon Sep 17 00:00:00 2001
+From 70d1d9f1c7cf97a2994d71e3640192ba7cf1c547 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8e138e870f9b52069afd3a328521d06c435fa275 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list