From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0070.outbound.protection.outlook.com [104.47.38.70]) by dpdk.org (Postfix) with ESMTP id 4D6DC7CCE for ; Mon, 5 Jun 2017 09:23:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/DGu90AaFntORIJ4ZIIjCHeZC9czte982g6mGl4VbWo=; b=ZFw1fkzH2LBy32N2s7l1UCAYsNheFgn8QOhHNDbdpfUuasDl/ZEU8cq94gBqlNqMy+pH1odX7N8qYKyoge/P1YPcrf4Lt5mXgaTXt9eETxJFgq8WojE2qQOzCURhsTgsJHE8TD3AHe2BlTp37z0jebIfJegZLGV55Mtg9iHurLM= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin (171.76.74.1) by BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Mon, 5 Jun 2017 07:23:21 +0000 Date: Mon, 5 Jun 2017 12:53:07 +0530 From: Jerin Jacob To: "Van Haaren, Harry" Cc: "dev@dpdk.org" , Thomas Monjalon , "Richardson, Bruce" , "Ananyev, Konstantin" , "Wiles, Keith" Message-ID: <20170605072306.GA1280@jerin> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-Originating-IP: [171.76.74.1] X-ClientProxiedBy: MA1PR01CA0079.INDPRD01.PROD.OUTLOOK.COM (10.174.56.19) To BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PR0701MB1718: X-MS-Office365-Filtering-Correlation-Id: fb4e1017-ea55-4d69-5e69-08d4abe3c035 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BN3PR0701MB1718; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 3:A4jcsNZzxPQ+jtwPSEyNR65VZHBk9PhwX2lsKW4RbTxWvUitKblQNFByBWrD/m0We5CfhZtiwLojEmy1ij4SVziep7tUh1bBDwQH1/MfFBvzVkksB8HkJmmNTMCJvJUYVPjJE8M7We8wAqFRTUMCF3M4AqT5GRvVEaPnAElZ0X32EKgrV3iBDc58XxgkUqezO45Motujq+J9/UATKjEL06QCypKAVydp02/Nn0FU94/OPfbEidTAemOT8dGplxU1urCAQqeEdBlioQHuK9m764kWwbNqKh8vpy7DxTHpxnQAl2/CaaU1LF+ZoGxozvMF1Gc/w19MTwOpj7+trksw9A==; 25:vis1xLMSfZL8x8tRjUp7sV7iDSchc21hFY+pwSbv7HKiXNj3aDEBQIDq+El4BXDtjsMaSqY6GsmBI2vOPKsBEoM0F+U6rnZUHOO5MOz9xI3FLMFPifKl29iaJ5Ug5lAjwXXbuWZ0WlMUrC8ecm27u9cRMmlpExjtjVl27CpWDE8+bWzJo00cpQT0OSAIwhbYv8S1AY0Ow0XPd/gdLqyWOV9wTAGzX1FiwuUTFNmkMma7M4e3OZWsZPabaGHgsdZWRwLP/yCgjLXHdSKtRW67j5AGL2quuSETWIq2/+Yyyy5M4mKTWR3oVJIE++KmjTr0GXtYYAwAB6NmyduILv/pwpKp8/E1VnFudtjScU5/Y6J2qedUFg1LLmnZTj9q7CT/OQD0B39LzDksba2+WbPiiN6cSSNloVxCD3PoaY+L4F9GP4YilDqNDgt0NsY8nK9u7u7dvNwI0AOlbxU6wzzTd7Li7lza2E8+HPOY8JT2cyU= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 31:GgwBAOgWaHAK0uDedMCY7mg17meOCdWAGaug/+hU1Vqfu3ojuKZIGSOPi8hZNcOkZIaAo9R1dtGy8UqtC7P5tVBH3207FbvOa6mg9e3+9N+fK6pQfx//RXyikSLXYd/aq8pKHGn3odenz+l/xOvmnH9v8zjP9k1xAkiSSH3oGVfTg65Zno3TV0+e+IyQqgBtSkA1oPnMgaXIQsnX2ULPv2BHKU199iW9K0xbeFva4DbupIe25I3cNLzb1QZpR5rnDfvtznZTkyTByTcrX8+Ymg==; 20:f7QrasMlkrpsAfPzSCGbZyjJQ26x9Ld5auxsJmtPRspLRjDPBB+WndckAhjYHU2Hc+dF1l7e9vvVh9tTJFzLq3mj0leJU/g20bakGeHtVsP4X+UMaXn+EZlvagPNQZEiPvFM0Lia72IJv4KB9GAs9hxO4rO3+3/KJD3PHewgRD1xDtKSjX158i5IyahNzno8h+XizxkuhGcffOKW1cm6CVlnlElyGYKHm0VjmBId77H42Cfe1HLeSkj3DuKFN1yxUlBQLi5COJ2MM8oaHAMFTaKt9k2g4JbwKnClQdWSxxpOkbwgT1SQ4e4xiBHOoKv/CXb5uEPhVQJErVnMmGYpVzcFeHTyO2rp/H5ggeG9x1+sfUJ+xxIsuyrTrYKSSE78MRn5tu0FhTdoT4WYQqx9hqny2LrPbtBoGolD5WBoEo4Xs3kN2K1kcDCzGdWjxFWqgZQnIY/uJgVC4DlQxOfjGa1TP8FoSA2lE1joXY5mQb3De7X4+y/lqRiud+zeB7yphltduOjRMpPpocZJBMNURTrwl1RMj51NfmGSFBA9k6sLJnxlhPcTPvj8+iS5e9+oezCogZyd8zeDnXlmIgG28xVsD5RZtTz88blTCfBooVY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(93006095)(3002001)(6041248)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR0701MB1718; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR0701MB1718; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1718; 4:J8DX+voBLGTF4g8IGhC3gqBf47kYcbOq3dPQhcQ3?= =?us-ascii?Q?nTLZrkpAj9sLlWPMJQNxYmgTyN7OPuTjQ/w7YXMXbr/+WBzu9X7Wmljnudr2?= =?us-ascii?Q?a2ZEHTtZh1p7BayNkb3GYunwsIMWn3U7grWX8QrIUVbLE7Q299wfbehLaNW7?= =?us-ascii?Q?c3Phnqo4oYUbIgIdKrCzKkeQ99REDYIKlbCT0lLmQL20nNk1fV4Nsp2J1oLb?= =?us-ascii?Q?f0/F699jKjmVH5P8QADBRHAT4E6XPnd/0owSxfTesdkqxEpi/YUGo+PnR1Yi?= =?us-ascii?Q?LJIZI6SLdlU8i18RYofUq3/hjz0yjlEN3AQvPVkdLjR8p4Qk0sPXgkkfFKIx?= =?us-ascii?Q?7SMIndal0TyyiolWCoQQ5K6Zu4080ptL6bGKxSyOCkP8AzjylLiMexU8JtoV?= =?us-ascii?Q?K+MhIeXfcNq3fLpUhFejZX4yQy/Cb36OlzofM95SsQkIwzDHg5QKwXBQIiXT?= =?us-ascii?Q?Yi2njgxU961T/1cZSaZgfyS5T17iP8K864muP6DXeqHLeNaKN14si33kpfdg?= =?us-ascii?Q?JKTmd1gc9WjBFBFN1jXbG3MuPiEk3uEpuKEpezA40U/R5piXCEQ9VRx7uZrJ?= =?us-ascii?Q?Q2iLvoa5+Gc2zlIPm8NdRtzfrQRG+IPbw8hPp3tZQYTcnM9+0xSAatDzQRCI?= =?us-ascii?Q?QwKQ6k6/tzqSXrQJXCnRIWVU4hfVOQgEob1EQRhfaWz+qjaRYbk9XzLZVE/R?= =?us-ascii?Q?/F4V4tvBdK+xKjq+wVkbdkOeOuqXkH4v8NrDmPSR69NBzZNyX9rQVvSGKO/l?= =?us-ascii?Q?YKMNZSaJmBb9JnwAobtaXiP0qJdtXVQ+zOEXDeUVLjkqxMQExvWAzaBp/vYv?= =?us-ascii?Q?uCE9pTeHwc7K+1IBVhkvXUaXq9FzKqewfsSoyLM7RsN35auidoAFU/VXFgFy?= =?us-ascii?Q?8Y2qXYpzU0HBD1fRan+fTiAydKOUMAkOiqDbvfskUpNak07S0iRKk/WEoR4p?= =?us-ascii?Q?4xzyGOQd064tmFE45GXfYWsWZ8rLylbPAXDortL45gTE6UJpNU3bszQZkXHZ?= =?us-ascii?Q?OQBPOUsZjFpTRTLsyH+wI49uodiZO3rEoKh46lQ4qRH67+zuQOPXxDVJI+wd?= =?us-ascii?Q?RXwBgKNDxlkkuvLwOHeHmRZ3T2zLpi3uh8v/esEoJvV3zHdZ9kISM6ZEHroY?= =?us-ascii?Q?RFoBBVI4EJIbM7D2oyhztQ8KabKqmJ9oM9/suz36YA3mtX8ovfW+19F1c5Ii?= =?us-ascii?Q?qsiDCr4jsIi3kJkn09qX/ILVX7o3Md1BTql6?= X-Forefront-PRVS: 0329B15C8A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39450400003)(39410400002)(39400400002)(13464003)(55885003)(377454003)(53754006)(110136004)(229853002)(8676002)(81166006)(53546009)(6496005)(25786009)(42186005)(33716001)(7736002)(305945005)(23726003)(1076002)(33656002)(6116002)(478600001)(3846002)(5660300001)(72206003)(53936002)(38730400002)(4326008)(189998001)(9686003)(4001350100001)(2906002)(2950100002)(42882006)(6916009)(6666003)(50466002)(55016002)(47776003)(66066001)(54356999)(50986999)(83506001)(76176999)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1718; H:jerin; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1718; 23:SzeV4uw10mrh/ODy9HGNCDgJHZ+USeYJEvQejnw?= =?us-ascii?Q?3uPSiyJByACGUMt7YYg74yBXXFTjIEjgR33X79gVATUzBmRFePYAuyCK7bFf?= =?us-ascii?Q?YeoZb72hYZPUMW18s72+0hIB6rQL/SrV9KW5Dtt26Hw2yoMMsMWYVD50s9Tl?= =?us-ascii?Q?IotNkqcHYcni3Wzs9XLRhWACPGi4M6yOcpIOK5bSKKiW6t1GOWAy273YgjC5?= =?us-ascii?Q?y01W/QAOMtUlKILbbbeMOYAgtEtKmuz6sHjCwwqrI9gdjYG+Z74jXkPxYTj2?= =?us-ascii?Q?U9uCV9FAayxX7LFamg1+8IgJSQkNJGE9/MEPWoMHuGSc3bK1rbuJW/ze2ghB?= =?us-ascii?Q?I7YZUzhCdnJ8KjzII5ld+Zjmh5a7UNlvt1kIQ377McdYzDEMAsFcVFfo0pUs?= =?us-ascii?Q?yMKbSh3KmrOkBYYxWwX/wPUSaZ+vk5zfExq/1UeD1ERi3OtHTPvDG3CmLk5B?= =?us-ascii?Q?zhqqwncMdNZ+hCXXbw6UJCofuSDqLbYOsTSYp2CgcoN+RhHZCu5eGqNuqkDF?= =?us-ascii?Q?dXyUbpBT0XM03db1FJOyF6z5A3bvVVrS4Xr96OwCr3fKduIBuP4zSOcmOMHY?= =?us-ascii?Q?U/Z1RutZQV9m51ITvaIPNwJWkU+kDHR6J1OJfoQyuAJyMv0bJlMriH5EgqAI?= =?us-ascii?Q?lvDexP5VlyBKPl+3y9pFYRMnKXjiLKq7oxDsSF16wL/tOXqEbpDdLqZx0FFr?= =?us-ascii?Q?vVbddVprV02fr12xhr/2ZipeicKkGjkmrcDKuv1wG0YMyKuMPV73KXOQHqBg?= =?us-ascii?Q?cPTtbotqfTE7O9OahWSjNk9SOFYjqMIg58m+0XhgDwe4vX+eqGeFGzZPrknn?= =?us-ascii?Q?2rc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STP2ZIYN3OEwB7hcic7gL3LlVMf3QtFRkg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2017 07:23:21.1886 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1718 Subject: Re: [dpdk-dev] [RFCv2] service core concept 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: Mon, 05 Jun 2017 07:23:27 -0000 -----Original Message----- > Date: Fri, 2 Jun 2017 16:09:13 +0000 > From: "Van Haaren, Harry" > To: "dev@dpdk.org" > CC: Thomas Monjalon , Jerin Jacob > , "Richardson, Bruce" > , "Ananyev, Konstantin" > , "Wiles, Keith" > Subject: [dpdk-dev] [RFCv2] service core concept > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Van Haaren, Harry > > Sent: Thursday, May 25, 2017 2:28 PM > > Subject: Re: [dpdk-dev] [RFC] service core concept header implementation > > > > Thanks everybody for the input on the RFC - appreciated! From an application point-of-view, I > > see merit in Konstantin's suggestions for the API, over the RFC I sent previously. I will re- > > work the API taking inspiration from both APIs and send an RFCv2, you'll be on CC :) > > > Hi All, > > This email is the v2 RFC for Service Cores, in response to the v1 sent previously[1]. > The service-cores API has been updated, and various concepts have changed. > > The API has been redesigned, with Konstantin's API suggestions as a base, and the > other comments taken into account. In my opinion this v2 API is more application-centric, > and enables the common application tasks much better. Such tasks are for example start/stop > of a service, and add/remove of a service core. > > In particular this version of the API enables applications that are not aware of services to > benefit from the services concept, as EAL args can be used to setup services and service cores. > With this design, switching to/from SW/HW PMD is transparent to the application. An example > use-case is the Eventdev HW PMD to Eventdev SW PMD that requires a service core. > > I have noted the implementation comments that were raised on the v1. For v2, I think our time > is better spent looking at the API design, and I will handle implementation feedback in the > follow-up patchset to v2 RFC. > > Below a summary of what we are trying to achieve, and the current API design. > Have a good weekend! Cheers, -Harry > > > Summary of goals (summarized from a previous email) > 1. Allowing libraries and drivers to register the fact that they require background processing > 2. Providing support for easily multiplexing these independent functions from different libs onto a different core > 3. Providing support for the application to configure the running of these background services on specific cores > 4. Once configured, hiding these services and the cores they run on from the rest of the application, > so that the rest of the app logic does not need to change depending on whether service cores are in use or not > > > === RFC v2 API === > > There are 3 parts to the API; they separate the concerns of each "user" of the API: > - Service Registration > - Service Config > - ServiceCore Config > > Service Registration: > A service requires a core. It only knows about its NUMA node, and that it requires CPU time. > Registration of a service requires only that information. > > Service Config: > An application may configure what service runs where using the Service Config APIs. > EAL is capable of performing this during rte_eal_init() if requested by passing a > --service-cores argument. The application (mostly) calls these functions at initialization > time, with start() and stop() being available to dynamically switch on/off a service if required. > > ServiceCore Config > An application can start/stop or add/remove service-lcores using the ServiceCore Config, allowing > dynamically scaling the number of used lcores by services. Lcores used as service-cores are removed > from the application coremask, and are not available to remote_launch() as they are already in use. > > > Service Registration: > int32_t rte_service_register(const struct rte_service_spec *spec); > int32_t rte_service_unregister(struct rte_service_spec *service); > > Service Configuration: > uint32_t rte_service_get_count(void); > struct rte_service_spec *rte_service_get_by_id(uint32_t id); > const char *rte_service_get_name(const struct rte_service_spec *service); > int32_t rte_service_set_coremask(struct rte_service_spec *service, const rte_cpuset_t *coremask); > int32_t rte_service_start(struct rte_service_spec *service); /* runtime function */ > int32_t rte_service_stop(struct rte_service_spec *service); /* runtime function */ Looks good to me in general. How about an API to query the service function running status? bool rte_service_is_running(struct rte_service_spec *service); or something similar. > > ServiceCore Configuration: > int32_t rte_service_cores_start(void); > int32_t rte_service_cores_stop(void); > int32_t rte_service_cores_add(const rte_cpuset_t *coremask); > int32_t rte_service_cores_del(const rte_cpuset_t *coremask); > > > I am working on a patchset - but for now I would appreciate general design feedback, > particularly if a specific use-case is not handled.