From 351f463456f8eb42c4a23e16bb37cb0c53a3a277 Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Fri, 22 Sep 2017 01:40:03 +0530 Subject: [PATCH] timer: allow reset on service cores The rte_timer_reset function should be able to register timers on service lcores as they are EAL threads. Signed-off-by: Pavan Nikhilesh Acked-by: Harry van Haaren --- lib/librte_timer/rte_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c index 5ee0840800..ec86744e06 100644 --- a/lib/librte_timer/rte_timer.c +++ b/lib/librte_timer/rte_timer.c @@ -432,7 +432,8 @@ rte_timer_reset(struct rte_timer *tim, uint64_t ticks, uint64_t period; if (unlikely((tim_lcore != (unsigned)LCORE_ID_ANY) && - !rte_lcore_is_enabled(tim_lcore))) + !(rte_lcore_is_enabled(tim_lcore) || + rte_lcore_has_role(tim_lcore, ROLE_SERVICE)))) return -1; if (type == PERIODICAL) -- 2.20.1