From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8B0B14372F; Wed, 20 Dec 2023 02:32:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 05A8441153; Wed, 20 Dec 2023 02:32:24 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2062.outbound.protection.outlook.com [40.107.93.62]) by mails.dpdk.org (Postfix) with ESMTP id 248AC40A71; Wed, 20 Dec 2023 02:32:22 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IuckOMVnjUyJ1LRtMBN+4jqLS5vIYFdtoVbi6bGN3YNyiZXwFgPQVa1zT9zZVN0O8s13qiX2t86DZIPxuGKhGhwZadv+gYKMH/cpQnM2III7yxOffjYAgD3zy71p3MSZIT3Bwv0KPFyPaXOEMTwacsRff59dDI4sw4UUlqE0Ic4F6bngwAdCnbHgYlwwVuDQ1YHgKPi0JEsRBZNnB9jZAUntLOlrYgaCGPDRJcq03lL478PokxP7LwctuYUK513jcxcoRrHmHzcvf65qo3rNapyxgLLydQ799yphSBfTvoywcxPtIGSW/Y+09evxkqoucnM8Ag0L00HIwPYbELhW4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XLueruMYYISdbhfSyUjs3k0YMtNHE2XQ7i4SZ1yzlk4=; b=lkBoyGcyuDu7I/69oIDvyw+d2CDf45bcBQuLPmsKd8m6MFxO1kvUm2kpmMHtCVUOdbXgbhpj2bP2UjwUjT3gwMQp3rAn1Zp2bR9uS/5GtIXOCmXM0EkMIA2lq7LpPtuipaCx7Co0T3MTEjRZJsDT01XSFT25rq1LswSWIIBd5ZrpnlZgm79R81NVsNNf0ObO7gafbasDzu7WAaSUjRRP6nd2smdg57BClZXp6neSmV6zEw2t++WKbwyINjM5FUTrPq2wArXxbyxBP4zLF21wrtlPOKyXcm7M0kXhY0K0/55BaN66wAduGvRk0u6pwunxu6sIUWAHVjOatA71kG+ogw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XLueruMYYISdbhfSyUjs3k0YMtNHE2XQ7i4SZ1yzlk4=; b=wGgBhp7I38WBh0gh1dHds/q8ZP1esXu8lZHB/+pDLV3wv2o7XgWwYUOlJaAHxqREZ2DCNNIYUyfy7oGgcKMmzktg71LIVOess8BUwl/QMMgP04uLlKupoAJBSwB/q6e2SOfaupHtp7Wf86dtum5HYewTcsx/t0Gg0GvHwB9wiLw= Received: from DM3PR12MB9286.namprd12.prod.outlook.com (2603:10b6:8:1ae::6) by CY8PR12MB7660.namprd12.prod.outlook.com (2603:10b6:930:84::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Wed, 20 Dec 2023 01:32:19 +0000 Received: from DM3PR12MB9286.namprd12.prod.outlook.com ([fe80::2f17:4c1d:b750:cc44]) by DM3PR12MB9286.namprd12.prod.outlook.com ([fe80::2f17:4c1d:b750:cc44%4]) with mapi id 15.20.7091.034; Wed, 20 Dec 2023 01:32:19 +0000 From: "Tummala, Sivaprasad" To: Konstantin Ananyev , "david.hunt@intel.com" , "anatoly.burakov@intel.com" , "jerinj@marvell.com" , "radu.nicolau@intel.com" , "gakhil@marvell.com" , "cristian.dumitrescu@intel.com" , "Yigit, Ferruh" CC: "dev@dpdk.org" , "stable@dpdk.org" Subject: RE: [PATCH v2 1/6] examples/l3fwd: fix lcore ID restriction Thread-Topic: [PATCH v2 1/6] examples/l3fwd: fix lcore ID restriction Thread-Index: AQHaMiuK0qpuKWNEbkKZNn7XuV63FLCwgwIAgAAG2ACAAByRcIAAEBwAgACtbUA= Date: Wed, 20 Dec 2023 01:32:19 +0000 Message-ID: References: <20231218074905.42749-1-sivaprasad.tummala@amd.com> <20231219032826.4814-1-sivaprasad.tummala@amd.com> <20231219032826.4814-2-sivaprasad.tummala@amd.com> <0897bc70dd984126a02c3f5046495c1c@huawei.com> <2a21fc7ad41243ce935cdc6d80b0eb96@huawei.com> In-Reply-To: <2a21fc7ad41243ce935cdc6d80b0eb96@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=6b2172aa-23e6-4c4d-802d-4aeba198435a; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2023-12-20T01:30:42Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM3PR12MB9286:EE_|CY8PR12MB7660:EE_ x-ms-office365-filtering-correlation-id: 36b8ac46-5ee7-4231-0b5e-08dc00fb81cd x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iVml1zjJBaj4mWiRTM+08GTWbIQBMRgBmZth347avBGI33D68kT1wLwo+zS/DmMYkbzwGRlmmgI4Bl3aKimJcczDiZUHzpWE3kWnTwyuwt/9xQQjBIe8qnx4synhop2MDJb0grcwtZNebRnkrZ5OyQSWy+7AsGnckTAOfmVbBzk2XpsyxIWMFz2nFvv3NzVojNvLOjyPmPeqhZSH6O6c4s0YiX+JsKgWigOdgSYzX8H/N9j+4vb+mlc0kxEBsOKo4RsakyodAmhVCzlXc5iHxCPx1rkjIy8d/lPPrnmdXAdazjS+tnpN5kZ97D69QVYPc6ofy2VqiK1DMx3tn3IsTrfRsiyUlgzt301rdVwJUqnqXP6/YD909BaKhHMdM/4OpqvpeeylbIZjqW9hG11yGQZrWSEbBZi7lfRm5QAZr/hjpTbgeTtD/JXfjU2PSk8N+28uuoyNOt10i9+NdDGTHAXLFcqHD7TOFXHLE5kC8a7oTyjNjF4C51zKcLPH+n/Cj2gGr1FlH0vwBw374g2iRcsi/aHvH2heP3s0PlFtB4uKHKv2Bz4ITKikN6snYnw0FNafB5UW0NlSURuPtL8Lu5NpifGqmcKL9Z9gYNWqa+t0TvBo3bQOj+a+vly67nbOmO3/5rYTNNLJP1VitKQx3lEY420dfx12IOPhdxa1zUw= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM3PR12MB9286.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(346002)(39860400002)(396003)(366004)(376002)(230922051799003)(230173577357003)(230273577357003)(1800799012)(186009)(64100799003)(451199024)(71200400001)(26005)(54906003)(52536014)(8936002)(83380400001)(5660300002)(9686003)(66946007)(7696005)(53546011)(8676002)(76116006)(41300700001)(478600001)(66556008)(6636002)(110136005)(66476007)(4326008)(66446008)(2906002)(316002)(64756008)(86362001)(6506007)(33656002)(122000001)(38070700009)(38100700002)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?nlr6W0Pcc2WiZfdsZDI9DG78JxPsp59VN94jWAOGxB8jcK2BUWpC3jtYsAOt?= =?us-ascii?Q?eYbY6/hePmCqaVZQanADAzKpVQOyrOU/PQQhUWAmf03zNkaJZSXXBld/NHZE?= =?us-ascii?Q?RVQwtUK5DSpDK7Qyj742M++BepHAxzjIruF6Cw66sgosB5r5vGcgxqr7RhkE?= =?us-ascii?Q?b+zf3kB4Qr6Vcjv9hsIzQR1rfxUb70m736xWcNHVptx6ZE9CgV1JFKVzLIkT?= =?us-ascii?Q?jpor565IO4117tM+v00JKGXLKJQ8bTEzALHx66PJFiDmTOZFrXk1T/3Q/52c?= =?us-ascii?Q?3eZL5j+as6zaPZ7gdZz3gS2QaMT9iQ1gJ4Y9XjiKm27n80T38868SWuhxGUH?= =?us-ascii?Q?Xq00rs8+laqaV67rPXCX5w7m2HrZzbKUUxwmu7qI8I8ykm6EIIhX6FpZEbZd?= =?us-ascii?Q?gPUaigZh49hk3paTPNpaLVe3tCP7nP51FkX6q2luuE+R/+aqCb6C1fFZw0IK?= =?us-ascii?Q?uyDkfZPlKG75gA7pEbJ92UYO3W/vMO8AMc61s4oFw7nyr5a3aj1zmH76MmJ+?= =?us-ascii?Q?8qu7vKqaMPSvEQqK4+6zvl3gF7y/KVfSWBihJjZX7fYUceFvlxXjPmwgsB+H?= =?us-ascii?Q?9njBkQAZWGqH6T04TJWEyPkbFY2Sf3sNvc9HPXvTGRYNMKzFEMP7rYgghIrJ?= =?us-ascii?Q?eu9J9H+6pyW4GIZOki8mzXAEVVl2Zvmbt4WUiDYeYQQ6Tb2sESRzcmhZnRoD?= =?us-ascii?Q?OtXpFLGKVElHvEyoNnnXMRzl0oUimtfbBFg1pg8GVeM7D//SWj6dVRjy3751?= =?us-ascii?Q?fuLiSGsHucsxxb7Jz7uqWXfUOzPpjIbbcHyI4sSl/Bb7yZrN6W0EGgjDrJWI?= =?us-ascii?Q?o10ewEuQBbxb8l6JEaquuqQvS6prTpVZ6fW2VPnUhen+yP4xqTAm0DKAuuqF?= =?us-ascii?Q?pDKQaquMRwKKdGw/enDIzLA/5rTHXqnzvXOsS2vOG3qKBt5JPPCNMyLtnPOH?= =?us-ascii?Q?uKKPGbh7w72dRRaA1X/IY1pZv2jaoqZuGbD4oV3iSSjmAW7tM66Ws6ZxY5tH?= =?us-ascii?Q?bFllsjqBPtpcGib0GuZJO7AR2dqbSMFT5Gcz3I+7c8W3u0k14oK078RE5Xth?= =?us-ascii?Q?gHL4S1obvLTyZ8+yYiakSr+qTa4Nb2nXzpSocagUvVH1svS8fk/7nBYuF65s?= =?us-ascii?Q?xA4ML9o/Y9NbapoFj1LByYshoLWRn+QrAqwgz1qD3TfLbsSWB+e8HSsfbHqH?= =?us-ascii?Q?/dRpsdiQrQ4Lk53leXasSkpr4hAUrUDhA7qrsJ4jfRByxUszs4QnLIcDHYV4?= =?us-ascii?Q?gRsXurKncSJA8UQeCPvNLLXpKg9BCvZP8cXh74ycwVQRmPoh0uoBoiKWiqpZ?= =?us-ascii?Q?uSEdV+qGh9a9lR3YS6iuX9/BUUB1qK/xQ1Yik3oOQDVRlGur9X0HK9u0r1BZ?= =?us-ascii?Q?iI8kfFkETbD34OvuS9kyHWX06XN5+sdj97nOT8Vd/NXqa6v3Zd+TN0hAdhfk?= =?us-ascii?Q?yvjDkekLZe50Kv4GV4GQTKxLpyoVtv7t530hKdMezcFm3wYXNeZDrUHNLaTp?= =?us-ascii?Q?JFCpr7avpDEK0/ADO2HD3eVXlf0zTaplczPky3MthUw1dM0lFNFFYbIE9lU0?= =?us-ascii?Q?Wkce+MaFvhK3lTxBuQc=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM3PR12MB9286.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36b8ac46-5ee7-4231-0b5e-08dc00fb81cd X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2023 01:32:19.4159 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DzmYDae7gfEYv71yq3/hVCzCVQTbgxOHs26UtOKxxVWpMSBY24Gw68tNsQbvhilc9cTRvRKUoj5cSJT78HeI7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7660 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org [AMD Official Use Only - General] Hi Konstantin, > -----Original Message----- > From: Konstantin Ananyev > Sent: Tuesday, December 19, 2023 8:40 PM > To: Tummala, Sivaprasad ; > david.hunt@intel.com; anatoly.burakov@intel.com; jerinj@marvell.com; > radu.nicolau@intel.com; gakhil@marvell.com; cristian.dumitrescu@intel.com= ; Yigit, > Ferruh > Cc: dev@dpdk.org; stable@dpdk.org > Subject: RE: [PATCH v2 1/6] examples/l3fwd: fix lcore ID restriction > > Caution: This message originated from an External Source. Use proper caut= ion > when opening attachments, clicking links, or responding. > > > Hi Sivaprasad, > > > > > Hi Konstantin, > > > > > -----Original Message----- > > > From: Konstantin Ananyev > > > Sent: Tuesday, December 19, 2023 6:00 PM > > > To: Konstantin Ananyev ; Tummala, > > > Sivaprasad ; david.hunt@intel.com; > > > anatoly.burakov@intel.com; jerinj@marvell.com; > > > radu.nicolau@intel.com; gakhil@marvell.com; > > > cristian.dumitrescu@intel.com; Yigit, Ferruh > > > Cc: dev@dpdk.org; stable@dpdk.org > > > Subject: RE: [PATCH v2 1/6] examples/l3fwd: fix lcore ID restriction > > > > > > Caution: This message originated from an External Source. Use proper > > > caution when opening attachments, clicking links, or responding. > > > > > > > > > > > > > > > Currently the config option allows lcore IDs up to 255, > > > > > irrespective of RTE_MAX_LCORES and needs to be fixed. > > > > > > > > > > The patch allows config options based on DPDK config. > > > > > > > > > > Fixes: af75078fece3 ("first public release") > > > > > Cc: stable@dpdk.org > > > > > > > > > > Signed-off-by: Sivaprasad Tummala > > > > > --- > > > > > examples/l3fwd/main.c | 19 +++++++++++-------- > > > > > 1 file changed, 11 insertions(+), 8 deletions(-) > > > > > > > > > > diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index > > > > > 3bf28aec0c..ed116da09c 100644 > > > > > --- a/examples/l3fwd/main.c > > > > > +++ b/examples/l3fwd/main.c > > > > > @@ -99,7 +99,7 @@ struct parm_cfg parm_config; struct > > > > > lcore_params { > > > > > uint16_t port_id; > > > > > uint8_t queue_id; > > > > > > Actually one comment: > > > As lcore_id becomes uint16_t it might be worth to do the same > > > queue_id, they usually are very much related. > > Yes, that's a valid statement for one network interface. > > With multiple interfaces, it's a combination of port/queue that maps to= a specific > lcore. > > If there a NICs that support more than 256 queues, then it makes sense > > to change the queue_id type as well. > > AFAIK, majority of modern NICs do support more than 256 queues. > That's why in rte_ethev API queue_id is uint16_t. Thanks. Will update the queue_id type to uint16_t in next version. > > > > > Please let me know your thoughts. > > > > > > > > - uint8_t lcore_id; > > > > > + uint16_t lcore_id; > > > > > } __rte_cache_aligned; > > > > > > > > > > static struct lcore_params > > > > > lcore_params_array[MAX_LCORE_PARAMS]; > > > > > @@ -292,8 +292,8 @@ setup_l3fwd_lookup_tables(void) static int > > > > > check_lcore_params(void) > > > > > { > > > > > - uint8_t queue, lcore; > > > > > - uint16_t i; > > > > > + uint8_t queue; > > > > > + uint16_t i, lcore; > > > > > int socketid; > > > > > > > > > > for (i =3D 0; i < nb_lcore_params; ++i) { @@ -304,12 +304,12 > > > > > @@ > > > > > check_lcore_params(void) > > > > > } > > > > > lcore =3D lcore_params[i].lcore_id; > > > > > if (!rte_lcore_is_enabled(lcore)) { > > > > > - printf("error: lcore %hhu is not enabled in l= core mask\n", > lcore); > > > > > + printf("error: lcore %hu is not enabled in > > > > > + lcore mask\n", lcore); > > > > > return -1; > > > > > } > > > > > if ((socketid =3D rte_lcore_to_socket_id(lcore) !=3D = 0) && > > > > > (numa_on =3D=3D 0)) { > > > > > - printf("warning: lcore %hhu is on socket %d w= ith numa off > \n", > > > > > + printf("warning: lcore %hu is on socket %d > > > > > + with numa off\n", > > > > > lcore, socketid); > > > > > } > > > > > } > > > > > @@ -359,7 +359,7 @@ static int > > > > > init_lcore_rx_queues(void) > > > > > { > > > > > uint16_t i, nb_rx_queue; > > > > > - uint8_t lcore; > > > > > + uint16_t lcore; > > > > > > > > > > for (i =3D 0; i < nb_lcore_params; ++i) { > > > > > lcore =3D lcore_params[i].lcore_id; @@ -500,6 +500,8 > > > > > @@ parse_config(const char *q_arg) > > > > > char *str_fld[_NUM_FLD]; > > > > > int i; > > > > > unsigned size; > > > > > + unsigned int max_fld[_NUM_FLD] =3D {RTE_MAX_ETHPORTS, > > > > > + 255, RTE_MAX_LCORE}; > > > > > > > > > > nb_lcore_params =3D 0; > > > > > > > > > > @@ -518,7 +520,8 @@ parse_config(const char *q_arg) > > > > > for (i =3D 0; i < _NUM_FLD; i++){ > > > > > errno =3D 0; > > > > > int_fld[i] =3D strtoul(str_fld[i], &end, 0); > > > > > - if (errno !=3D 0 || end =3D=3D str_fld[i] || = int_fld[i] > 255) > > > > > + if (errno !=3D 0 || end =3D=3D str_fld[i] || > > > > > + int_fld[i] > > > > > > + > > > > > + max_fld[i]) > > > > > return -1; > > > > > } > > > > > if (nb_lcore_params >=3D MAX_LCORE_PARAMS) { @@ -531,= 7 > > > > > +534,7 @@ parse_config(const char *q_arg) > > > > > lcore_params_array[nb_lcore_params].queue_id =3D > > > > > (uint8_t)int_fld[FLD_QUEUE]; > > > > > lcore_params_array[nb_lcore_params].lcore_id =3D > > > > > - (uint8_t)int_fld[FLD_LCORE]; > > > > > + (uint16_t)int_fld[FLD_LCORE]; > > > > > ++nb_lcore_params; > > > > > } > > > > > lcore_params =3D lcore_params_array; > > > > > -- > > > > > > > > Acked-by: Konstantin Ananyev > > > > > > > > > > > > > 2.25.1