From: Erik Gabriel Carrillo Date: Fri, 12 Jan 2018 21:31:05 +0000 (-0600) Subject: timer: fix reset on service cores X-Git-Tag: spdx-start~686 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d33fbd51e58545666dc9980484fc7c6a1a0d5439;p=dpdk.git timer: fix reset on service cores The return value of rte_lcore_has_role is misinterpreted in the timer reset function. The return values of rte_lcore_has_role will be changed in a future DPDK release, but this commit fixes this call site until that happens. Fixes: 351f463456f8 ("timer: allow reset on service cores") Cc: stable@dpdk.org Signed-off-by: Erik Gabriel Carrillo Acked-by: Pavan Nikhilesh --- diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c index 604ecabcd2..4bbcd067b3 100644 --- a/lib/librte_timer/rte_timer.c +++ b/lib/librte_timer/rte_timer.c @@ -403,7 +403,7 @@ rte_timer_reset(struct rte_timer *tim, uint64_t ticks, if (unlikely((tim_lcore != (unsigned)LCORE_ID_ANY) && !(rte_lcore_is_enabled(tim_lcore) || - rte_lcore_has_role(tim_lcore, ROLE_SERVICE)))) + rte_lcore_has_role(tim_lcore, ROLE_SERVICE) == 0))) return -1; if (type == PERIODICAL)