From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Aug 2017 05:32:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,377,1498546800"; d="scan'208";a="139790209" Received: from silpixa00398672.ir.intel.com ([10.237.223.128]) by fmsmga005.fm.intel.com with ESMTP; 15 Aug 2017 05:32:57 -0700 From: Harry van Haaren To: dev@dpdk.org Cc: Harry van Haaren Date: Tue, 15 Aug 2017 13:32:40 +0100 Message-Id: <1502800360-15782-9-git-send-email-harry.van.haaren@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502800360-15782-1-git-send-email-harry.van.haaren@intel.com> References: <1502800360-15782-1-git-send-email-harry.van.haaren@intel.com> Subject: [dpdk-dev] [PATCH 8/8] service: clarify documentation for register X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2017 12:32:59 -0000 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