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 D3DA21B540 for ; Tue, 16 Apr 2019 19:03:53 +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 x3GGtY88020883; Tue, 16 Apr 2019 10:03:52 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=tqW+AqmIfcx93yGTTd9IfA+e4lwYZbDS4LI4OXmSm+Y=; b=fmB3bebKC5vJgn91HhUNikp8F3I5HWerXWqesMQXDm4OXf4YSd77JVniOHFTjsSWj60A NagROGvzNAGJoy6DRO0hfeK/zjNcT+Dv68583X2cKLfESMwndNdOdbF+zqhm4lWAtdFR Njsxs8MOSX5n0U2uIdKZt2fx2ImgdamZ23O0IRfXqHAAM4Ksy02RAlzxdOQ8Mm1Cx7Q7 OzT4YIrOU1NmD9l5lWeI9sYRr6aostiJcNvKoRGikyu31Ne4xhnMZCybbS2OQ+OmPgDs d3pmWRrhWo/5H7jMxN2ndI4S1m86EG7vVK8SptHx7XdIiQ/5GHcn0tlygURW9olfXxhU hw== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2rw5ydb72n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 16 Apr 2019 10:03:52 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 16 Apr 2019 10:03:52 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.59) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 16 Apr 2019 10:03:52 -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=tqW+AqmIfcx93yGTTd9IfA+e4lwYZbDS4LI4OXmSm+Y=; b=Pt1iUDmnwaX4vfK/cRMUZroOQHs4P3yL/g80U0TyLftbsuK70zG29TruuSAMARvxWVNA3+SS9+gWl3aOgHiOR1OkwkF4HyA1/7GXQsAvAMHJ+wEiQh0HE3P/m0vqoAJABQ9KUJlahLmz1hH6DtaGlBT6oRs2fGBkoI3VR8Dl718= Received: from BYAPR18MB2424.namprd18.prod.outlook.com (20.179.91.149) by BYAPR18MB2696.namprd18.prod.outlook.com (20.178.207.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.12; Tue, 16 Apr 2019 17:03:48 +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.1813.011; Tue, 16 Apr 2019 17:03:48 +0000 From: Jerin Jacob Kollanukkaran To: Stephen Hemminger , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 2/5] eal: add accessor functions for lcore_config Thread-Index: AQHU78cBcVcHXBs8VUWgMdLcwrYvbKY/B9Jg Date: Tue, 16 Apr 2019 17:03:47 +0000 Message-ID: References: <20190408182510.16078-1-stephen@networkplumber.org> <20190410171603.8979-1-stephen@networkplumber.org> <20190410171603.8979-3-stephen@networkplumber.org> In-Reply-To: <20190410171603.8979-3-stephen@networkplumber.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [2401:4900:3150:775d:4899:911e:82a9:8a92] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5d746998-69f3-4c06-c9a9-08d6c28d7e14 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600140)(711020)(4605104)(2017052603328)(7193020); SRVR:BYAPR18MB2696; x-ms-traffictypediagnostic: BYAPR18MB2696: x-microsoft-antispam-prvs: x-forefront-prvs: 000947967F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(136003)(346002)(396003)(366004)(376002)(13464003)(199004)(189003)(52536014)(229853002)(6246003)(33656002)(25786009)(71200400001)(71190400001)(99286004)(110136005)(316002)(6436002)(6116002)(53936002)(55016002)(7696005)(76176011)(9686003)(86362001)(186003)(102836004)(256004)(81156014)(14454004)(68736007)(81166006)(97736004)(6506007)(53546011)(106356001)(2906002)(478600001)(2501003)(105586002)(8936002)(446003)(46003)(5660300002)(305945005)(7736002)(486006)(11346002)(476003)(74316002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB2696; H:BYAPR18MB2424.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: gZuXHb2H+6tJ8nfHrA7ca3c9l0HgzSxIecVxRGt4ILjG0Dn9mcrfuudEILhARj+oI9OWcq+s9a0MtYtPeS7A+YTSp84ad0qy/hUKazEjO7rSM/poe5VKpw5dgB9RTvVAM3KcansQnEClEYjAdsMWWWPvI0g5F3j8WQWEF2vlkwKr0zxRPWgVlOLDDVBq3vD+yi5n90OnX8Fs71qgoRyz3JntitJZExi9OuBWRa7MWrlQrMGTO8JdncM6RETjyrxn+yURakNKeCPqyqZq3CDkbsRmSLAa4RM/fBSuphqMhZjK7IVzgAAJ9txezov1su+qTm0pSufxoUUlRGhmiaHbWOjJOuo3Vt5UdUb7I+m3wBn/tJf+CtKwzGAQwNzjZooiAfm9WgBIuRsafyvHD1VddDSHahUBgiYQf5VogvxvSts= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5d746998-69f3-4c06-c9a9-08d6c28d7e14 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2019 17:03:47.9491 (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: BYAPR18MB2696 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-16_06:, , signatures=0 Subject: Re: [dpdk-dev] [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: Tue, 16 Apr 2019 17:03:54 -0000 > -----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 >=20 > 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 a= nd sizes. >=20 > Make new accessor functions for the fields used by current drivers and > examples. Mark return code functions as experimental since this value mig= ht > change in the future and probably shouldn't have been used by non EAL cod= e > anyway. >=20 > 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" >=20 > +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 for sl= ow path functions. Right? Is rte_lcore_* functions comes in slow path category? I thought a few of th= em can be used In fast path too. I am bit concerned about a low end arm cores where function invocation over= head 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 am not sure what would be the correct way to= handle this. =20 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 D7645A00E6 for ; Tue, 16 Apr 2019 19:03:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C266C1B544; Tue, 16 Apr 2019 19:03:55 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id D3DA21B540 for ; Tue, 16 Apr 2019 19:03:53 +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 x3GGtY88020883; Tue, 16 Apr 2019 10:03:52 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=tqW+AqmIfcx93yGTTd9IfA+e4lwYZbDS4LI4OXmSm+Y=; b=fmB3bebKC5vJgn91HhUNikp8F3I5HWerXWqesMQXDm4OXf4YSd77JVniOHFTjsSWj60A NagROGvzNAGJoy6DRO0hfeK/zjNcT+Dv68583X2cKLfESMwndNdOdbF+zqhm4lWAtdFR Njsxs8MOSX5n0U2uIdKZt2fx2ImgdamZ23O0IRfXqHAAM4Ksy02RAlzxdOQ8Mm1Cx7Q7 OzT4YIrOU1NmD9l5lWeI9sYRr6aostiJcNvKoRGikyu31Ne4xhnMZCybbS2OQ+OmPgDs d3pmWRrhWo/5H7jMxN2ndI4S1m86EG7vVK8SptHx7XdIiQ/5GHcn0tlygURW9olfXxhU hw== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2rw5ydb72n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 16 Apr 2019 10:03:52 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 16 Apr 2019 10:03:52 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.59) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 16 Apr 2019 10:03:52 -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=tqW+AqmIfcx93yGTTd9IfA+e4lwYZbDS4LI4OXmSm+Y=; b=Pt1iUDmnwaX4vfK/cRMUZroOQHs4P3yL/g80U0TyLftbsuK70zG29TruuSAMARvxWVNA3+SS9+gWl3aOgHiOR1OkwkF4HyA1/7GXQsAvAMHJ+wEiQh0HE3P/m0vqoAJABQ9KUJlahLmz1hH6DtaGlBT6oRs2fGBkoI3VR8Dl718= Received: from BYAPR18MB2424.namprd18.prod.outlook.com (20.179.91.149) by BYAPR18MB2696.namprd18.prod.outlook.com (20.178.207.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.12; Tue, 16 Apr 2019 17:03:48 +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.1813.011; Tue, 16 Apr 2019 17:03:48 +0000 From: Jerin Jacob Kollanukkaran To: Stephen Hemminger , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 2/5] eal: add accessor functions for lcore_config Thread-Index: AQHU78cBcVcHXBs8VUWgMdLcwrYvbKY/B9Jg Date: Tue, 16 Apr 2019 17:03:47 +0000 Message-ID: References: <20190408182510.16078-1-stephen@networkplumber.org> <20190410171603.8979-1-stephen@networkplumber.org> <20190410171603.8979-3-stephen@networkplumber.org> In-Reply-To: <20190410171603.8979-3-stephen@networkplumber.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [2401:4900:3150:775d:4899:911e:82a9:8a92] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5d746998-69f3-4c06-c9a9-08d6c28d7e14 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600140)(711020)(4605104)(2017052603328)(7193020); SRVR:BYAPR18MB2696; x-ms-traffictypediagnostic: BYAPR18MB2696: x-microsoft-antispam-prvs: x-forefront-prvs: 000947967F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(136003)(346002)(396003)(366004)(376002)(13464003)(199004)(189003)(52536014)(229853002)(6246003)(33656002)(25786009)(71200400001)(71190400001)(99286004)(110136005)(316002)(6436002)(6116002)(53936002)(55016002)(7696005)(76176011)(9686003)(86362001)(186003)(102836004)(256004)(81156014)(14454004)(68736007)(81166006)(97736004)(6506007)(53546011)(106356001)(2906002)(478600001)(2501003)(105586002)(8936002)(446003)(46003)(5660300002)(305945005)(7736002)(486006)(11346002)(476003)(74316002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB2696; H:BYAPR18MB2424.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: gZuXHb2H+6tJ8nfHrA7ca3c9l0HgzSxIecVxRGt4ILjG0Dn9mcrfuudEILhARj+oI9OWcq+s9a0MtYtPeS7A+YTSp84ad0qy/hUKazEjO7rSM/poe5VKpw5dgB9RTvVAM3KcansQnEClEYjAdsMWWWPvI0g5F3j8WQWEF2vlkwKr0zxRPWgVlOLDDVBq3vD+yi5n90OnX8Fs71qgoRyz3JntitJZExi9OuBWRa7MWrlQrMGTO8JdncM6RETjyrxn+yURakNKeCPqyqZq3CDkbsRmSLAa4RM/fBSuphqMhZjK7IVzgAAJ9txezov1su+qTm0pSufxoUUlRGhmiaHbWOjJOuo3Vt5UdUb7I+m3wBn/tJf+CtKwzGAQwNzjZooiAfm9WgBIuRsafyvHD1VddDSHahUBgiYQf5VogvxvSts= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5d746998-69f3-4c06-c9a9-08d6c28d7e14 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2019 17:03:47.9491 (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: BYAPR18MB2696 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-16_06:, , signatures=0 Subject: Re: [dpdk-dev] [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: <20190416170347.OrGgIKt0op2prbwwRRx5MyzGoEkkTNGgcMgukwcpAwk@z> > -----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 >=20 > 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 a= nd sizes. >=20 > Make new accessor functions for the fields used by current drivers and > examples. Mark return code functions as experimental since this value mig= ht > change in the future and probably shouldn't have been used by non EAL cod= e > anyway. >=20 > 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" >=20 > +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 for sl= ow path functions. Right? Is rte_lcore_* functions comes in slow path category? I thought a few of th= em can be used In fast path too. I am bit concerned about a low end arm cores where function invocation over= head 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 am not sure what would be the correct way to= handle this. =20