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 36B40A0093 for ; Tue, 19 May 2020 15:14:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2C9C31D904; Tue, 19 May 2020 15:14:28 +0200 (CEST) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by dpdk.org (Postfix) with ESMTP id 320EA1D918 for ; Tue, 19 May 2020 15:14:27 +0200 (CEST) Received: by mail-wr1-f47.google.com with SMTP id l11so15933882wru.0 for ; Tue, 19 May 2020 06:14:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jzMmfiJIvE9cB3wr9EMF0tjaI+Ht0HcPOLPsxQzvBHI=; b=eJjy4kGqKh/t/r3sOOT7GoIo1PCP6yhY7YvbRV57sZLlLKwBYpPzzGhjcrbndKK8v8 /6Q5dytiQkan0AqNXgbApMV8xT8sMr45pM6U9lNwIWykDv6pbYmvRzQEaKL0MXi7mt3T UhoVYXTSQWviB+jLAWTjIBkviWS/PEIoit3JvjxJ6vf2siZJxC35bsyIFGJuOAAC6ZWu 3Vjmv4/kvbn7tIeygldo5n4SqzbL2ygng6Qy74J39POl2ReTAxRuOHOCrDxNGEX9ZYec OwzmY6SEwLTpNuT4WXpeUeIznNhe5S194XTDViXoregJc9/42CaYNpmUgFjtgWO+tVHJ jM7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jzMmfiJIvE9cB3wr9EMF0tjaI+Ht0HcPOLPsxQzvBHI=; b=fce1iwCZVxwpOBL0K/zQb2ExblBcHIa2yvA3bq6yu2WFGX3WwtNs1FPXRmkrPkvWVl r9CvNLt56znElhdlBR2tPydVU0/4PfuKihyafSX7JADrzv9t0IxDlJQ/OTgcevg4khYr 9C0LkyYyUqg0zfajlvXzyWZaMqilpjCVJh80jP+w6vkZQ0Vj7U0Y9emXSaSDEhAk8pKM QLS67ymgF8YftZ9tEJf55SPfGia/8Obu5n8khNU8EqYLpqejVe/EI5N9zMALMtg3LoiU ITKLipPjA26OkK2IOGtpnEZv9RZt6VdRtTf/30zNucNV2MVB8wD7tVbVkd+P6MxuUglE OYww== X-Gm-Message-State: AOAM532HFMc1N7QRzno6i/tdawpJV1243J09Uxq65j3DAgi5lBGtAL5O VBobUi6OvPpD+GOXQpPRy7w= X-Google-Smtp-Source: ABdhPJxnMI7nEpXYkmRg9QbA9F1+WHhJQx2EbrSH0NufA4ncZh+GVa8ZpioFXLVFEu3uBQE13yMQsQ== X-Received: by 2002:adf:fc8b:: with SMTP id g11mr26793978wrr.90.1589894066940; Tue, 19 May 2020 06:14:26 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id i74sm20990263wri.49.2020.05.19.06.14.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:14:26 -0700 (PDT) From: luca.boccassi@gmail.com To: Phil Yang Cc: Honnappa Nagarahalli , Harry van Haaren , dpdk stable Date: Tue, 19 May 2020 14:04:59 +0100 Message-Id: <20200519130549.112823-164-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'service: remove rte prefix from static functions' has been queued to stable release 19.11.3 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 stable release 19.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/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. Thanks. Luca Boccassi --- >From d8aeeb8cfbefb964b97d3eb1b78f4fd8be29f1b5 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 62618910f6..d5dd32d8d9 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -340,8 +340,8 @@ 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,10 +378,10 @@ service_run(uint32_t i, struct core_state *cs, uint64_t service_mask, if (!rte_atomic32_cmpset((uint32_t *)&s->execute_lock, 0, 1)) 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,14 +425,14 @@ 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); uint32_t i; const int lcore = rte_lcore_id(); 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; for (i = 0; i < RTE_SERVICE_NUM_MAX; i++) { @@ -693,9 +693,9 @@ rte_service_lcore_start(uint32_t lcore) /* set core to run state first, and then launch otherwise it will * 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,13 +774,9 @@ 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) calls = s->calls; @@ -807,7 +803,7 @@ rte_service_attr_reset_all(uint32_t id) SERVICE_VALID_GET_OR_ERR_RET(id, s, -EINVAL); int reset = 1; - rte_service_dump_one(NULL, s, 0, reset); + service_dump_one(NULL, s, reset); return 0; } @@ -851,21 +847,13 @@ rte_service_dump(FILE *f, uint32_t id) uint32_t i; 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) { struct rte_service_spec_impl *s; SERVICE_VALID_GET_OR_ERR_RET(id, s, -EINVAL); 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,7 +863,7 @@ rte_service_dump(FILE *f, uint32_t id) if (!service_valid(i)) continue; uint32_t reset = 0; - rte_service_dump_one(f, &rte_services[i], total_cycles, reset); + service_dump_one(f, &rte_services[i], reset); } fprintf(f, "Service Cores Summary\n"); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:51.178390228 +0100 +++ 0164-service-remove-rte-prefix-from-static-functions.patch 2020-05-19 14:04:44.504653593 +0100 @@ -1,8 +1,10 @@ -From 7a0ad72f6e1fc31e020af77d102dc2f1e67d52b9 Mon Sep 17 00:00:00 2001 +From d8aeeb8cfbefb964b97d3eb1b78f4fd8be29f1b5 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. @@ -14,7 +16,7 @@ 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 c283408cf1..94266e83ff 100644 +index 62618910f6..d5dd32d8d9 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -340,8 +340,8 @@ rte_service_runstate_get(uint32_t id)