Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/69785/?format=api
http://patchwork.dpdk.org/api/patches/69785/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200505211732.25291-4-honnappa.nagarahalli@arm.com/", "project": { "id": 1, "url": "http://patchwork.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20200505211732.25291-4-honnappa.nagarahalli@arm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200505211732.25291-4-honnappa.nagarahalli@arm.com", "date": "2020-05-05T21:17:29", "name": "[v4,3/6] service: remove rte prefix from static functions", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a383741862825200336e401351fca8f1a7c70f6e", "submitter": { "id": 1045, "url": "http://patchwork.dpdk.org/api/people/1045/?format=api", "name": "Honnappa Nagarahalli", "email": "honnappa.nagarahalli@arm.com" }, "delegate": { "id": 24651, "url": "http://patchwork.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20200505211732.25291-4-honnappa.nagarahalli@arm.com/mbox/", "series": [ { "id": 9845, "url": "http://patchwork.dpdk.org/api/series/9845/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=9845", "date": "2020-05-05T21:17:26", "name": "use c11 atomics for service core lib", "version": 4, "mbox": "http://patchwork.dpdk.org/series/9845/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/69785/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/69785/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 4CC48A0352;\n\tTue, 5 May 2020 23:18:13 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BAA591D6EF;\n\tTue, 5 May 2020 23:17:54 +0200 (CEST)", "from foss.arm.com (foss.arm.com [217.140.110.172])\n by dpdk.org (Postfix) with ESMTP id 0587A1D6CF\n for <dev@dpdk.org>; Tue, 5 May 2020 23:17:53 +0200 (CEST)", "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 766EF31B;\n Tue, 5 May 2020 14:17:52 -0700 (PDT)", "from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com\n [10.118.14.48])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6083C3F305;\n Tue, 5 May 2020 14:17:52 -0700 (PDT)" ], "From": "Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>", "To": "dev@dpdk.org,\n\tphil.yang@arm.com,\n\tharry.van.haaren@intel.com", "Cc": "thomas@monjalon.net, david.marchand@redhat.com,\n konstantin.ananyev@intel.com, jerinj@marvell.com, hemant.agrawal@nxp.com,\n gage.eads@intel.com, bruce.richardson@intel.com,\n honnappa.nagarahalli@arm.com, nd@arm.com", "Date": "Tue, 5 May 2020 16:17:29 -0500", "Message-Id": "<20200505211732.25291-4-honnappa.nagarahalli@arm.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200505211732.25291-1-honnappa.nagarahalli@arm.com>", "References": "<1587659482-27133-1-git-send-email-phil.yang@arm.com>\n <20200505211732.25291-1-honnappa.nagarahalli@arm.com>", "Subject": "[dpdk-dev] [PATCH v4 3/6] service: remove rte prefix from static\n\tfunctions", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Phil Yang <phil.yang@arm.com>\n\nclean up rte prefix from static functions.\nremove unused parameter for service_dump_one function.\n\nSigned-off-by: Phil Yang <phil.yang@arm.com>\nReviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\nAcked-by: Harry van Haaren <harry.van.haaren@intel.com>\n---\n lib/librte_eal/common/rte_service.c | 34 ++++++++++-------------------\n 1 file changed, 11 insertions(+), 23 deletions(-)", "diff": "diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c\nindex c283408cf..62ea9cbd6 100644\n--- a/lib/librte_eal/common/rte_service.c\n+++ b/lib/librte_eal/common/rte_service.c\n@@ -340,7 +340,7 @@ rte_service_runstate_get(uint32_t id)\n }\n \n static inline void\n-rte_service_runner_do_callback(struct rte_service_spec_impl *s,\n+service_runner_do_callback(struct rte_service_spec_impl *s,\n \t\t\t struct core_state *cs, uint32_t service_idx)\n {\n \tvoid *userdata = s->spec.callback_userdata;\n@@ -378,10 +378,10 @@ service_run(uint32_t i, struct core_state *cs, uint64_t service_mask,\n \t\tif (!rte_atomic32_cmpset((uint32_t *)&s->execute_lock, 0, 1))\n \t\t\treturn -EBUSY;\n \n-\t\trte_service_runner_do_callback(s, cs, i);\n+\t\tservice_runner_do_callback(s, cs, i);\n \t\trte_atomic32_clear(&s->execute_lock);\n \t} else\n-\t\trte_service_runner_do_callback(s, cs, i);\n+\t\tservice_runner_do_callback(s, cs, i);\n \n \treturn 0;\n }\n@@ -425,14 +425,14 @@ rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe)\n }\n \n static int32_t\n-rte_service_runner_func(void *arg)\n+service_runner_func(void *arg)\n {\n \tRTE_SET_USED(arg);\n \tuint32_t i;\n \tconst int lcore = rte_lcore_id();\n \tstruct core_state *cs = &lcore_states[lcore];\n \n-\twhile (lcore_states[lcore].runstate == RUNSTATE_RUNNING) {\n+\twhile (cs->runstate == RUNSTATE_RUNNING) {\n \t\tconst uint64_t service_mask = cs->service_mask;\n \n \t\tfor (i = 0; i < RTE_SERVICE_NUM_MAX; i++) {\n@@ -693,9 +693,9 @@ rte_service_lcore_start(uint32_t lcore)\n \t/* set core to run state first, and then launch otherwise it will\n \t * return immediately as runstate keeps it in the service poll loop\n \t */\n-\tlcore_states[lcore].runstate = RUNSTATE_RUNNING;\n+\tcs->runstate = RUNSTATE_RUNNING;\n \n-\tint ret = rte_eal_remote_launch(rte_service_runner_func, 0, lcore);\n+\tint ret = rte_eal_remote_launch(service_runner_func, 0, lcore);\n \t/* returns -EBUSY if the core is already launched, 0 on success */\n \treturn ret;\n }\n@@ -774,13 +774,9 @@ rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,\n }\n \n static void\n-rte_service_dump_one(FILE *f, struct rte_service_spec_impl *s,\n-\t\t uint64_t all_cycles, uint32_t reset)\n+service_dump_one(FILE *f, struct rte_service_spec_impl *s, uint32_t reset)\n {\n \t/* avoid divide by zero */\n-\tif (all_cycles == 0)\n-\t\tall_cycles = 1;\n-\n \tint calls = 1;\n \tif (s->calls != 0)\n \t\tcalls = s->calls;\n@@ -807,7 +803,7 @@ rte_service_attr_reset_all(uint32_t id)\n \tSERVICE_VALID_GET_OR_ERR_RET(id, s, -EINVAL);\n \n \tint reset = 1;\n-\trte_service_dump_one(NULL, s, 0, reset);\n+\tservice_dump_one(NULL, s, reset);\n \treturn 0;\n }\n \n@@ -851,21 +847,13 @@ rte_service_dump(FILE *f, uint32_t id)\n \tuint32_t i;\n \tint print_one = (id != UINT32_MAX);\n \n-\tuint64_t total_cycles = 0;\n-\n-\tfor (i = 0; i < RTE_SERVICE_NUM_MAX; i++) {\n-\t\tif (!service_valid(i))\n-\t\t\tcontinue;\n-\t\ttotal_cycles += rte_services[i].cycles_spent;\n-\t}\n-\n \t/* print only the specified service */\n \tif (print_one) {\n \t\tstruct rte_service_spec_impl *s;\n \t\tSERVICE_VALID_GET_OR_ERR_RET(id, s, -EINVAL);\n \t\tfprintf(f, \"Service %s Summary\\n\", s->spec.name);\n \t\tuint32_t reset = 0;\n-\t\trte_service_dump_one(f, s, total_cycles, reset);\n+\t\tservice_dump_one(f, s, reset);\n \t\treturn 0;\n \t}\n \n@@ -875,7 +863,7 @@ rte_service_dump(FILE *f, uint32_t id)\n \t\tif (!service_valid(i))\n \t\t\tcontinue;\n \t\tuint32_t reset = 0;\n-\t\trte_service_dump_one(f, &rte_services[i], total_cycles, reset);\n+\t\tservice_dump_one(f, &rte_services[i], reset);\n \t}\n \n \tfprintf(f, \"Service Cores Summary\\n\");\n", "prefixes": [ "v4", "3/6" ] }{ "id": 69785, "url": "