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

Harry van Haaren harry.van.haaren at intel.com
Tue Aug 15 14:32:40 CEST 2017


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 at intel.com>
---
 lib/librte_eal/common/include/rte_service_component.h | 5 +++++
 1 file changed, 5 insertions(+)

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
-- 
2.7.4



More information about the dev mailing list