Skip to content

Commit

Permalink
datapath/dpdk: jobs system: Stop inactive lcores cleanly
Browse files Browse the repository at this point in the history
ovdk_jobs_stop_slave_lcore() was not calling rte_eal_wait_lcore()
for slave lcores that are in FINISHED state. However, slave
lcores need to be in WAIT state before they can be used by
rte_eal_remote_launch() again.
The state transition from FINISHED to WAIT is done via
rte_eal_wait_lcore().

Change-Id: Ic5e7c63b0266174f7f5115553a6892b5c1281f19
Signed-off-by: Simon Kuenzer <[email protected]>
Reviewed-by: Meghan Halton <[email protected]>
  • Loading branch information
skuenzer authored and Meghan Halton committed Mar 6, 2015
1 parent 5e9c0d5 commit 89cb969
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openvswitch/datapath/dpdk/ovdk_jobs.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ ovdk_jobs_stop_slave_lcore(unsigned lcore_id)

ovdk_joblist_refs[lcore_id]->online = 0; /* request lcore exit */
state = rte_eal_get_lcore_state(lcore_id);
if (state == RUNNING)
if (state == RUNNING || state == FINISHED)
return rte_eal_wait_lcore(lcore_id); /* wait for lcore exit */
return 0;
}
Expand Down

0 comments on commit 89cb969

Please sign in to comment.