[dpdk-stable] patch 'service: use log for error messages' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 3 19:26:48 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

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/10/19. 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-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/e2c0ff84083d12c4bbd60ea4c27535e20d9a0bfd

Thanks.

Kevin.

---
>From e2c0ff84083d12c4bbd60ea4c27535e20d9a0bfd Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 21 Aug 2019 10:12:52 +0100
Subject: [PATCH] service: use log for error messages

[ upstream commit a8f8ae1cf9b68f6398b49019ca07a215a57bba41 ]

EAL should always use rte_log instead of putting errors to
stderr (which maybe redirected to /dev/null in a daemon).

Also checks for null before rte_free are unnecessary.
Minor code consistency improvements.

Fixes: 21698354c832 ("service: introduce service cores concept")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
Acked-by: Harry van Haaren <harry.van.haaren at intel.com>
---
 lib/librte_eal/common/rte_service.c | 27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index 0f3695c4b..e7d3e5144 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -72,8 +72,10 @@ static struct core_state *lcore_states;
 static uint32_t rte_service_library_initialized;
 
-int32_t rte_service_init(void)
+int32_t
+rte_service_init(void)
 {
 	if (rte_service_library_initialized) {
-		printf("service library init() called, init flag %d\n",
+		RTE_LOG(NOTICE, EAL,
+			"service library init() called, init flag %d\n",
 			rte_service_library_initialized);
 		return -EALREADY;
@@ -84,5 +86,5 @@ int32_t rte_service_init(void)
 			RTE_CACHE_LINE_SIZE);
 	if (!rte_services) {
-		printf("error allocating rte services array\n");
+		RTE_LOG(ERR, EAL, "error allocating rte services array\n");
 		goto fail_mem;
 	}
@@ -91,5 +93,5 @@ int32_t rte_service_init(void)
 			sizeof(struct core_state), RTE_CACHE_LINE_SIZE);
 	if (!lcore_states) {
-		printf("error allocating core states array\n");
+		RTE_LOG(ERR, EAL, "error allocating core states array\n");
 		goto fail_mem;
 	}
@@ -110,8 +112,6 @@ int32_t rte_service_init(void)
 	return 0;
 fail_mem:
-	if (rte_services)
-		rte_free(rte_services);
-	if (lcore_states)
-		rte_free(lcore_states);
+	rte_free(rte_services);
+	rte_free(lcore_states);
 	return -ENOMEM;
 }
@@ -123,9 +123,6 @@ rte_service_finalize(void)
 		return;
 
-	if (rte_services)
-		rte_free(rte_services);
-
-	if (lcore_states)
-		rte_free(lcore_states);
+	rte_free(rte_services);
+	rte_free(lcore_states);
 
 	rte_service_library_initialized = 0;
@@ -399,6 +396,6 @@ rte_service_may_be_active(uint32_t id)
 }
 
-int32_t rte_service_run_iter_on_app_lcore(uint32_t id,
-		uint32_t serialize_mt_unsafe)
+int32_t
+rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe)
 {
 	/* run service on calling core, using all-ones as the service mask */
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.075964287 +0000
+++ 0039-service-use-log-for-error-messages.patch	2019-12-03 17:29:51.764749662 +0000
@@ -1 +1 @@
-From a8f8ae1cf9b68f6398b49019ca07a215a57bba41 Mon Sep 17 00:00:00 2001
+From e2c0ff84083d12c4bbd60ea4c27535e20d9a0bfd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a8f8ae1cf9b68f6398b49019ca07a215a57bba41 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index c3653ebae..fe0907720 100644
+index 0f3695c4b..e7d3e5144 100644
@@ -26 +27 @@
-@@ -71,8 +71,10 @@ static struct core_state *lcore_states;
+@@ -72,8 +72,10 @@ static struct core_state *lcore_states;
@@ -39 +40 @@
-@@ -83,5 +85,5 @@ int32_t rte_service_init(void)
+@@ -84,5 +86,5 @@ int32_t rte_service_init(void)
@@ -46 +47 @@
-@@ -90,5 +92,5 @@ int32_t rte_service_init(void)
+@@ -91,5 +93,5 @@ int32_t rte_service_init(void)
@@ -53 +54 @@
-@@ -109,8 +111,6 @@ int32_t rte_service_init(void)
+@@ -110,8 +112,6 @@ int32_t rte_service_init(void)
@@ -64 +65 @@
-@@ -122,9 +122,6 @@ rte_service_finalize(void)
+@@ -123,9 +123,6 @@ rte_service_finalize(void)
@@ -76 +77 @@
-@@ -398,6 +395,6 @@ rte_service_may_be_active(uint32_t id)
+@@ -399,6 +396,6 @@ rte_service_may_be_active(uint32_t id)



More information about the stable mailing list