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 3A6537CE5 for ; Wed, 20 Sep 2017 19:31:29 +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=2Ifw2DF4lvezXQ+gOB3MfzIJnq8ebk7gLLyLZSq8h9U=; b=eD/qcIubrjwBMhEz/qigN15TA1gMcWxHRLwdUSYq/tf9vOTWT5OLGZ0HH4RXLngRGBeaSXhJERXUUXOIF2dGIoiZ5l75DLK5C6ko13/W/wCE3I7QkldadWNucoPkg83xDLU8TseCsFJ+z3n//JidRoeIht3cuT63VwlLQdhjEQ8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT (103.16.71.47) by DM5PR07MB3468.namprd07.prod.outlook.com (10.164.153.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Wed, 20 Sep 2017 17:31:25 +0000 Date: Wed, 20 Sep 2017 23:01:03 +0530 From: Pavan Nikhilesh Bhagavatula To: Thomas Monjalon , harry.van.haaren@intel.com Cc: dev@dpdk.org Message-ID: <20170920173103.GA6627@PBHAGAVATULA-LT> References: <1503501027-11046-1-git-send-email-pbhagavatula@caviumnetworks.com> <20170915173740.GA21540@PBHAGAVATULA-LT> <1506605.4yxMIA60VI@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1506605.4yxMIA60VI@xps> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [103.16.71.47] X-ClientProxiedBy: SG2PR06CA0172.apcprd06.prod.outlook.com (10.175.208.26) To DM5PR07MB3468.namprd07.prod.outlook.com (10.164.153.23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e3d1eefa-2383-434b-c5c0-08d5004d6c25 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM5PR07MB3468; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3468; 3:IundCbKrAMIeH+PVnEVMnZB7sNXLMxkJfSp6bKdfg69q7guYoIoW+5LVJZX6qho+qFb9S7fO6n+/l8AvGD5R/IzVS3/D3v1WO/AnZ/crhm8j//GHYpq9l+dbQUOglTzq01TWG3KAURla4jrxUxu0NvtPeSLgQZ87b7+uJd23UnaaxaInAFEraDNc/jJi2wJ6yJEBX6oKctX0kNuoaG2gZE9FSNEfhf2qISK4VdcbUujWon2v6ZiuixVmHS2KhrIY; 25:Hw6OGfTDiWyUaxp77hkwNv/if4q2tVcKK9wzTWDH5qvGIIRXkNXYmLxRyZLR4eot2bgEyAVt0Bi0QqSnW5+xhih+J7K67AKzJoAJa9XL0gfuDK2hfCu+r4DwIs06kcMxvVEwYkHq25fPp3EU26FykaygPaji3ZM6QdR3HaIGhPcG/IMlaS9cdvEM/DHc/RH3IFehlpaT4TTpVCHXcFiVPBhXT+TBxj53d0O7bzB3BNY5DUPNVcoateLnwWM1w4fNmmmIo4f6Ki1WtAP3d8jA4WS/KZtKUe4DwF0KaYpp7m9xwF9+Kl3MyFRYfGrczfk+0LFPZq2tbrb5+fManCIRyw==; 31:TotHQV+T9F+muJnSz+0RM/jToJrWUItmgdkuEdpCUGR3J7cqqNqWc5U0Vfxyjlwdlx8Ait9j6eiqAcU2XnQ9807bFTDK/VXEBxMDFnDyTjJKETt7RR9PlBl1X1au4YYN1YT4JKO/ecDG1Isif3TfleJpXnYUTy43tBzNzL9qJ0k4f8VEjz6UigKyIfjiAprgprPZ2/IeEj+3PKdYin/sVr9CO1yHPqmnmBP9CjCoY1Q= X-MS-TrafficTypeDiagnostic: DM5PR07MB3468: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3468; 20:WJ6ahOC74H++zyytxBlBekQgp2AK7ZCO+sHw0x6X+mbqAPGU6nBIz2ctxn0F7FtuujtvwrvoUvHyMcaDF8tKaHV94jRx11swOrSpLoxSv8VxS96D26tmXFOks9fbo0Mg9ASLJDxbxfirCVHqe8mg16sCvyID/cxDxkoq+X68XeKStS04Y5ibbXFGmS3CZ4keiTGQXoYxZsfMzcPv+xEMV7kps/PHJD2q76sPYTw6zpr20LWhmTAt4GK21gmYZoudt2n2wUJ9m/LsCT1esny/wa8YHPMWpIEYGIx6c/l+BrFnIryqHMNL97S3MnODDxz/otpDh9+OOsvIR7MXXMX0MjggpgYVBBV7hhXXrALc2MYMq88ThL0iPvf/32N8LjG/h7+SppkGP8ZcKKNgujsZcTJL60CjB52ylgVFVZQt5eM5MBF900hER8FnjNk9KCNv29t14krofBUEA1uIEPDB1Pzg42/uT+hAGJMrUllBH9OrA4L6wdmT6JplEE9sy/h3G7M/eqL2jsg9uE5rMPZrdnaYKtdZTM61zAzcsJNQ7gYY2UjfR5MR8rNrhlShbr63N+5C52loOnorNu2pS0MvOMLVdOqFSM7eiFICKY3KyiQ=; 4:9uVP3WwqfHKOZKl/DZoJGjPnpYJhMwth0CirFKGWZ29qMeEHH1rKR9KKdXm5K+dqQkWBPmNEg4GVdIN7RoEdOTlHHF/dMPa0KeZpjgLJy/z6/iG4XB0eWnHfGXpdNw4oWsoAKF/tBachWYzR2oCcDEljJfr4/xFAwOgYFaV1Aszz1vccRS/wg0FNDInFdUTi0RyP1QgbKxHU5MPZBJv7n6A2RQggHPzewLtLZY27BP73yrk7kxD+mBmY0Fuqti1n X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(6041248)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR07MB3468; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR07MB3468; X-Forefront-PRVS: 04362AC73B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(69224002)(53754006)(199003)(24454002)(76104003)(189002)(53936002)(81166006)(9686003)(50466002)(55016002)(6666003)(305945005)(68736007)(33716001)(6496005)(2950100002)(8936002)(33656002)(42882006)(8676002)(72206003)(81156014)(4326008)(5660300001)(7736002)(3846002)(6116002)(23726003)(1076002)(16526017)(189998001)(478600001)(66066001)(316002)(97736004)(105586002)(16586007)(58126008)(50986999)(47776003)(76176999)(54356999)(106356001)(101416001)(83506001)(229853002)(25786009)(93886005)(6246003)(2906002)(18370500001)(81973001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3468; 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; DM5PR07MB3468; 23:AVpkAYW74RlIIdn0DjEgQHU9D5JdG9ypRCh3fTqaV?= =?us-ascii?Q?GhGl65Dic3znTbODy/RWhh4HM+UZsvPzoCn043EG0wEsKiwI0uXYJP6EGF62?= =?us-ascii?Q?G0+MPL6wVWmds9rmlr5//NfHXAYosdUhMrEto4GMinS5R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?E7EgRUfCygf1h6dmMFMseenLk5coSpuQjDz1ENeKovYuOWwIQBwWh98wKTlN?= =?us-ascii?Q?CdiyH8wcNjldBzT42XlVeTTakEMIzAXfQ5u9lA5dtokr4nknp/R5zO06I6s3?= =?us-ascii?Q?JaAHJpTTt1/159Ivm+Erb6l7vevNXRagUu+8ygshykMht2x65vpoIQMvrB4j?= =?us-ascii?Q?Op+YwAIAop3SgprU2NdB33tebArEqvQt7eKubsrxD3VqWtXar87qbs6xtTAN?= =?us-ascii?Q?4I3RDZk3hxF7FtyOYbGS6jrmu4BO+mDXDg1ORKi6a5MCFtaZWeJ1XyaCvKIb?= =?us-ascii?Q?5GLnw7tILVRyBW7yvHRSGk=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3468; 6:RVCUcScjVRDKDoWQA4rcyJEjrd7W4NsXGwIBnc2bu+83YtAcO7+VXqyg17aoWVQ8ZxRz8LP8kyB+Vca6ME0u0nKgndSRjGKHV226zmTjNSsVlQcbGPtmbX4G0Y+TFJ4rDtJ71bHnpRkXcxARma/Kp2ilXf6sfM/ClkZDs/V5ou3P1G356rDwyPpo761lbI2TXpHAFCyMZo3djUgPclfVHyBOqF6lWavofjBrP54oGT1OAVdNuGHJ5Syts8QynKDa8guvsjsU1/kjui1tMyStQSh90zwpFmfnIfvn/KHB4c9FFsSTOuTneIQr7S8U2UmqWfp+iUEDStFsLFox3h27Jw==; 5:MAcB98ySuSPgdnAyrjKPy48G3Tkj1v+16Hly+/1LPEKp00cp/yQFhWJjrLqFH5UCf2zA9kfJ/AhVarmyLQIYghP9La43M+kYgqYWMSToqLHwEVkfka/LST+P8fYVxU27iJ02nxVwahAuOz+GAkh1NQ==; 24:BmzqgjITZuqEJlPTNGBvma78RRSAY7chfLZ6uH9Hkv96H2GyaiaRhQdBKYfhpX91KnV81OVVxWfhdwHKx5dNOexbz3Gyd3qG49zhpd991lc=; 7:IbY0M6bZ7cG0o14q8SqYnBhL23CqcZcUyZzcvvCrliG76CWcA/1y5lhV++6OaDDEyL+Bh5hTFQVKg1HYfB//a3PRsLv5LrJUYmoYNAbTCrmj/TH8OyYJd15s8vCR2KKA9OorcNGxIXZUl9hI7+4Jb66rAUxiDy0VlN5Q5UYc6YpS8WlXiSPEp1xusCukRDeYEmhsQglypQdQ+aCEFwrHmlzo7ODt9VOGqKeGMEQz3NU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2017 17:31:25.3838 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3468 Subject: Re: [dpdk-dev] [PATCH] eal: added new `rte_lcore_is_service_lcore` API. 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: Wed, 20 Sep 2017 17:31:29 -0000 On Wed, Sep 20, 2017 at 05:53:04PM +0200, Thomas Monjalon wrote: > 20/09/2017 16:53, Van Haaren, Harry: > > From: Pavan Nikhilesh Bhagavatula [mailto:pbhagavatula@caviumnetworks.com] > > > On Fri, Sep 15, 2017 at 05:51:36PM +0200, Thomas Monjalon wrote: > > > > 15/09/2017 16:59, Pavan Nikhilesh Bhagavatula: > > > > > On Fri, Sep 15, 2017 at 02:44:57PM +0000, Van Haaren, Harry wrote: > > > > > > > > > > > > > We could also choose to add this function to rte_service.h ? > > > > > > > > > > > > > > > > Yes that is an option, and OK with me. > > > > > > > > > > > > > > > > @Pavan what do you think of adding it to service.h, implement in .c > > > and add > > > > > > > to .map? > > > > > > > > > > > > > > > > > > > > > > The ROLE_SERVICE/ROLE_RTE defines the role of a lcore so it made sense > > > to put > > > > > > > it in rte_lcore.h as lcore properties are accessed mostly through this > > > header. > > > > > > > I'm fine with adding it to service.h as suggested by Harry. > > > > > > > > > > > > > > -Pavan > > > > > > > > > > > > *as suggested by Thomas ;) > > > > > > > > > > > > Initially I thought it made more sense in lcore.h too, however the > > > application > > > > > > should only require knowing if core X is a service core if it cares about > > > > > > services / service-cores, hence I'm fine with rte_service.h too. > > > > > > > > > > > > -Harry > > > > > > > > > > > Agreed, will spin up a v2. > > > > > > > > The most difficult is to find a good name for this function :) > > > > > > If not rte_lcore_is_service_core then how about rte_lcore_is_role_service? > > > But this would need a sibling api rte_lcore_is_role_rte (or a better one) which > > > is satisfied by rte_lcore_is_enabled :( > > > IMO when role was limited to RTE & OFF rte_lcore_is_enabled fits now with > > > new role SERVICE it looks out of place cause even service lcores are > > > "enabled". > > > Modifying rte_lcore_is_enabled would be a huge task (API change) as it is used > > > widely in many places. > > > > Hey all, > > > > I've been thinking a little, and adding the "is service core" functionality in the > > rte_service_* namespace might be the wrong place. The function name certainly doesn't > > roll off the tongue ( rte_service_lcore_has_service_role() ?? ) > > > > What if we add a new function to rte_lcore.h? The implementation could be in a > > new file, rte_lcore.c, to avoid "static inline" in a control-path function. > > > > In my eyes, this approach is the cleanest as it allows re-use of the same function > > for various types, including SERVICE, RTE, OFF etc. > > > > > > /** Probes if the calling core has a specific role. > > * @retval 1 If the core has role matching the *role* passed in > > * @retval 0 If the core's role does not match *role* passed in > > */ > > int > > rte_lcore_has_role(enum rte_lcore_role_t role); > > > > > > Application code becomes pretty self-documenting: > > if (rte_lcore_has_role(ROLE_SERVICE)) { > > // do something > > } > > > > Thoughts? -Harry > > OK, no problem > Thanks for all the inputs will spin up a v2. -Pavan