patch 'net/dpaa2: fix error packet dump' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Wed Apr 1 13:56:49 CEST 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 04/03/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/5b14b1f4d6d6dc17d309e1c0cf297ff565bd2283
Thanks.
Kevin
---
>From 5b14b1f4d6d6dc17d309e1c0cf297ff565bd2283 Mon Sep 17 00:00:00 2001
From: Maxime Leroy <maxime at leroys.fr>
Date: Wed, 25 Mar 2026 21:45:35 +0100
Subject: [PATCH] net/dpaa2: fix error packet dump
[ upstream commit e7cd393f30a232165f75bb003b9e2e8d92208132 ]
Fix three bugs in dump_err_pkts().
1. NULL pointer dereference: mbuf was checked for NULL but then
dereferenced unconditionally on the next line.
2. Memory leak on multi-segment packets: the while loop walked
mbuf to NULL, so the subsequent rte_pktmbuf_free(mbuf) was a
no-op and the packet was never freed. Use a separate iterator
variable and free the original mbuf pointer.
3. Segment index not reset between packets: variable i was
initialized once at function scope and never reset inside the
do/while loop, so hexdump titles had wrong segment numbers.
Make it local to the multi-segment block.
Not tested, found by code review.
Fixes: f9465bdcef9d ("net/dpaa2: fix error frame dump")
Reported-by: Stephen Hemminger <stephen at networkplumber.org>
Signed-off-by: Maxime Leroy <maxime at leroys.fr>
Acked-by: Hemant Agrawal <hemant.agrawal at nxp.com>
---
drivers/net/dpaa2/dpaa2_rxtx.c | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 5a98f295a7..0de52cbef2 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -652,5 +652,5 @@ dump_err_pkts(struct dpaa2_queue *dpaa2_q)
struct qbman_pull_desc pulldesc;
struct rte_eth_dev_data *eth_data = dpaa2_q->eth_data;
- uint32_t lcore_id = rte_lcore_id(), i = 0;
+ uint32_t lcore_id = rte_lcore_id();
void *v_addr, *hw_annot_addr;
struct dpaa2_fas *fas;
@@ -727,22 +727,25 @@ dump_err_pkts(struct dpaa2_queue *dpaa2_q)
fas->status);
- if (mbuf)
+ if (mbuf) {
__rte_mbuf_sanity_check(mbuf, 1);
- if (mbuf->nb_segs > 1) {
- while (mbuf) {
- sprintf(title, "Payload seg[%d]", i);
- rte_hexdump(stderr, title,
+ if (mbuf->nb_segs > 1) {
+ struct rte_mbuf *seg = mbuf;
+ int i = 0;
+
+ while (seg) {
+ sprintf(title, "Payload seg[%d]", i);
+ rte_hexdump(stderr, title,
+ (char *)seg->buf_addr + seg->data_off,
+ seg->data_len);
+ seg = seg->next;
+ i++;
+ }
+ } else {
+ rte_hexdump(stderr, "Payload",
(char *)mbuf->buf_addr + mbuf->data_off,
mbuf->data_len);
- mbuf = mbuf->next;
- i++;
}
- } else {
- rte_hexdump(stderr, "Payload",
- (char *)mbuf->buf_addr + mbuf->data_off,
- mbuf->data_len);
+ rte_pktmbuf_free(mbuf);
}
-
- rte_pktmbuf_free(mbuf);
dq_storage++;
num_rx++;
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-04-01 12:56:52.327111720 +0100
+++ 0011-net-dpaa2-fix-error-packet-dump.patch 2026-04-01 12:56:52.016194214 +0100
@@ -1 +1 @@
-From e7cd393f30a232165f75bb003b9e2e8d92208132 Mon Sep 17 00:00:00 2001
+From 5b14b1f4d6d6dc17d309e1c0cf297ff565bd2283 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e7cd393f30a232165f75bb003b9e2e8d92208132 ]
+
@@ -24 +25,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list