[dpdk-stable] patch 'service: propagate init error in EAL' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:16:44 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/07/21. 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/43447841b4c02597a6d47d2b4de11d932f141a2f

Thanks.

Luca Boccassi

---
>From 43447841b4c02597a6d47d2b4de11d932f141a2f Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz at 6wind.com>
Date: Wed, 13 Jan 2021 09:28:06 +0100
Subject: [PATCH] service: propagate init error in EAL

[ upstream commit de6aede17bd3abe51478f33131a4c41da83c42da ]

Currently, when rte_service_init() fails at initialization, the
application always gets a ENOEXEC error code. For example, with testpmd,
this is displayed as:

  Cannot init EAL: Exec format error

This error code does not describe the real issue. Instead, use the error
code returned by the function.

Fixes: e39824500825 ("service: initialize with EAL")

Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
Acked-by: Harry van Haaren <harry.van.haaren at intel.com>
---
 lib/librte_eal/freebsd/eal.c | 4 ++--
 lib/librte_eal/linux/eal.c   | 4 ++--
 lib/librte_eal/windows/eal.c | 6 ++++--
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index d6ea023750..51478358c7 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -906,7 +906,7 @@ rte_eal_init(int argc, char **argv)
 	ret = rte_service_init();
 	if (ret) {
 		rte_eal_init_alert("rte_service_init() failed");
-		rte_errno = ENOEXEC;
+		rte_errno = -ret;
 		return -1;
 	}
 
@@ -922,7 +922,7 @@ rte_eal_init(int argc, char **argv)
 	 */
 	ret = rte_service_start_with_defaults();
 	if (ret < 0 && ret != -ENOTSUP) {
-		rte_errno = ENOEXEC;
+		rte_errno = -ret;
 		return -1;
 	}
 
diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
index a4161be630..32b48c3de9 100644
--- a/lib/librte_eal/linux/eal.c
+++ b/lib/librte_eal/linux/eal.c
@@ -1273,7 +1273,7 @@ rte_eal_init(int argc, char **argv)
 	ret = rte_service_init();
 	if (ret) {
 		rte_eal_init_alert("rte_service_init() failed");
-		rte_errno = ENOEXEC;
+		rte_errno = -ret;
 		return -1;
 	}
 
@@ -1295,7 +1295,7 @@ rte_eal_init(int argc, char **argv)
 	 */
 	ret = rte_service_start_with_defaults();
 	if (ret < 0 && ret != -ENOTSUP) {
-		rte_errno = ENOEXEC;
+		rte_errno = -ret;
 		return -1;
 	}
 
diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
index 105549de1b..1e5f6576f0 100644
--- a/lib/librte_eal/windows/eal.c
+++ b/lib/librte_eal/windows/eal.c
@@ -264,6 +264,7 @@ rte_eal_init(int argc, char **argv)
 	const struct rte_config *config = rte_eal_get_configuration();
 	struct internal_config *internal_conf =
 		eal_get_internal_configuration();
+	int ret;
 
 	rte_eal_log_init(NULL, 0);
 
@@ -387,9 +388,10 @@ rte_eal_init(int argc, char **argv)
 	}
 
 	/* Initialize services so drivers can register services during probe. */
-	if (rte_service_init()) {
+	ret = rte_service_init();
+	if (ret) {
 		rte_eal_init_alert("rte_service_init() failed");
-		rte_errno = ENOEXEC;
+		rte_errno = -ret;
 		return -1;
 	}
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.508377088 +0000
+++ 0118-service-propagate-init-error-in-EAL.patch	2021-02-05 11:18:28.994694692 +0000
@@ -1 +1 @@
-From de6aede17bd3abe51478f33131a4c41da83c42da Mon Sep 17 00:00:00 2001
+From 43447841b4c02597a6d47d2b4de11d932f141a2f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit de6aede17bd3abe51478f33131a4c41da83c42da ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list