service: retrieve lcore active state
authorHarry van Haaren <harry.van.haaren@intel.com>
Mon, 14 Sep 2020 14:31:17 +0000 (15:31 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 21 Sep 2020 14:37:11 +0000 (16:37 +0200)
commit8929de043eb4581ca973d383ea4053ac209fcb95
tree4f860abe7c9baccc708eb7a9517e7641c63480e7
parentf252fe5e18e060e2b79f193d21d80e2dbbf743be
service: retrieve lcore active state

This commit adds a new experimental API which allows the user
to retrieve the active state of an lcore. Knowing when the service
lcore is completed its polling loop can be useful to applications
to avoid race conditions when e.g. finalizing statistics.

The service thread itself now has a variable to indicate if its
thread is active. When zero the service thread has completed its
service, and has returned from the service_runner_func() function.

Suggested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
lib/librte_eal/common/rte_service.c
lib/librte_eal/include/rte_service.h
lib/librte_eal/rte_eal_version.map