patch 'mempool: fix errno in empty create' has been queued to stable release 23.11.4

Xueming Li xuemingl at nvidia.com
Tue Feb 18 13:35:23 CET 2025


Hi,

FYI, your patch has been queued to stable release 23.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=5a7e0e1cfe70bc32fc87ef7141fac01bc27ae73f

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 5a7e0e1cfe70bc32fc87ef7141fac01bc27ae73f Mon Sep 17 00:00:00 2001
From: Ariel Otilibili <ariel.otilibili at 6wind.com>
Date: Mon, 20 Jan 2025 13:21:55 +0100
Subject: [PATCH] mempool: fix errno in empty create
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit a81d8ceff4e961995c78df6dbc9353dbbfbd8c32 ]

When returning from rte_mempool_set_ops_byname(), rte_errno is not set
for error exits.

The API requires rte_errno to be set in that case.

Bugzilla ID: 1559
Fixes: c2c6b2f41305 ("mempool: fix default ops for an empty mempool")

Signed-off-by: Ariel Otilibili <ariel.otilibili at 6wind.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
---
 lib/mempool/rte_mempool.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c
index 7a7a9bf6db..038bd967ab 100644
--- a/lib/mempool/rte_mempool.c
+++ b/lib/mempool/rte_mempool.c
@@ -927,8 +927,10 @@ rte_mempool_create_empty(const char *name, unsigned n, unsigned elt_size,
 	else
 		ret = rte_mempool_set_ops_byname(mp, "ring_mp_mc", NULL);

-	if (ret)
+	if (ret) {
+		rte_errno = -ret;
 		goto exit_unlock;
+	}

 	/*
 	 * local_cache pointer is set even if cache_size is zero.
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-02-18 19:39:03.739092212 +0800
+++ 0088-mempool-fix-errno-in-empty-create.patch	2025-02-18 19:39:00.738244029 +0800
@@ -1 +1 @@
-From a81d8ceff4e961995c78df6dbc9353dbbfbd8c32 Mon Sep 17 00:00:00 2001
+From 5a7e0e1cfe70bc32fc87ef7141fac01bc27ae73f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit a81d8ceff4e961995c78df6dbc9353dbbfbd8c32 ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index d8e39e5c20..1e4f24783c 100644
+index 7a7a9bf6db..038bd967ab 100644
@@ -26 +28 @@
-@@ -928,8 +928,10 @@ rte_mempool_create_empty(const char *name, unsigned n, unsigned elt_size,
+@@ -927,8 +927,10 @@ rte_mempool_create_empty(const char *name, unsigned n, unsigned elt_size,


More information about the stable mailing list