From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0078.outbound.protection.outlook.com [104.47.42.78]) by dpdk.org (Postfix) with ESMTP id 0877D11C5 for ; Tue, 29 Aug 2017 12:29:18 +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=UFD3sevNJwboQnu1b6KWxieO+CbYUHekjUaVR9f+DJo=; b=IbPt/awby3IWqr9Ei6VJT8oprdcEhcPGq//PLr12HZ20E0K1dUlRMs+IdKkBCYvZlJoqt9KKkVMoYBEdpmAVMcGtxJu9zhOAAnSPBoa16k6es648uAmuYn/I0e0rvN3w7+MjcjYw5aKHOmk4CA8NHqC118WLfERcfDQ7m7Z+BhU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT (111.93.218.67) by CY4PR07MB3462.namprd07.prod.outlook.com (10.171.252.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Tue, 29 Aug 2017 10:29:14 +0000 Date: Tue, 29 Aug 2017 15:58:50 +0530 From: Pavan Nikhilesh Bhagavatula To: "Van Haaren, Harry" Cc: dev@dpdk.org Message-ID: <20170829102848.GA25894@PBHAGAVATULA-LT> References: <1503936405-23839-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0098.INDPRD01.PROD.OUTLOOK.COM (10.174.144.14) To CY4PR07MB3462.namprd07.prod.outlook.com (10.171.252.143) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 38acfdb3-0dfb-48c9-2aee-08d4eec8cc6b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY4PR07MB3462; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3462; 3:TQsTo4P51vYMmfFWjfCIIvqpcrXgW1vbui959kLHb0X36dEN7lDl4g+i5DzaN3eUJK/TcsjcQvbfSg+28zKomq94SeFPbM///NMN8d95bH/LuYduyJs5UIalEGiyneh4uiuzl4XzChO4xDs+7UbXqqMuAktlCzdC7WnO6EHhmqYHQ7T7UBT3euivJ2FXp5AJxKDldp8MiyRF4d3eWzZTY+B05cf0nQWVuhXUxyOf73r2uOwbdCjeGLzxzI8TLT/Y; 25:w4uAFPjJQ/YIC94QumK+PmSNUJbnY3UGFZc8qGPGrXnxHYW/ggl4f4YQE/4QA5oNYZmQg8JUrC4bTpJpgxziyKcfzqzN0mQ+3QKHkRaDPW9BjVfaxXpMYN4hdajwwlLaHqlMQ/JXulWMXGJ0GLPQUlO9TikGnx4LWmZbePUin5eqcWd/tIvCMGLhj12GcrnmgHULImIB1hiqHdTQfmjX3K69AkhUPNDUNySaPdL6rZvimtcOgG/3O4e9D0A1Mmh+CNYSpuezbfpPGr8tBxhkm4dRfFo1b3OmCNyNPE8QdHBZ3ve81f7Xoq+uw7EY5fpPkYMIDoNfyEBlg9itmtyjgg==; 31:aGQ3yEW8IHPvHwr3ty3lqK4JQAn5ynmdBr1rgTmE/ecyWCka6wqoscLeQBk1OsHnqJnBfPkgV4WMUR2sid3uJqJKUw9Qv6bpHBPLexlxaVXHP4o/VY+0tM/3uRu6eaokU7ebseQMujOopudPY1HPQvycLldetSadnq4uD6tswLRrFmQbMtq80HjswbVskIUHvYHMC9Up/6dm0M8IOHx2+LThQlTJ3ZK/PdGbnB2dotE= X-MS-TrafficTypeDiagnostic: CY4PR07MB3462: X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3462; 20:c0Bkpd1YBOLtDGHwnoB2JJbvpuebLwXtony2DX/L/Fn2jqjqNihBDzrRxzTf/lI7tQEuBGiHIb61BLoCSrknqXbZzHdy5Ocq+PQuj/5fzKYynrhp6htS8iCmU6dnkiKyOO+RM1aGMB5gSe/1F2WiqBpPr9/NOnci3EJ1xUamaokt8HeGHyYatCM2pDZZaCEX6kynv7aqWLEIZh+So1Lscr4TWdatKu0TyFyHB5JPwysUMbqVXWIVK1R+TH/b1//b/2Ahj/uTHIMLzLrQ9AAxeBam+cPLgCApctVN1+6J3DcKqJQs2WJc00YOVlDbOQdiHvAVbHhEzEJlDEywmo8qlplZMl3TpmA5mF4Ex+F5q9OMEOtNWxLPqzIEoPsJRNHLhswDlyaZVS8ULjDVic/q2KgOjWDU6QQyFx2gevac8LYBS5Ftxt1/V/JTARvI97SurrlAlGmgg9yv77qAJvKshSy1PEzO6+gDwtXv+aPxQfZrrjby9/2E7kmYWOYeIAYnlkb9wfZee97HXmSiATB5tq2Mw3w4rnPozK9qR8hiX3KZqgSiKFLYfG9jBMoH7qvx7XH3lHxda1vYeUMnwTldowhFNA1a2qoEUGVtveOT4h8=; 4:2SEmm2mNK341JKjI4djMDjlrgBl5U5GQ9sLvrfCJwLM5iHfDWAD/XYIUq3K+LN4+uJuG78bm5N6im7kSJxZsQqvQkYld6/W6/BaKE/huKvFXaJQ+t1Kvbybe6m0VhzFIExjQzuIFXd+XSTXA0i8KVkQ+wedVN7anEu0VGf4NfWz6R2noeE9HJ+7sLfl8aipOCUvdE+289b1lnvXVqyf/igjPX2BawTMKseHAnTyA9NRv4tIitr5R0sNU4+sGuyUVRwUrvkpmJCyMXTRfDMbiuH8OjsAlIdZmBojTsc5JJw8= X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(93006095)(10201501046)(6041248)(20161123562025)(20161123564025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR07MB3462; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR07MB3462; X-Forefront-PRVS: 0414DF926F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(189002)(51444003)(377454003)(199003)(24454002)(25786009)(6246003)(6496005)(478600001)(2906002)(110136004)(53376002)(66066001)(81156014)(72206003)(47776003)(4326008)(42882006)(2950100002)(53546010)(966005)(83506001)(50986999)(4001350100001)(54356999)(81166006)(6666003)(97736004)(76176999)(6916009)(189998001)(7350300001)(106356001)(105586002)(5009440100003)(33656002)(229853002)(101416001)(53936002)(50466002)(5660300001)(305945005)(7736002)(3846002)(33716001)(23726003)(1076002)(6116002)(6306002)(9686003)(42186005)(55016002)(8676002)(68736007)(18370500001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3462; H:PBHAGAVATULA-LT; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB3462; 23:pMbM0//dwmhIUf+B8XW8Ww5nezyoKEKxhHrLMkNBw?= =?us-ascii?Q?a/AV9AkA7WEjtBKL3+WDxPCmZX+huIsZCu0j0eYZgi6a8mb//xQPpQsA2rNz?= =?us-ascii?Q?8hNWbB69RYl8bpNjs3tEcV7oS3qbSBqrg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==; 24:hP6FAt8FCLM3g2WZ86JTGw95jCxV2EJ77JKlPJWrvh7fx3NiyU28jWeiYlYyqyGLSv+Gsag1XHyKhbCiO8uDtbSvV8qMvFokHCXSN7QB5i8=; 7:SaNg5OBlkJDtJNLFvYUhEw+Um69M2bfk1l5qzL9OwGHUvZyTkOz54+ojCvz9/ARZBhvcYdHUoS3uoZ4iz87FzV3o5z4X47y+k2UvD/BI/9LCCOyreHWaFHupGUr8HmsiZD01D/paHuOLp837QewE6EfimpuYftHXKm5lmrPIvKQXAhN55ykaIrQvaa+Bs3dUUu7yhOXBoOLkOnn9Es2Y5lDqyxovJEtFy+5g/5njOkA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2017 10:29:14.4027 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3462 Subject: Re: [dpdk-dev] [PATCH v2] service: add API for service count per lcore 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, 29 Aug 2017 10:29:19 -0000 On Tue, Aug 29, 2017 at 09:57:11AM +0000, Van Haaren, Harry wrote: > > From: Pavan Nikhilesh [mailto:pbhagavatula@caviumnetworks.com] > > Sent: Monday, August 28, 2017 5:07 PM > > To: Van Haaren, Harry > > Cc: dev@dpdk.org; Pavan Nikhilesh > > Subject: [dpdk-dev] [PATCH v2] service: add API for service count per lcore > > > > This new API returns the number of services that are running on a specific > > service core. It allows an application to decide which service core to run > > a new service on. > > > > Signed-off-by: Pavan Nikhilesh > > --- > > > > v2 changes: > > - reword the commit title according to the check-git-log.sh > > - modify return types > > - add function to .map file > > Generally looks good, compile testing flags an error in the .map files (inline comment below). > > Perhaps mark the v1 patch as "Superseeded" in patchwork - keeps things tidy :) > Done. > > > lib/librte_eal/bsdapp/eal/rte_eal_version.map | 7 +++++++ > > lib/librte_eal/common/include/rte_service.h | 13 +++++++++++++ > > lib/librte_eal/common/rte_service.c | 13 +++++++++++++ > > lib/librte_eal/linuxapp/eal/rte_eal_version.map | 7 +++++++ > > 4 files changed, 40 insertions(+) > > > > diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map > > b/lib/librte_eal/bsdapp/eal/rte_eal_version.map > > index aac6fd7..5fe8d79 100644 > > --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map > > +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map > > @@ -237,3 +237,10 @@ EXPERIMENTAL { > > rte_service_unregister; > > > > } DPDK_17.08; > > + > > +EXPERIMENTAL { > > + global: > > + > > + rte_service_lcore_count_services; > > + > > +} DPDK_17.11; > > > The compile test output shows something here (and in linuxapp .map file) to be an issue: > http://dpdk.org/ml/archives/test-report/2017-August/027931.html > > I think that the function can just be added in the "Experimental" section based on "DPDK_17.08". > No need to define a new experimental section. > Will fix them and generate a v3. > > > diff --git a/lib/librte_eal/common/include/rte_service.h > > b/lib/librte_eal/common/include/rte_service.h > > index 7c6f738..9537ae5 100644 > > --- a/lib/librte_eal/common/include/rte_service.h > > +++ b/lib/librte_eal/common/include/rte_service.h > > @@ -374,6 +374,19 @@ int32_t rte_service_lcore_list(uint32_t array[], uint32_t n); > > * @warning > > * @b EXPERIMENTAL: this API may change without prior notice > > * > > + * Get the numer of services running on the supplied lcore. > > + * > > + * @param Lcore Id of the service core. > > + * @retval >=0 Number of services registered to this core. > > + * @retval -EINVAL Invalid lcore provided > > + * @retval -ENOTSUP The provided lcore is not a service core. > > + */ > > +int32_t rte_service_lcore_count_services(uint32_t lcore); > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this API may change without prior notice > > + * > > * Dumps any information available about the service. If service is NULL, > > * dumps info for all services. > > */ > > diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c > > index 7efb76d..616bad3 100644 > > --- a/lib/librte_eal/common/rte_service.c > > +++ b/lib/librte_eal/common/rte_service.c > > @@ -397,6 +397,19 @@ rte_service_lcore_list(uint32_t array[], uint32_t n) > > } > > > > int32_t > > +rte_service_lcore_count_services(uint32_t lcore) > > +{ > > + if (lcore >= RTE_MAX_LCORE) > > + return -EINVAL; > > + > > + struct core_state *cs = &lcore_states[lcore]; > > + if (!cs->is_service_core) > > + return -ENOTSUP; > > + > > + return __builtin_popcountll(cs->service_mask); > > +} > > + > > +int32_t > > rte_service_start_with_defaults(void) > > { > > /* create a default mapping from cores to services, then start the > > diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map > > b/lib/librte_eal/linuxapp/eal/rte_eal_version.map > > index 3a8f154..e848c45 100644 > > --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map > > +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map > > @@ -242,3 +242,10 @@ EXPERIMENTAL { > > rte_service_unregister; > > > > } DPDK_17.08; > > + > > +EXPERIMENTAL { > > + global: > > + > > + rte_service_lcore_count_services; > > + > > +} DPDK_17.11; > > -- > > 2.7.4 > Thanks, Pavan.