numam-dpdk/lib/librte_eal
Lukasz Wojciechowski 048db4b6dc service: fix core mapping reset
The rte_service_lcore_reset_all function stops execution of services
on all lcores and switches them back from ROLE_SERVICE to ROLE_RTE.
However the thread loop for slave lcores (eal_thread_loop) distincts these
roles to set lcore state after processing delegated function.
It sets WAIT state for ROLE_SERVICE, but FINISHED for ROLE_RTE.
So changing the role to RTE before stopping work in slave lcores
causes lcores to end in FINISHED state. That is why the rte_eal_lcore_wait
must be run after rte_service_lcore_reset_all to bring back lcores to
launchable (WAIT) state.
This has been fixed in test app and clarified in API documentation.

Setting the state to WAIT in rte_service_runner_func is premature
as the rte_service_runner_func function is still a part of the lcore
function delegated to slave lcore. The state is overwritten anyway in
slave lcore thread loop. This premature setting state to WAIT might
however cause rte_eal_lcore_wait, that was called by the application,
to return before slave lcore thread set the FINISHED state. That's
why it is removed from librte_eal rte_service_runner_func function.

Bugzilla ID: 464
Fixes: 21698354c8 ("service: introduce service cores concept")
Fixes: f038a81e1c ("service: add unit tests")
Cc: stable@dpdk.org

Reported-by: Sarosh Arif <sarosh.arif@emumba.com>
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2020-07-08 18:52:49 +02:00
..
arm eal/arm: adjust memory barriers for IO on ARMv8 2020-07-08 13:44:23 +02:00
common service: fix core mapping reset 2020-07-08 18:52:49 +02:00
freebsd eal: add lcore iterators 2020-07-08 14:41:06 +02:00
include service: fix core mapping reset 2020-07-08 18:52:49 +02:00
linux eal: add lcore iterators 2020-07-08 14:41:06 +02:00
ppc build: add arch-specific header path to global includes 2020-05-10 23:45:02 +02:00
unix timer: move from common to Unix directory 2020-06-23 18:33:20 +02:00
windows eal: add multiprocess disable API 2020-07-08 14:41:06 +02:00
x86 build: add arch-specific header path to global includes 2020-05-10 23:45:02 +02:00
Makefile eal: move OS-specific sub-directories 2020-03-31 13:08:55 +02:00
meson.build eal: introduce internal wrappers for file operations 2020-06-15 19:24:37 +02:00
rte_eal_exports.def mbuf: build on Windows 2020-07-07 01:47:24 +02:00
rte_eal_version.map eal: add multiprocess disable API 2020-07-08 14:41:06 +02:00