patch 'mempool/dpaa2: look up ops index locally in secondary' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:01:29 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.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 12/08/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/6934520dd789478528611701e4b785e81a21b907

Thanks.

Kevin

---
>From 6934520dd789478528611701e4b785e81a21b907 Mon Sep 17 00:00:00 2001
From: Jun Yang <jun.yang at nxp.com>
Date: Fri, 9 Oct 2026 16:20:19 +0530
Subject: [PATCH] mempool/dpaa2: look up ops index locally in secondary

[ upstream commit f0cc7c9fc84cc85bdbbd02b95a3c500f472cf465 ]

Secondary processes call rte_dpaa2_mpool_get_ops_idx() but the ops
index was registered only in the primary process, so the function
returned the sentinel RTE_MEMPOOL_MAX_OPS_IDX on every call in a
secondary. dpaa2_sec then compares mb_pool->ops_index against that
sentinel and always takes the MAX_BPID path.

The ops index is process-invariant: mempool ops are registered by a
constructor at library load time in the same link order in every
process. Fix rte_dpaa2_mpool_get_ops_idx() to scan rte_mempool_ops_table
by name ("dpaa2") locally and cache the result. No IPC round-trip is
needed.

Also fix a duplicated word in an error message in rte_hw_mbuf_create_pool
("Only single ops index only" -> "Single ops index only") and improve the
error log in rte_hw_mbuf_free_pool to include the pool name.

Fixes: de6a6e897fe6 ("mempool/dpaa2: add operation index")

Signed-off-by: Jun Yang <jun.yang at nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
Signed-off-by: Prashant Gupta <prashant.gupta_3 at nxp.com>
---
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index 02b6741853..9259625206 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -44,5 +44,23 @@ RTE_EXPORT_INTERNAL_SYMBOL(rte_dpaa2_mpool_get_ops_idx)
 int rte_dpaa2_mpool_get_ops_idx(void)
 {
-	return s_dpaa2_pool_ops_idx;
+	uint32_t i;
+
+	if (s_dpaa2_pool_ops_idx != RTE_MEMPOOL_MAX_OPS_IDX)
+		return s_dpaa2_pool_ops_idx;
+
+	/* Mempool ops are registered by constructor in the same order in
+	 * every process, so the index is process-invariant. Scan the ops
+	 * table locally and cache the result.
+	 */
+	for (i = 0; i < rte_mempool_ops_table.num_ops; i++) {
+		if (strcmp(rte_mempool_ops_table.ops[i].name,
+				DPAA2_MEMPOOL_OPS_NAME) == 0) {
+			s_dpaa2_pool_ops_idx = (int16_t)i;
+			return s_dpaa2_pool_ops_idx;
+		}
+	}
+
+	DPAA2_MEMPOOL_ERR("dpaa2 mempool ops not found");
+	return -ENOENT;
 }
 
@@ -131,5 +149,5 @@ rte_hw_mbuf_create_pool(struct rte_mempool *mp)
 		s_dpaa2_pool_ops_idx = mp->ops_index;
 	} else if (s_dpaa2_pool_ops_idx != mp->ops_index) {
-		DPAA2_MEMPOOL_ERR("Only single ops index only");
+		DPAA2_MEMPOOL_ERR("Single ops index only");
 		ret = -EINVAL;
 		goto err4;
@@ -187,5 +205,5 @@ rte_hw_mbuf_free_pool(struct rte_mempool *mp)
 
 	if (!mp->pool_data) {
-		DPAA2_MEMPOOL_ERR("Not a valid dpaa2 buffer pool");
+		DPAA2_MEMPOOL_ERR("Not a valid dpaa2 buffer pool %s", mp->name);
 		return;
 	}
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:43.888772424 +0000
+++ 0163-mempool-dpaa2-look-up-ops-index-locally-in-secondary.patch	2026-12-03 12:52:39.143046153 +0000
@@ -1 +1 @@
-From f0cc7c9fc84cc85bdbbd02b95a3c500f472cf465 Mon Sep 17 00:00:00 2001
+From 6934520dd789478528611701e4b785e81a21b907 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f0cc7c9fc84cc85bdbbd02b95a3c500f472cf465 ]
+
@@ -23 +24,0 @@
-Cc: stable at dpdk.org
@@ -33 +34 @@
-index ee001d8ce0..4186e25ec3 100644
+index 02b6741853..9259625206 100644
@@ -61 +62 @@
-@@ -129,5 +147,5 @@ rte_hw_mbuf_create_pool(struct rte_mempool *mp)
+@@ -131,5 +149,5 @@ rte_hw_mbuf_create_pool(struct rte_mempool *mp)
@@ -68 +69 @@
-@@ -173,5 +191,5 @@ rte_hw_mbuf_free_pool(struct rte_mempool *mp)
+@@ -187,5 +205,5 @@ rte_hw_mbuf_free_pool(struct rte_mempool *mp)



More information about the stable mailing list