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

Xueming Li xuemingl at nvidia.com
Mon Dec 11 11:12:11 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

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/13/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=578b87a95557d1d351fdf0b121710d6215b89edc

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 578b87a95557d1d351fdf0b121710d6215b89edc 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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/pdump/rte_pdump.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c
index 4b7a4b3483..63835a1a67 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,
 	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.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-11 17:56:26.525606600 +0800
+++ 0106-pdump-fix-error-number-on-IPC-response.patch	2023-12-11 17:56:23.217652300 +0800
@@ -1 +1 @@
-From 5ec9575d8c0abfcefbc353d540f228d6d7036fe6 Mon Sep 17 00:00:00 2001
+From 578b87a95557d1d351fdf0b121710d6215b89edc Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 5ec9575d8c0abfcefbc353d540f228d6d7036fe6 ]
@@ -15 +17,0 @@
-Cc: stable at dpdk.org
@@ -24 +26 @@
-index 80b90c6f7d..e94f49e212 100644
+index 4b7a4b3483..63835a1a67 100644


More information about the stable mailing list