[dpdk-stable] [PATCH v3 07/12] service: remove rte prefix from static functions
Honnappa Nagarahalli
Honnappa.Nagarahalli at arm.com
Sun Apr 5 23:35:22 CEST 2020
<snip>
> Subject: [PATCH v3 07/12] service: remove rte prefix from static functions
>
> Fixes: 3cf5eb1546ed ("service: fix and refactor atomic service accesses")
> Fixes: 21698354c832 ("service: introduce service cores concept")
> Cc: stable at dpdk.org
>
> Signed-off-by: Phil Yang <phil.yang at arm.com>
> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> ---
> lib/librte_eal/common/rte_service.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/lib/librte_eal/common/rte_service.c
> b/lib/librte_eal/common/rte_service.c
> index b0b78ba..2117726 100644
> --- a/lib/librte_eal/common/rte_service.c
> +++ b/lib/librte_eal/common/rte_service.c
> @@ -336,7 +336,7 @@ rte_service_runstate_get(uint32_t id) }
>
> static inline void
> -rte_service_runner_do_callback(struct rte_service_spec_impl *s,
> +service_runner_do_callback(struct rte_service_spec_impl *s,
> struct core_state *cs, uint32_t service_idx) {
> void *userdata = s->spec.callback_userdata; @@ -379,10 +379,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;
> }
> @@ -436,7 +436,7 @@ 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;
This is a minor comment.
Since you are touching 'service_runner_func', please consider doing the below improvement:
struct core_state *cs = &lcore_states[lcore];
while (lcore_states[lcore].runstate == RUNSTATE_RUNNING) {
The while above can be changed as follows to make it more readable
while (cs->runstate == RUNSTATE_RUNNING) {
> @@ -706,7 +706,7 @@ rte_service_lcore_start(uint32_t lcore)
> */
> lcore_states[lcore].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;
> }
> @@ -785,7 +785,7 @@ rte_service_lcore_attr_get(uint32_t lcore, uint32_t
> attr_id, }
>
<snip>
More information about the stable
mailing list