service: fix lcore in wait state in lcore add
authorHarry van Haaren <harry.van.haaren@intel.com>
Mon, 21 Aug 2017 12:58:12 +0000 (13:58 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 15 Sep 2017 11:46:44 +0000 (13:46 +0200)
This commit ensures that after an lcore is added, that
it is in the WAIT state. Previously, adding an lcore did
not ensure that the core was ready for being relaunch, which
would cause errors during lcore_start(). Now that the lcore is
ensured to be in WAIT state by the lcore_add() function, this
is no longer an issue.

Fixes: 21698354c832 ("service: introduce service cores concept")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
lib/librte_eal/common/rte_service.c

index 6967ea3..f022b28 100644 (file)
@@ -550,7 +550,8 @@ rte_service_lcore_add(uint32_t lcore)
        lcore_states[lcore].runstate = RUNSTATE_STOPPED;
 
        rte_smp_wmb();
-       return 0;
+
+       return rte_eal_wait_lcore(lcore);
 }
 
 int32_t