service: add component runstate
authorHarry van Haaren <harry.van.haaren@intel.com>
Mon, 21 Aug 2017 12:58:14 +0000 (13:58 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 15 Sep 2017 11:46:47 +0000 (13:46 +0200)
commit95fdf37c89322faa62c585cf1a65772e82e8a60d
tree3a70dc83c6474026bd94aaf2b12343d111cd5c75
parent4977b84f99c67577d45eeb0f429bd7a882cd1627
service: add component runstate

This commit adds a new flag that the component (or "backend")
can use to indicate readyness. The service function callback
will not be called until the component sets itself as ready.

The use-case behind adding this feature is eg: a service that
requires configuration before it can start. Any service that
emulates an ethdev will have rte_eth_dev_configure() called,
and only after that the service will know how many queues/etc
to allocate. Once that configuration is complete, the service
marks itself as ready using rte_service_component_runstate_set().

This feature request results from prototyping services, and
requiring a flag in each service to note "internal" readyness.
Instead that logic is now lifted to the service library.

The unit tests have been updated to test the component runstate.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
lib/librte_eal/bsdapp/eal/rte_eal_version.map
lib/librte_eal/common/include/rte_service_component.h
lib/librte_eal/common/rte_service.c
lib/librte_eal/linuxapp/eal/rte_eal_version.map
test/test/test_service_cores.c