[dpdk-dev,8/8] service: clarify documentation for register

Message ID 1502800360-15782-9-git-send-email-harry.van.haaren@intel.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Van Haaren, Harry Aug. 15, 2017, 12:32 p.m. UTC
  This commit adds a section to the service register function
to make it clear that when registering a service, it must not
call any other service core APIs (eg: adding lcores or mappings).

The reason for this is that it breaks the abstraction that the
services represent a task or work-item to be performed, while
service-cores and assinging of tasks to cores is perfomed by the
application (or default settings from EAL are used).

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/common/include/rte_service_component.h | 5 +++++
 1 file changed, 5 insertions(+)
  

Patch

diff --git a/lib/librte_eal/common/include/rte_service_component.h b/lib/librte_eal/common/include/rte_service_component.h
index 70cca69..977a668 100644
--- a/lib/librte_eal/common/include/rte_service_component.h
+++ b/lib/librte_eal/common/include/rte_service_component.h
@@ -83,6 +83,11 @@  struct rte_service_spec {
  * A service represents a component that the requires CPU time periodically to
  * achieve its purpose.
  *
+ * Note that when registering a service it is illegal to call any other
+ * public service core API, as this would break the abstraction that services
+ * present work to be performed, and EAL or the application schedule that work
+ * on service cores.
+ *
  * For example the eventdev SW PMD requires CPU cycles to perform its
  * scheduling. This can be achieved by registering it as a service, and the
  * application can then assign CPU resources to it using