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 764CDA04A3 for ; Fri, 5 Jun 2020 20:26:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5F2A91D515; Fri, 5 Jun 2020 20:26:18 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 50AC91D515 for ; Fri, 5 Jun 2020 20:26:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591381576; 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=S/7lmE94/x0TDuUz+4giuAd/ydS37UZNUxtDkfbo7+Q=; b=Q/o2sfVzOHED5ZHT9h8RXcZDw7o97szeHmDiwmObuuZOxQIU87I2KEyLJFVwUg2AsVvOVF 567CX1MRbOcXDnzfGmibWd218hRiVKsc4DWEwaUQx4/6L8lKvFUvv2LE4XXDNkOS9anwDp piE8hYpoRKcjSWhJ2PTtZdfJKaWP1Og= 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-306-Eo7qDUWaNt6fwKK-mnRQgw-1; Fri, 05 Jun 2020 14:26:13 -0400 X-MC-Unique: Eo7qDUWaNt6fwKK-mnRQgw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0B5D6107B7C6; Fri, 5 Jun 2020 18:26:12 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id F0925619D3; Fri, 5 Jun 2020 18:26:09 +0000 (UTC) From: Kevin Traynor To: Phil Yang Cc: Honnappa Nagarahalli , Harry van Haaren , dpdk stable Date: Fri, 5 Jun 2020 19:24:18 +0100 Message-Id: <20200605182525.22483-21-ktraynor@redhat.com> In-Reply-To: <20200605182525.22483-1-ktraynor@redhat.com> References: <20200605182525.22483-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'service: remove rte prefix from static functions' has been queued to LTS release 18.11.9 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.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/10/20. 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/074b26486c5303b1d70888152e141a659feb77c4 Thanks. Kevin. --- >From 074b26486c5303b1d70888152e141a659feb77c4 Mon Sep 17 00:00:00 2001 From: Phil Yang Date: Wed, 6 May 2020 23:28:01 +0800 Subject: [PATCH] service: remove rte prefix from static functions [ upstream commit 7a0ad72f6e1fc31e020af77d102dc2f1e67d52b9 ] clean up rte prefix from static functions. remove unused parameter for service_dump_one function. Signed-off-by: Phil Yang Reviewed-by: Honnappa Nagarahalli Acked-by: Harry van Haaren --- lib/librte_eal/common/rte_service.c | 36 ++++++++++------------------- 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c index 0030e44e94..607f9a0407 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -340,6 +340,6 @@ rte_service_runstate_get(uint32_t id) static inline void -rte_service_runner_do_callback(struct rte_service_spec_impl *s, - struct core_state *cs, uint32_t service_idx) +service_runner_do_callback(struct rte_service_spec_impl *s, + struct core_state *cs, uint32_t service_idx) { void *userdata = s->spec.callback_userdata; @@ -378,8 +378,8 @@ service_run(uint32_t i, struct core_state *cs, uint64_t service_mask, return -EBUSY; - rte_service_runner_do_callback(s, cs, i); + service_runner_do_callback(s, cs, i); rte_atomic32_clear(&s->execute_lock); } else - rte_service_runner_do_callback(s, cs, i); + service_runner_do_callback(s, cs, i); return 0; @@ -425,5 +425,5 @@ rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe) static int32_t -rte_service_runner_func(void *arg) +service_runner_func(void *arg) { RTE_SET_USED(arg); @@ -432,5 +432,5 @@ rte_service_runner_func(void *arg) struct core_state *cs = &lcore_states[lcore]; - while (lcore_states[lcore].runstate == RUNSTATE_RUNNING) { + while (cs->runstate == RUNSTATE_RUNNING) { const uint64_t service_mask = cs->service_mask; @@ -693,7 +693,7 @@ rte_service_lcore_start(uint32_t lcore) * return immediately as runstate keeps it in the service poll loop */ - lcore_states[lcore].runstate = RUNSTATE_RUNNING; + cs->runstate = RUNSTATE_RUNNING; - int ret = rte_eal_remote_launch(rte_service_runner_func, 0, lcore); + int ret = rte_eal_remote_launch(service_runner_func, 0, lcore); /* returns -EBUSY if the core is already launched, 0 on success */ return ret; @@ -774,11 +774,7 @@ rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id, static void -rte_service_dump_one(FILE *f, struct rte_service_spec_impl *s, - uint64_t all_cycles, uint32_t reset) +service_dump_one(FILE *f, struct rte_service_spec_impl *s, uint32_t reset) { /* avoid divide by zero */ - if (all_cycles == 0) - all_cycles = 1; - int calls = 1; if (s->calls != 0) @@ -807,5 +803,5 @@ rte_service_attr_reset_all(uint32_t id) int reset = 1; - rte_service_dump_one(NULL, s, 0, reset); + service_dump_one(NULL, s, reset); return 0; } @@ -851,12 +847,4 @@ rte_service_dump(FILE *f, uint32_t id) int print_one = (id != UINT32_MAX); - uint64_t total_cycles = 0; - - for (i = 0; i < RTE_SERVICE_NUM_MAX; i++) { - if (!service_valid(i)) - continue; - total_cycles += rte_services[i].cycles_spent; - } - /* print only the specified service */ if (print_one) { @@ -865,5 +853,5 @@ rte_service_dump(FILE *f, uint32_t id) fprintf(f, "Service %s Summary\n", s->spec.name); uint32_t reset = 0; - rte_service_dump_one(f, s, total_cycles, reset); + service_dump_one(f, s, reset); return 0; } @@ -875,5 +863,5 @@ rte_service_dump(FILE *f, uint32_t id) continue; uint32_t reset = 0; - rte_service_dump_one(f, &rte_services[i], total_cycles, reset); + service_dump_one(f, &rte_services[i], reset); } -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-06-05 19:20:52.063309190 +0100 +++ 0021-service-remove-rte-prefix-from-static-functions.patch 2020-06-05 19:20:50.742042358 +0100 @@ -1 +1 @@ -From 7a0ad72f6e1fc31e020af77d102dc2f1e67d52b9 Mon Sep 17 00:00:00 2001 +From 074b26486c5303b1d70888152e141a659feb77c4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7a0ad72f6e1fc31e020af77d102dc2f1e67d52b9 ] + @@ -17 +19 @@ -index c283408cf1..94266e83ff 100644 +index 0030e44e94..607f9a0407 100644 @@ -20 +22 @@ -@@ -341,6 +341,6 @@ rte_service_runstate_get(uint32_t id) +@@ -340,6 +340,6 @@ rte_service_runstate_get(uint32_t id) @@ -29 +31 @@ -@@ -379,8 +379,8 @@ service_run(uint32_t i, struct core_state *cs, uint64_t service_mask, +@@ -378,8 +378,8 @@ service_run(uint32_t i, struct core_state *cs, uint64_t service_mask, @@ -40 +42 @@ -@@ -426,5 +426,5 @@ rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe) +@@ -425,5 +425,5 @@ rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe) @@ -47 +49 @@ -@@ -433,5 +433,5 @@ rte_service_runner_func(void *arg) +@@ -432,5 +432,5 @@ rte_service_runner_func(void *arg) @@ -54 +56 @@ -@@ -694,7 +694,7 @@ rte_service_lcore_start(uint32_t lcore) +@@ -693,7 +693,7 @@ rte_service_lcore_start(uint32_t lcore) @@ -64 +66 @@ -@@ -775,11 +775,7 @@ rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id, +@@ -774,11 +774,7 @@ rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id, @@ -77 +79 @@ -@@ -808,5 +804,5 @@ rte_service_attr_reset_all(uint32_t id) +@@ -807,5 +803,5 @@ rte_service_attr_reset_all(uint32_t id) @@ -84 +86 @@ -@@ -852,12 +848,4 @@ rte_service_dump(FILE *f, uint32_t id) +@@ -851,12 +847,4 @@ rte_service_dump(FILE *f, uint32_t id) @@ -97 +99 @@ -@@ -866,5 +854,5 @@ rte_service_dump(FILE *f, uint32_t id) +@@ -865,5 +853,5 @@ rte_service_dump(FILE *f, uint32_t id) @@ -104 +106 @@ -@@ -876,5 +864,5 @@ rte_service_dump(FILE *f, uint32_t id) +@@ -875,5 +863,5 @@ rte_service_dump(FILE *f, uint32_t id)