From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 90CDD1C01 for ; Wed, 1 May 2019 04:12:57 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x412BVsW022416; Tue, 30 Apr 2019 19:12:55 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=ANn+x/kgHduUeoHIgAevEyjKZ8qB4MXLvazJFahl1+0=; b=emOMGUglD04i9Dfo7aTFDT6hZLnHOBRbW4aXP1/pXCsDZgRGKnBD7fu8fz/Uo/h9W2ZC y+j3JJ0rxgFy59aULHakbfd5InyEyXYy1Nrj/Iid01ACLVVWMXEznLMT1UxvOsceUfj9 kfgXnnXE9rL6Ihs/ekuBuaxPiCLnIs5dwzARVQF73uz0o2Q1N+3ErP1G6eAUd+wV41Ci SrGPknaPgG56lTp8wicZxsV3Ox8bjnMWYwTrGq2oZgoLSIdhT62gV34sl573V9jp9z0s V/sjFrULaU7iH6LN6l7XLJPG7QmlsptkM8OH2jW8mbdRamAi46rBRbcjLxh3s9noNewl tg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2s6xj60sr6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 30 Apr 2019 19:12:55 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 30 Apr 2019 19:12:54 -0700 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (104.47.41.56) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 30 Apr 2019 19:12:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ANn+x/kgHduUeoHIgAevEyjKZ8qB4MXLvazJFahl1+0=; b=FRNXbAOuBjbOZg7DZ4FQR83mpj5aatKDSeuyz/+7lxhMQ+y/Aj3QFUExGXTZRB/LN58dvcERlGkpNh1JPqodaW/UNiR+tcyyZrBKWX6M+c46WOoYhOg6TC9o8AlnZvjzCfk5op737oI0vB6LeWmIRCc49i+9WEMZOveQIQOqYFQ= Received: from BYAPR18MB2424.namprd18.prod.outlook.com (20.179.91.149) by BYAPR18MB2662.namprd18.prod.outlook.com (20.179.94.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.13; Wed, 1 May 2019 02:12:52 +0000 Received: from BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::6dd3:c056:b23b:ab4e]) by BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::6dd3:c056:b23b:ab4e%7]) with mapi id 15.20.1835.018; Wed, 1 May 2019 02:12:52 +0000 From: Jerin Jacob Kollanukkaran To: Stephen Hemminger CC: "dev@dpdk.org" Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH v2 2/5] eal: add accessor functions for lcore_config Thread-Index: AQHU/5bHubqyM/4/h06J7VchtaagC6ZVhcog Date: Wed, 1 May 2019 02:12:52 +0000 Message-ID: References: <20190408182510.16078-1-stephen@networkplumber.org> <20190410171603.8979-1-stephen@networkplumber.org> <20190410171603.8979-3-stephen@networkplumber.org> <20190430135315.037f06c4@hermes.lan> In-Reply-To: <20190430135315.037f06c4@hermes.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [27.61.8.168] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 52eff81e-e4cb-44d0-4104-08d6cdda8484 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:BYAPR18MB2662; x-ms-traffictypediagnostic: BYAPR18MB2662: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 00246AB517 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(366004)(136003)(396003)(39860400002)(189003)(199004)(13464003)(86362001)(8936002)(6246003)(256004)(71190400001)(5660300002)(316002)(186003)(66476007)(26005)(7696005)(66446008)(64756008)(66556008)(8676002)(6916009)(76116006)(52536014)(68736007)(74316002)(55016002)(4326008)(71200400001)(6436002)(25786009)(102836004)(33656002)(6506007)(53546011)(73956011)(76176011)(53936002)(486006)(478600001)(81156014)(66946007)(229853002)(2906002)(446003)(6116002)(7736002)(99286004)(305945005)(11346002)(66066001)(3846002)(9686003)(14454004)(476003)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB2662; H:BYAPR18MB2424.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: qszDdxz2BTw1kOZTKXDJYNsHbgjWmY7pxvA7V+I41gNOEwUJxcSdk+CLsD4s5AsiLFos+qpfOwYBgApgH74Mk3UK4Lp2E/GPlgfFtwhKA0xWkRW+uBW/UbOwQC+foXpgYs1digQvTCcZheOMSN5MqvKQAgmLXbxxK1IwPOG9naETFuMsl/oLoMKbGp9df0t/g2W3i4QjVlahS+3JUzWRikCNqQw7jPevdGrHh9WrMUT7CyAAfkoXPZaGN+69NENA1Tu2NviGWMqtpDHih8iygNwuQI8+Z4z3tVgthrF9USzXp0W3+AZsStnl1IuvlhJc/ZDiZxVpelFMpbJZ+LN0Ct7dQb8CosqgdY32Typ/redPlahn856KZhkddHN7nP0E9kTajEEt4GCRYA81mSiniv0bzNye2XVFwYoLwVZ8nrE= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 52eff81e-e4cb-44d0-4104-08d6cdda8484 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 May 2019 02:12:52.7937 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2662 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-01_01:, , signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v2 2/5] eal: add accessor functions for lcore_config 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, 01 May 2019 02:12:58 -0000 > -----Original Message----- > From: Stephen Hemminger > Sent: Wednesday, May 1, 2019 2:23 AM > To: Jerin Jacob Kollanukkaran > Cc: dev@dpdk.org > Subject: [EXT] Re: [dpdk-dev] [PATCH v2 2/5] eal: add accessor functions = for > lcore_config > On Tue, 16 Apr 2019 17:03:47 +0000 > Jerin Jacob Kollanukkaran wrote: >=20 > > > -----Original Message----- > > > From: dev On Behalf Of Stephen Hemminger > > > Sent: Wednesday, April 10, 2019 10:46 PM > > > To: dev@dpdk.org > > > Cc: Stephen Hemminger > > > Subject: [dpdk-dev] [PATCH v2 2/5] eal: add accessor functions for > > > lcore_config > > > > > > The fields of the internal EAL core configuration are currently laid > > > bare as part of the API. This is not good practice and limits fixing = issues with > layout and sizes. > > > > > > Make new accessor functions for the fields used by current drivers > > > and examples. Mark return code functions as experimental since this > > > value might change in the future and probably shouldn't have been > > > used by non EAL code anyway. > > > > > > Signed-off-by: Stephen Hemminger > > > Reviewed-by: David Marchand Shared > > > Library Versions > > > ----------------------- > > > diff --git a/lib/librte_eal/common/eal_common_lcore.c > > > b/lib/librte_eal/common/eal_common_lcore.c > > > index 1cbac42286ba..6cf4d7abb0bd 100644 > > > --- a/lib/librte_eal/common/eal_common_lcore.c > > > +++ b/lib/librte_eal/common/eal_common_lcore.c > > > @@ -16,6 +16,45 @@ > > > #include "eal_private.h" > > > #include "eal_thread.h" > > > > > > +int rte_lcore_index(int lcore_id) > > > +{ > > > + if (unlikely(lcore_id >=3D RTE_MAX_LCORE)) > > > + return -1; > > > + > > > + if (lcore_id < 0) > > > + lcore_id =3D (int)rte_lcore_id(); > > > + > > > + return lcore_config[lcore_id].core_index; > > > +} > > > > If I understand it correctly, We are planning to do this scheme only fo= r slow > path functions. Right? > > Is rte_lcore_* functions comes in slow path category? I thought a few > > of them can be used In fast path too. > > I am bit concerned about a low end arm cores where function invocation > overhead significant vs inline. > > ODP has taken a route of introducing a compile time config to choose > > inline vs separate function to address the performance regression . I a= m not > sure what would be the correct way to handle this. >=20 > The lcore config itself is not accessed anywhere in fastpath of any of th= e > examples. > It is usually is part of the setup process. The rte_lcore_index is only u= sed by > lthread in a log message. Makes sense. >=20 > The main fastpath is rte_lcore_id() which is already done by per-thread v= ariable > and is unchanged by these patches. >=20 How about creating a tag like __rte_experimental, say __rte_fastpath for fastpath functions to avoid confusion between what is fastpath and wha= t is not between developers and end users. By creating new section in linker, will make all fast path function in one area. > I don't have facilities to do any deep dive performance testing on ARM. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id D39F5A0679 for ; Wed, 1 May 2019 04:13:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 10851374C; Wed, 1 May 2019 04:13:00 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 90CDD1C01 for ; Wed, 1 May 2019 04:12:57 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x412BVsW022416; Tue, 30 Apr 2019 19:12:55 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=ANn+x/kgHduUeoHIgAevEyjKZ8qB4MXLvazJFahl1+0=; b=emOMGUglD04i9Dfo7aTFDT6hZLnHOBRbW4aXP1/pXCsDZgRGKnBD7fu8fz/Uo/h9W2ZC y+j3JJ0rxgFy59aULHakbfd5InyEyXYy1Nrj/Iid01ACLVVWMXEznLMT1UxvOsceUfj9 kfgXnnXE9rL6Ihs/ekuBuaxPiCLnIs5dwzARVQF73uz0o2Q1N+3ErP1G6eAUd+wV41Ci SrGPknaPgG56lTp8wicZxsV3Ox8bjnMWYwTrGq2oZgoLSIdhT62gV34sl573V9jp9z0s V/sjFrULaU7iH6LN6l7XLJPG7QmlsptkM8OH2jW8mbdRamAi46rBRbcjLxh3s9noNewl tg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2s6xj60sr6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 30 Apr 2019 19:12:55 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 30 Apr 2019 19:12:54 -0700 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (104.47.41.56) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 30 Apr 2019 19:12:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ANn+x/kgHduUeoHIgAevEyjKZ8qB4MXLvazJFahl1+0=; b=FRNXbAOuBjbOZg7DZ4FQR83mpj5aatKDSeuyz/+7lxhMQ+y/Aj3QFUExGXTZRB/LN58dvcERlGkpNh1JPqodaW/UNiR+tcyyZrBKWX6M+c46WOoYhOg6TC9o8AlnZvjzCfk5op737oI0vB6LeWmIRCc49i+9WEMZOveQIQOqYFQ= Received: from BYAPR18MB2424.namprd18.prod.outlook.com (20.179.91.149) by BYAPR18MB2662.namprd18.prod.outlook.com (20.179.94.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.13; Wed, 1 May 2019 02:12:52 +0000 Received: from BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::6dd3:c056:b23b:ab4e]) by BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::6dd3:c056:b23b:ab4e%7]) with mapi id 15.20.1835.018; Wed, 1 May 2019 02:12:52 +0000 From: Jerin Jacob Kollanukkaran To: Stephen Hemminger CC: "dev@dpdk.org" Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH v2 2/5] eal: add accessor functions for lcore_config Thread-Index: AQHU/5bHubqyM/4/h06J7VchtaagC6ZVhcog Date: Wed, 1 May 2019 02:12:52 +0000 Message-ID: References: <20190408182510.16078-1-stephen@networkplumber.org> <20190410171603.8979-1-stephen@networkplumber.org> <20190410171603.8979-3-stephen@networkplumber.org> <20190430135315.037f06c4@hermes.lan> In-Reply-To: <20190430135315.037f06c4@hermes.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [27.61.8.168] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 52eff81e-e4cb-44d0-4104-08d6cdda8484 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:BYAPR18MB2662; x-ms-traffictypediagnostic: BYAPR18MB2662: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 00246AB517 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(366004)(136003)(396003)(39860400002)(189003)(199004)(13464003)(86362001)(8936002)(6246003)(256004)(71190400001)(5660300002)(316002)(186003)(66476007)(26005)(7696005)(66446008)(64756008)(66556008)(8676002)(6916009)(76116006)(52536014)(68736007)(74316002)(55016002)(4326008)(71200400001)(6436002)(25786009)(102836004)(33656002)(6506007)(53546011)(73956011)(76176011)(53936002)(486006)(478600001)(81156014)(66946007)(229853002)(2906002)(446003)(6116002)(7736002)(99286004)(305945005)(11346002)(66066001)(3846002)(9686003)(14454004)(476003)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB2662; H:BYAPR18MB2424.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: qszDdxz2BTw1kOZTKXDJYNsHbgjWmY7pxvA7V+I41gNOEwUJxcSdk+CLsD4s5AsiLFos+qpfOwYBgApgH74Mk3UK4Lp2E/GPlgfFtwhKA0xWkRW+uBW/UbOwQC+foXpgYs1digQvTCcZheOMSN5MqvKQAgmLXbxxK1IwPOG9naETFuMsl/oLoMKbGp9df0t/g2W3i4QjVlahS+3JUzWRikCNqQw7jPevdGrHh9WrMUT7CyAAfkoXPZaGN+69NENA1Tu2NviGWMqtpDHih8iygNwuQI8+Z4z3tVgthrF9USzXp0W3+AZsStnl1IuvlhJc/ZDiZxVpelFMpbJZ+LN0Ct7dQb8CosqgdY32Typ/redPlahn856KZhkddHN7nP0E9kTajEEt4GCRYA81mSiniv0bzNye2XVFwYoLwVZ8nrE= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 52eff81e-e4cb-44d0-4104-08d6cdda8484 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 May 2019 02:12:52.7937 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2662 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-01_01:, , signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v2 2/5] eal: add accessor functions for lcore_config 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190501021252.nHvjxpwCni3tR7VYZ_PJjN2uSTeuIoQeVMrMmfTqKh8@z> > -----Original Message----- > From: Stephen Hemminger > Sent: Wednesday, May 1, 2019 2:23 AM > To: Jerin Jacob Kollanukkaran > Cc: dev@dpdk.org > Subject: [EXT] Re: [dpdk-dev] [PATCH v2 2/5] eal: add accessor functions = for > lcore_config > On Tue, 16 Apr 2019 17:03:47 +0000 > Jerin Jacob Kollanukkaran wrote: >=20 > > > -----Original Message----- > > > From: dev On Behalf Of Stephen Hemminger > > > Sent: Wednesday, April 10, 2019 10:46 PM > > > To: dev@dpdk.org > > > Cc: Stephen Hemminger > > > Subject: [dpdk-dev] [PATCH v2 2/5] eal: add accessor functions for > > > lcore_config > > > > > > The fields of the internal EAL core configuration are currently laid > > > bare as part of the API. This is not good practice and limits fixing = issues with > layout and sizes. > > > > > > Make new accessor functions for the fields used by current drivers > > > and examples. Mark return code functions as experimental since this > > > value might change in the future and probably shouldn't have been > > > used by non EAL code anyway. > > > > > > Signed-off-by: Stephen Hemminger > > > Reviewed-by: David Marchand Shared > > > Library Versions > > > ----------------------- > > > diff --git a/lib/librte_eal/common/eal_common_lcore.c > > > b/lib/librte_eal/common/eal_common_lcore.c > > > index 1cbac42286ba..6cf4d7abb0bd 100644 > > > --- a/lib/librte_eal/common/eal_common_lcore.c > > > +++ b/lib/librte_eal/common/eal_common_lcore.c > > > @@ -16,6 +16,45 @@ > > > #include "eal_private.h" > > > #include "eal_thread.h" > > > > > > +int rte_lcore_index(int lcore_id) > > > +{ > > > + if (unlikely(lcore_id >=3D RTE_MAX_LCORE)) > > > + return -1; > > > + > > > + if (lcore_id < 0) > > > + lcore_id =3D (int)rte_lcore_id(); > > > + > > > + return lcore_config[lcore_id].core_index; > > > +} > > > > If I understand it correctly, We are planning to do this scheme only fo= r slow > path functions. Right? > > Is rte_lcore_* functions comes in slow path category? I thought a few > > of them can be used In fast path too. > > I am bit concerned about a low end arm cores where function invocation > overhead significant vs inline. > > ODP has taken a route of introducing a compile time config to choose > > inline vs separate function to address the performance regression . I a= m not > sure what would be the correct way to handle this. >=20 > The lcore config itself is not accessed anywhere in fastpath of any of th= e > examples. > It is usually is part of the setup process. The rte_lcore_index is only u= sed by > lthread in a log message. Makes sense. >=20 > The main fastpath is rte_lcore_id() which is already done by per-thread v= ariable > and is unchanged by these patches. >=20 How about creating a tag like __rte_experimental, say __rte_fastpath for fastpath functions to avoid confusion between what is fastpath and wha= t is not between developers and end users. By creating new section in linker, will make all fast path function in one area. > I don't have facilities to do any deep dive performance testing on ARM.