patch 'mempool/cnxk: fix destroying empty pool' has been queued to stable release 21.11.3

Kevin Traynor ktraynor at redhat.com
Wed Nov 23 19:03:46 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.3

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/28/22. 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/08a6a565e788c323ce732422836b56dadb267e26

Thanks.

Kevin

---
>From 08a6a565e788c323ce732422836b56dadb267e26 Mon Sep 17 00:00:00 2001
From: Ashwin Sekhar T K <asekhar at marvell.com>
Date: Tue, 8 Nov 2022 12:25:58 +0530
Subject: [PATCH] mempool/cnxk: fix destroying empty pool

[ upstream commit 3af7276eafaf41a93e83a04636c1542e7c82018a ]

In scenarios where rte_mempool_free() is called immediately
after rte_mempool_create_empty(), the NPA pool will not be
created. In such cases the free path should not call
roc_npa_pool_destroy().

Fixes: bbf19e89b87c ("mempool/cnxk: add generic operations")

Signed-off-by: Ashwin Sekhar T K <asekhar at marvell.com>
---
 drivers/mempool/cnxk/cnxk_mempool_ops.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mempool/cnxk/cnxk_mempool_ops.c b/drivers/mempool/cnxk/cnxk_mempool_ops.c
index c7b75f026d..b3592d91dc 100644
--- a/drivers/mempool/cnxk/cnxk_mempool_ops.c
+++ b/drivers/mempool/cnxk/cnxk_mempool_ops.c
@@ -124,4 +124,12 @@ cnxk_mempool_free(struct rte_mempool *mp)
 
 	plt_npa_dbg("aura_handle=0x%" PRIx64, mp->pool_id);
+
+	/* It can happen that rte_mempool_free() is called immediately after
+	 * rte_mempool_create_empty(). In such cases the NPA pool will not be
+	 * allocated.
+	 */
+	if (roc_npa_aura_handle_to_base(mp->pool_id) == 0)
+		return;
+
 	rc = roc_npa_pool_destroy(mp->pool_id);
 	if (rc)
-- 
2.38.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-23 09:55:57.860284485 +0000
+++ 0033-mempool-cnxk-fix-destroying-empty-pool.patch	2022-11-23 09:55:57.071149312 +0000
@@ -1 +1 @@
-From 3af7276eafaf41a93e83a04636c1542e7c82018a Mon Sep 17 00:00:00 2001
+From 08a6a565e788c323ce732422836b56dadb267e26 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3af7276eafaf41a93e83a04636c1542e7c82018a ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index a0b94bb95c..3769afd3d1 100644
+index c7b75f026d..b3592d91dc 100644
@@ -23 +24 @@
-@@ -127,4 +127,12 @@ cnxk_mempool_free(struct rte_mempool *mp)
+@@ -124,4 +124,12 @@ cnxk_mempool_free(struct rte_mempool *mp)



More information about the stable mailing list