From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0065.outbound.protection.outlook.com [104.47.34.65]) by dpdk.org (Postfix) with ESMTP id 81CFE11D4 for ; Tue, 29 Aug 2017 14:17:15 +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=dCWfTWQGDrBEHgbhQYs0flPOnSuujjYZk4quzZN9bjo=; b=o8V+PgCwv/mMB/pydidVXQh5seemuOyIBaA0olZyOQpcUb8e5I+Wkkd0t3+Gx/lFd10cZXV2FI0mnNdcGZMF39d44P0hiPjOt1jjBMirnaEp81aTV9I/unhc97uOGdKNslmGW0Scy9bYa0xI3B93NSGraBTBc9DozD0MKhgg2js= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT (111.93.218.67) by CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) 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 12:17:11 +0000 Date: Tue, 29 Aug 2017 17:46:49 +0530 From: Pavan Nikhilesh Bhagavatula To: "Van Haaren, Harry" Cc: dev@dpdk.org Message-ID: <20170829121647.GA11846@PBHAGAVATULA-LT> References: <1504004405-22532-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: PN1PR01CA0073.INDPRD01.PROD.OUTLOOK.COM (10.174.144.141) To CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 58de33a4-85b6-4d55-72c2-08d4eed7e151 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY4PR07MB3464; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 3:f1H7freYRLeIpx9sjBK6NhyyaXBN8qQmG8VNN9ZSYQbwgGbd7EVRroCwCaOlVX43QH8SDTZCCr3fSqv4EEn5vh3Db2mvvNPg3ejWZYKBh1U80ypzw5yd5r93E4xUdeFQ1cVicg6vyCLDKQg8RSMC5cdM0LzyCCDRMDzcmPLMU6y63U7Drsjdz+amoaW0M9zqWyytSt4J0R1CynNPy2llr7dnKtO4Vwu0ndHPhltI+ktojniUHYbwwkjEikFqER3i; 25:rvls1rRLjf8fSnsi/vckZFZkZaIo3cjXMnR6P1yrn9fMhhk3nUhVs2MrhZukoIH3QVPvbLCO8k96UEgolTbE93yAd+/c4TNzFVf1fM/wLbRxJaY5ctrRdcTxtDx+yYjyV0rn2uvfdwJJR55QgZBNiX4zSccBbGYo8TmMc/9LBbaJIuI3WiFTLKZCpdCvJKIasF0stM2NaYw9gQsHKGp0LgGE+JuO35PVVG3NLxMrbKdLmZzVIK/4LcAA5DkbpLLfNNB0FUBOPPk9uY3ve/lSJkIXSFq8C8lpGJAXNaL25qQFDk8KPvx8NaEOCPHmeez9Ar1agwAls3tdoax/sulwGQ==; 31:6OaqZPNUCAViazru5PyrCraOzw3QazMWiyhlU1yTm3Soq9JzfCIAbPHVu9FsYmt9Z3mWIfSCIH3bZNgR27+N/3UdWVIHzzui6CJJ7IAWBE/hZHuA9jjrz3y5GfdMvPZUJteEAXjKxbSrdFasWV3wHZJAMZNDN7+kczmn1tGRJfV8Dxl9lhi8Czi5vpLYCTabaQR6ZpMX88nO1Nq0G7WrYCtBz4lotHLmcvsHfZbwi3s= X-MS-TrafficTypeDiagnostic: CY4PR07MB3464: X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 20:z6lbd21OV44vfYzinWMmUxs7ell/LmCE/faWTyuVJJ3UDZLJgIbEbBlnO6T19RYuOETEX37jVK747/Jjl8JKXBABCFCQ9fr2wFcqkTpHu0u3af2ziTpKXa1zcDIM9hQvSBjh/M6NCL6c9XCIZlY0HW1/VAahQBX3AeksyP37WBZTAzrLw+m+PRxSfKyk/QVh8pMCISr9ahSy+0cWVU3BVTzb4EMIgISRQO+lmeih8w0ocwPEfuR9zyTbt9+pYp/1oAbX2nOduaTmh5fVlDjJ2tWEw+iA2f5Wtp0QGfYzs2KV095vW2PWBK3KuEIV12ncY4PhOuka/EACcwMmS+pFpz31U7ONyVwBwDPmuVqyEhjp9mBUEYbXcN/9cUEPNHJEHd979C8Vauw34Xqh6+v3kty8KXmJmb5v1V8giNBo+l+V6Be56bgaXkCCnx/52gOcUgGaomMkosqUFVVXXB6nHNaPnoC2j4Vmorkw3N54r/CQCMQmioT6biGCGKhKvP/BHSeQhWvdagschw23JGevJcfQhvz77seapabjdLIHtxuoUkWZP/TpH22+zqqN7aYNhmaOBVlEjGr2nuboXTX7Me/umv/bNkShgZ7MIajBA54= X-Forefront-PRVS: 0414DF926F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(199003)(24454002)(51914003)(377454003)(189002)(83506001)(6666003)(25786009)(2950100002)(42882006)(6916009)(8676002)(81156014)(229853002)(68736007)(66066001)(47776003)(50466002)(33716001)(4326008)(53546010)(76176999)(54356999)(305945005)(7736002)(50986999)(7350300001)(101416001)(42186005)(189998001)(33656002)(1076002)(55016002)(106356001)(9686003)(6116002)(23726003)(3846002)(5009440100003)(97736004)(4001350100001)(72206003)(5660300001)(6246003)(110136004)(6496005)(105586002)(18370500001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3464; H:PBHAGAVATULA-LT; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; CY4PR07MB3464; 23:/XorOc1gMNZTsugidF9a08EEtnEweQ8rq4uuuHNI+?= =?us-ascii?Q?c0Fg1zjlcp+l+8VRHLqv6+2yq4Rwad95z90HsyM2vF0KaMF4pQy1bnxvvMqJ?= =?us-ascii?Q?1CCWD0oNqW/U9zTWwb0QN1zHmkg4WGa1nyy3tUskDIKKCHM3Koy8zsz8Pd7Y?= =?us-ascii?Q?lyFTSgiXIwAk5Vt+JCxsuDGThUvcYhj/faC1dYJhSADhWA6VEu0KapXupPjM?= =?us-ascii?Q?nbrQ3VasXh+Y8/D9eWoX3HNsE4oaJWBz1zQaWfe3sRADB23cJPxlQzhTIA91?= =?us-ascii?Q?YapkPwJz87k5DS/0hx6Y2bYb6bh2qRRJBwn8BG5BQI5pKuEocE4LbsGz+w9H?= =?us-ascii?Q?OVZIAcY3HFVjPCP/9dXM6JOJdPiAUcVeDDYLVZGpEcFYogDzqOQBBcUuy/lc?= =?us-ascii?Q?o/HFEd0rkTVEoLyf5k3HZ95jD5gxgY+ga6L3T5qy64gWruUiv89Jyn1pBi3s?= =?us-ascii?Q?Bujkq/XrOJRAPWKBckO0NIsR+fAomDdroIdpqCyZRMnGL2oTgmhXaOIJNgnV?= =?us-ascii?Q?m/+p+XUZ2klaGsIf68qOF/iSJT7BNRvjei7waGZ3UM86bEvrMEnYgBobC5iR?= =?us-ascii?Q?l4HJ5GXJjCKZgYwIqraO6dmcZ3KxDnMRNYN+NbOI87v1ANlHybP8ODjFSQJu?= =?us-ascii?Q?xKj5fAGoNFUtHpYM8FfnW86FIByRtsn7XdI8muZPgxVMbr2bUvVVsPDFX3X6?= =?us-ascii?Q?6UBtDp55Q1bJeUNraUHMXavyix3IfQ5q8SRmMs90DbmNgBOtfcE3FXqf78MY?= =?us-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tAbljG/YBpPmaQq+ckF5aNHR31bnDRSksYmfjR8zZF4l8j+KYyo32nuvkYBZ4Fhz3P5Gg=; 7:lVjbgN0+wK7E9ouElp6m3aMCY6M7Kj/lXdJKFx8PxNvFq6Pb5KAd90YQp1UPMX7rcVGj2bu2UVpk+yp+jbdtl+iynJhIOd4bIaagjJvoaaOvXbSyFgnoVJ2ChIGQpccSdD8NkZUbfzdrI9DhYtw9G3il+zX/ToisLXGBpgw4pSbyn4uu0erCVVvfQZ4HkKuP0ePa8QlrKtzvd+LbndrW7ZtGO1wjeSxz/NIfOqnX56c= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2017 12:17:11.9329 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3464 Subject: Re: [dpdk-dev] [PATCH v3] 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 12:17:17 -0000 On Tue, Aug 29, 2017 at 12:05:12PM +0000, Van Haaren, Harry wrote: > > From: Pavan Nikhilesh [mailto:pbhagavatula@caviumnetworks.com] > > Sent: Tuesday, August 29, 2017 12:00 PM > > To: Van Haaren, Harry > > Cc: dev@dpdk.org; Pavan Nikhilesh > > Subject: [dpdk-dev] [PATCH v3] 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 > > --- > > > > v3 changes: > > - fix compilation issues with .map files > > > > v2 changes: > > - reword the commit title according to the check-git-log.sh > > - modify return types > > - add function to .map file > > > > lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 + > > 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 | 1 + > > 4 files changed, 28 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..79e7d31 100644 > > --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map > > +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map > > @@ -222,6 +222,7 @@ EXPERIMENTAL { > > rte_service_is_running; > > rte_service_lcore_add; > > rte_service_lcore_count; > > + rte_service_lcore_count_services; > > rte_service_lcore_del; > > rte_service_lcore_list; > > rte_service_lcore_reset_all; > > 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); > > Building the documentation[1] fails, the @param Lcore should have be @param lcore (note the non-capital L, to keep doxygen happy). > Sorry for missing that last review. No issue will generate a v4 with the fix. > > With that fix; > Acked-by: Harry van Haaren > > [1] I tested using this command: ./devtools/test-build.sh x86_64-native-linuxapp-clang+shared+next+debug Thanks for the inputs :). -Pavan > > > > + > > +/** > > + * @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..468c706 100644 > > --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map > > +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map > > @@ -227,6 +227,7 @@ EXPERIMENTAL { > > rte_service_is_running; > > rte_service_lcore_add; > > rte_service_lcore_count; > > + rte_service_lcore_count_services; > > rte_service_lcore_del; > > rte_service_lcore_list; > > rte_service_lcore_reset_all; > > -- > > 2.7.4 >