patch 'pdump: fix error number on IPC response' has been queued to stable release 20.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 23 17:17:06 CET 2023


Hi,

FYI, your patch has been queued to stable release 20.11.10

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/25/23. 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/00d4567c7245620b51477b2388f65c1d0daf8212

Thanks.

Luca Boccassi

---
>From 00d4567c7245620b51477b2388f65c1d0daf8212 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Fri, 17 Nov 2023 08:35:55 -0800
Subject: [PATCH] pdump: fix error number on IPC response
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 5ec9575d8c0abfcefbc353d540f228d6d7036fe6 ]

The response from MP server sets err_value to negative
on error. The convention for rte_errno is to use a positive
value on error. This makes errors like duplicate registration
show up with the correct error value.

Fixes: 660098d61f57 ("pdump: use generic multi-process channel")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
---
 lib/librte_pdump/rte_pdump.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c
index 29eafaa101..746005af60 100644
--- a/lib/librte_pdump/rte_pdump.c
+++ b/lib/librte_pdump/rte_pdump.c
@@ -473,9 +473,10 @@ pdump_prepare_client_request(char *device, uint16_t queue,
 	if (rte_mp_request_sync(&mp_req, &mp_reply, &ts) == 0) {
 		mp_rep = &mp_reply.msgs[0];
 		resp = (struct pdump_response *)mp_rep->param;
-		rte_errno = resp->err_value;
-		if (!resp->err_value)
+		if (resp->err_value == 0)
 			ret = 0;
+		else
+			rte_errno = -resp->err_value;
 		free(mp_reply.msgs);
 	}
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-11-23 16:15:19.459000728 +0000
+++ 0006-pdump-fix-error-number-on-IPC-response.patch	2023-11-23 16:15:19.215058380 +0000
@@ -1 +1 @@
-From 5ec9575d8c0abfcefbc353d540f228d6d7036fe6 Mon Sep 17 00:00:00 2001
+From 00d4567c7245620b51477b2388f65c1d0daf8212 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 5ec9575d8c0abfcefbc353d540f228d6d7036fe6 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
- lib/pdump/rte_pdump.c | 5 +++--
+ lib/librte_pdump/rte_pdump.c | 5 +++--
@@ -23,5 +24,5 @@
-diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c
-index 80b90c6f7d..e94f49e212 100644
---- a/lib/pdump/rte_pdump.c
-+++ b/lib/pdump/rte_pdump.c
-@@ -564,9 +564,10 @@ pdump_prepare_client_request(const char *device, uint16_t queue,
+diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c
+index 29eafaa101..746005af60 100644
+--- a/lib/librte_pdump/rte_pdump.c
++++ b/lib/librte_pdump/rte_pdump.c
+@@ -473,9 +473,10 @@ pdump_prepare_client_request(char *device, uint16_t queue,


More information about the stable mailing list