From mboxrd@z Thu Jan 1 00:00:00 1970 From: Harry van Haaren Subject: [PATCH 8/8] service: clarify documentation for register Date: Tue, 15 Aug 2017 13:32:40 +0100 Message-ID: <1502800360-15782-9-git-send-email-harry.van.haaren@intel.com> References: <1502800360-15782-1-git-send-email-harry.van.haaren@intel.com> Cc: Harry van Haaren To: dev@dpdk.org Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 12BE77CD6 for ; Tue, 15 Aug 2017 14:32:58 +0200 (CEST) In-Reply-To: <1502800360-15782-1-git-send-email-harry.van.haaren@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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