patch 'bus/dpaa: simplify buffer release loop' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Nov 20 21:29:30 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/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/144849084de84de59f97630e31f26b0746372a2e

Thanks.

Luca Boccassi

---
>From 144849084de84de59f97630e31f26b0746372a2e Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh at nxp.com>
Date: Mon, 16 Nov 2026 09:36:35 +0530
Subject: [PATCH] bus/dpaa: simplify buffer release loop

[ upstream commit be1da31963eeaa11cf01dfbab971911dd73ffb57 ]

bman_release() computed i = num - 1 before the num == 0 bounds check,
which only exists under RTE_LIBRTE_DPAA_HWDEBUG. With that debug flag
disabled and num == 0, i wraps to UINT32_MAX, and the subsequent
'if (i)' guard is then always taken regardless of num, relying on the
for loop's own bound to do nothing. The indirection added no value and
obscured the num == 0 handling.

Drop the i = num - 1 initializer and the if (i) wrapper, relying
solely on the for (i = 1; i < num; i++) loop condition, matching the
simpler pattern already used in bman_release_fast().

Fixes: f38f61e982f8 ("bus/dpaa: add BMAN hardware interfaces")

Signed-off-by: Gagandeep Singh <g.singh at nxp.com>
---
 drivers/bus/dpaa/base/qbman/bman.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/bman.c b/drivers/bus/dpaa/base/qbman/bman.c
index 8a6290734f..a10979b0f0 100644
--- a/drivers/bus/dpaa/base/qbman/bman.c
+++ b/drivers/bus/dpaa/base/qbman/bman.c
@@ -252,7 +252,7 @@ int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
 {
 	struct bman_portal *p;
 	struct bm_rcr_entry *r;
-	u32 i = num - 1;
+	u32 i;
 	u8 avail;
 
 #ifdef RTE_LIBRTE_DPAA_HWDEBUG
@@ -277,11 +277,9 @@ int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
 	r->bufs[0].opaque =
 		cpu_to_be64(((u64)pool->params.bpid << 48) |
 			    (bufs[0].opaque & BMAN_BUF_MASK));
-	if (i) {
-		for (i = 1; i < num; i++)
-			r->bufs[i].opaque =
-				cpu_to_be64(bufs[i].opaque & BMAN_BUF_MASK);
-	}
+	for (i = 1; i < num; i++)
+		r->bufs[i].opaque =
+			cpu_to_be64(bufs[i].opaque & BMAN_BUF_MASK);
 
 	bm_rcr_pvb_commit(&p->p, BM_RCR_VERB_CMD_BPID_SINGLE |
 			  (num & BM_RCR_VERB_BUFCOUNT_MASK));
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-11-20 20:29:05.262764956 +0000
+++ 0001-bus-dpaa-simplify-buffer-release-loop.patch	2026-11-20 20:29:05.164111862 +0000
@@ -1 +1 @@
-From be1da31963eeaa11cf01dfbab971911dd73ffb57 Mon Sep 17 00:00:00 2001
+From 144849084de84de59f97630e31f26b0746372a2e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit be1da31963eeaa11cf01dfbab971911dd73ffb57 ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 76e612662f..31114b2d57 100644
+index 8a6290734f..a10979b0f0 100644
@@ -29 +30 @@
-@@ -304,7 +304,7 @@ int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
+@@ -252,7 +252,7 @@ int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
@@ -38 +39 @@
-@@ -329,11 +329,9 @@ int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
+@@ -277,11 +277,9 @@ int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
@@ -41 +42 @@
- 			    (bufs[0].opaque & MAX_U48));
+ 			    (bufs[0].opaque & BMAN_BUF_MASK));
@@ -45 +46 @@
--				cpu_to_be64(bufs[i].opaque & MAX_U48);
+-				cpu_to_be64(bufs[i].opaque & BMAN_BUF_MASK);
@@ -49 +50 @@
-+			cpu_to_be64(bufs[i].opaque & MAX_U48);
++			cpu_to_be64(bufs[i].opaque & BMAN_BUF_MASK);


More information about the stable mailing list