> -----Original Message----- > From: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> > Sent: Monday, April 6, 2020 5:35 AM > To: Phil Yang <phil.y...@arm.com>; tho...@monjalon.net; > harry.van.haa...@intel.com; konstantin.anan...@intel.com; > step...@networkplumber.org; maxime.coque...@redhat.com; > dev@dpdk.org > Cc: david.march...@redhat.com; jer...@marvell.com; > hemant.agra...@nxp.com; Gavin Hu <gavin...@arm.com>; Ruifeng Wang > <ruifeng.w...@arm.com>; Joyce Kong <joyce.k...@arm.com>; nd > <n...@arm.com>; sta...@dpdk.org; Honnappa Nagarahalli > <honnappa.nagaraha...@arm.com>; nd <n...@arm.com> > Subject: RE: [PATCH v3 07/12] service: remove rte prefix from static functions > > <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: sta...@dpdk.org > > > > Signed-off-by: Phil Yang <phil.y...@arm.com> > > Reviewed-by: Honnappa Nagarahalli <honnappa.nagaraha...@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) { OK. I will clean it up in the next version.
Thanks, Phil > > > @@ -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>