numam-dpdk/test
Harry van Haaren 72e6d1b94b service: fix service core launch
This patch fixes a potential bug, which was not consistently
showing up in the unit tests. The issue was that the service-
lcore being started was not in a "WAIT" state, and hence EAL
would return -EBUSY instead of launching the lcore.

In order to ensure a core is in a launch-ready state, the application
must call rte_eal_wait_lcore, to ensure that the core has completed
its previous task, and that EAL is ready to re-launch it.

The call to rte_eal_wait_lcore() is explicitly not in the
service core function, to make it visible to the application.
Requiring an explicit function call ensures the developer sees
that a lcore could block in the rte_eal_wait_lcore() function
if the core hasn't returned from its previous function.

From a usability perspective, hiding the wait_lcore() inside
service cores would cause confusion.

This patch adds rte_eal_wait_lcore() calls to the unit tests,
to ensure that the lcores for testing functionality are ready
to run the test.

Fixes: 21698354c8 ("service: introduce service cores concept")
Cc: stable@dpdk.org

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-01-11 23:30:30 +01:00
..
cmdline_test test: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
test service: fix service core launch 2018-01-11 23:30:30 +01:00
test-acl test: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
test-pipeline test: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
Makefile test: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00