From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1EE3CA04F0 for ; Tue, 3 Dec 2019 19:28:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E79F81BF9E; Tue, 3 Dec 2019 19:28:46 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 61E591BF97 for ; Tue, 3 Dec 2019 19:28:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575397725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oTD8m5hjfo5nlJDFbeYcrHX/yVv4iwIbfQoHWndlzbs=; b=WLWivGEKkl2uW/fdf44EYJVEJ/yOVAsuzaxwz5mgjo3N+NIuBBpK6nV40E37moak+6bjPw 1VpJ5SL4ls5XD4EWQZcjyKU6K4aijVYjI/iL+Y7YEmMnVnMe9WkcDQkS/lm6RJYKOeflsw zfwwc3AUrmN41fRxnrwdLX9WnpWJC9c= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-26-D0PzOEYeMTG3QlEW3r7qJA-1; Tue, 03 Dec 2019 13:28:42 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BD6AF10054E3; Tue, 3 Dec 2019 18:28:41 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-10.ams2.redhat.com [10.36.117.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id B882A5C240; Tue, 3 Dec 2019 18:28:40 +0000 (UTC) From: Kevin Traynor To: Stephen Hemminger Cc: Harry van Haaren , dpdk stable Date: Tue, 3 Dec 2019 18:26:48 +0000 Message-Id: <20191203182714.17297-39-ktraynor@redhat.com> In-Reply-To: <20191203182714.17297-1-ktraynor@redhat.com> References: <20191203182714.17297-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: D0PzOEYeMTG3QlEW3r7qJA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'service: use log for error messages' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 rebasi= ng (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/e2c0ff84083d12c4bb= d60ea4c27535e20d9a0bfd Thanks. Kevin. --- >From e2c0ff84083d12c4bbd60ea4c27535e20d9a0bfd Mon Sep 17 00:00:00 2001 From: Stephen Hemminger 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 Signed-off-by: Harry van Haaren Acked-by: Harry van Haaren --- 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/rt= e_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; =20 -int32_t rte_service_init(void) +int32_t +rte_service_init(void) { =09if (rte_service_library_initialized) { -=09=09printf("service library init() called, init flag %d\n", +=09=09RTE_LOG(NOTICE, EAL, +=09=09=09"service library init() called, init flag %d\n", =09=09=09rte_service_library_initialized); =09=09return -EALREADY; @@ -84,5 +86,5 @@ int32_t rte_service_init(void) =09=09=09RTE_CACHE_LINE_SIZE); =09if (!rte_services) { -=09=09printf("error allocating rte services array\n"); +=09=09RTE_LOG(ERR, EAL, "error allocating rte services array\n"); =09=09goto fail_mem; =09} @@ -91,5 +93,5 @@ int32_t rte_service_init(void) =09=09=09sizeof(struct core_state), RTE_CACHE_LINE_SIZE); =09if (!lcore_states) { -=09=09printf("error allocating core states array\n"); +=09=09RTE_LOG(ERR, EAL, "error allocating core states array\n"); =09=09goto fail_mem; =09} @@ -110,8 +112,6 @@ int32_t rte_service_init(void) =09return 0; fail_mem: -=09if (rte_services) -=09=09rte_free(rte_services); -=09if (lcore_states) -=09=09rte_free(lcore_states); +=09rte_free(rte_services); +=09rte_free(lcore_states); =09return -ENOMEM; } @@ -123,9 +123,6 @@ rte_service_finalize(void) =09=09return; =20 -=09if (rte_services) -=09=09rte_free(rte_services); - -=09if (lcore_states) -=09=09rte_free(lcore_states); +=09rte_free(rte_services); +=09rte_free(lcore_states); =20 =09rte_service_library_initialized =3D 0; @@ -399,6 +396,6 @@ rte_service_may_be_active(uint32_t id) } =20 -int32_t rte_service_run_iter_on_app_lcore(uint32_t id, -=09=09uint32_t serialize_mt_unsafe) +int32_t +rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsaf= e) { =09/* run service on calling core, using all-ones as the service mask */ --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-03 17:29:54.075964287 +0000 +++ 0039-service-use-log-for-error-messages.patch=092019-12-03 17:29:51.764= 749662 +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@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)