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 7981A43745; Tue, 19 Dec 2023 15:18:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 00D1942DED; Tue, 19 Dec 2023 15:18:20 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2088.outbound.protection.outlook.com [40.107.244.88]) by mails.dpdk.org (Postfix) with ESMTP id 3D7B4402E0; Tue, 19 Dec 2023 15:18:19 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iUQGlEaqoWz9n/3NgIIN2f0zZxidmo35FUqNQhhdAE9D+kvWUfXkDWy4ys1SLyDvD+XO1f1dQKe0/rlkQja9ZweyFRAuw7zgRlXPD3D1jv+Y3HgGq/ncXCejpOAFTfajGUouNDJpz/FBCM9LcrDtgYSUJrqt4rcZpEM36n5sMZph1ZpbQJwtAo1VwVKAlPs0jPgOxXXbHS58umWOQxBfQmP9QFb2jPgXjZP+29vCe2yki/gNSaRzk7p/ESL8Lc0jjW/aqrMOY+xoq8atrNe6zqN1uSXml05sFJpOMZIHPnLNfuEhEKkHNdfbgJN7dxYKkePFkxJwa/uLxFLSD4rbBA== 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=v4ogiE32/BvVXEgW+XEcE/VXurUKWypfsZhNguz4PTE=; b=dGkoJNU3ox1e4PVrTHBhvLbML0QDti+VMAf/r9qB1Zden7CpjrOOOi6PSoowUhaMnnGbUJVcrU/qvEXqZBKwnajNn8j771+3Y1WnzQFRKSdg+zdEIx3/mUQ3gxWcUO3vcdr3H2TbuiOTBfiLO6+IrI1rn3HNBq98SFy9mx1tXWFnT7vJA3TFC2zkJcMiKIIzu7Z/3Adn9XwW+3T+gA7hDd3UYJX+XtsFP0YoRFID/5V9NxPPcDC4whuEBzWZuJp2QtGZ8pKE8kMg2yAMuTEw8r7c/U4R7BUaQxK8gKerELmPx0zuTsxq3nmkhg5XhoyO+htMWhT8B4lZXojLrOu4Qg== 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=v4ogiE32/BvVXEgW+XEcE/VXurUKWypfsZhNguz4PTE=; b=cD7iEud2MTY8urf8skUe5ovMfoQ1KT1iRttOh3gw9QudnHBIr+9ydHGKo9+1LVbegWlhGFxyROrLkWVmW1OPbHq2Jau0LS6OuPCTe3tRXKjb7BYzqsrH6dQRlZbZas5tkEytPNsxA5YGIdTAiD5nXYoH2cKqqah9kYwX88V/A8s= Received: from DM3PR12MB9286.namprd12.prod.outlook.com (2603:10b6:8:1ae::6) by IA0PR12MB8981.namprd12.prod.outlook.com (2603:10b6:208:484::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Tue, 19 Dec 2023 14:18:15 +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; Tue, 19 Dec 2023 14:18:15 +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: AQHaMiuK0qpuKWNEbkKZNn7XuV63FLCwgwIAgAAG2ACAAByRcA== Date: Tue, 19 Dec 2023 14:18:15 +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> In-Reply-To: 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=f9ee9027-108f-4e9b-bdde-0e68fcbd0dc7; 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-19T14:12:20Z; 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_|IA0PR12MB8981:EE_ x-ms-office365-filtering-correlation-id: 39c60e19-02cf-422b-0e99-08dc009d575d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vXeGX/yziMpe+SfxANM2gItTv7AexkA7dZEtHS8t45zqOM39iYyQPs1EEN4CdLeRu7xQ0XxQ7YtcJbbNXXREpoKh7aUsjHQgZDPOOAaIqwUakBHq++9VAbOW8/kQo8ZlKGeARxXvOm7p7mmPT9eg0+v5jOOEBgi9zzAydVW7DHdu/B2RoaKVCW59NS75PkiZ3eVWnduf68we5iZQ47xFpL0Du8D9cKngTpYWm+lsEzBSPLEQCY5y7TJcWkg2jgOLl7LKJSNtgWRYNLSJw+5wSXi7Q3EQtAk46BGA9CdcvARENs6SAbQ8Q+meNRR9/KF2e2T+r7G3bFSzew3yf7kpXUXIGEdWcUP3GsAQYbvrQyByVa+9x4/NxFucGkkaFr+SPFFnuxRIx+DvX6m473Dl+wwdFCEgbFvjwJR8pSQMVDYYl7Vd0jXO0yWJkQb3Hz37S2bNaDnGSMaq2qioZ/Ni/dFeEd30zbzgVDGFAjVHWJnjGjpX9NN94Pb3Ask7R2Qk0ynVRmPo/8yEuwHrrmjN6D/j0/3wcdJRm9pKjD5OPqFPIx99GrEOZSkzTGQqXJHaTZdUXZlqL3nZYoVwfCDmfYb6DHBYLfnSrqLMQR6H7+v1bSrgQc63eJptdibpFY/58e3hgc8BBoEzaC9m3h1xuGPLNsQOJiMgJasMsiN9OcI= 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)(366004)(376002)(396003)(39860400002)(346002)(136003)(230922051799003)(230173577357003)(230273577357003)(451199024)(1800799012)(186009)(64100799003)(26005)(6506007)(7696005)(38100700002)(71200400001)(53546011)(76116006)(4326008)(5660300002)(83380400001)(52536014)(9686003)(2906002)(41300700001)(478600001)(8676002)(8936002)(66946007)(66476007)(64756008)(110136005)(316002)(54906003)(66446008)(66556008)(6636002)(38070700009)(122000001)(86362001)(33656002)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?F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BkBJUXVRzlm3FlBobCoOGrR1?= =?us-ascii?Q?XVQ4vZPuQtlioq85eNIBzLU/5EGuwcebCZLbUZugrwkBljDJ+WcvkwRi9wB5?= =?us-ascii?Q?XP/PPtbvNCmZnOTAktIX4fbatb2wHrVXRXPcI0SzdiK86bouJAvqSAE5g9xa?= =?us-ascii?Q?OH2cq9m3f7vsXhwkHbpYStCFTtFbS1wk0H9G5L1PYZFlnjksBVaDCaiaNn9C?= =?us-ascii?Q?d4h2MejnxYq+yFH84ncnwfC+p0sEnQ3SMuZeLQcIG34Q44F294QcOU93Kvhz?= =?us-ascii?Q?jxyKEWa919f8vbX8KeEBgCxtf8ZEHEuSnhJCNFMwejeTOEs0pUSTFbOuzJq0?= =?us-ascii?Q?SPt0IhAwJGfk4WUcn832aMIeUq35qzVbtwIYewGB3EJiZZL2m1Pm1JMGaXoZ?= =?us-ascii?Q?Iy+lUw6FcKyDHpoIGI+agOjw9tOLsJw7ta81ZNDz/cgPgytGszIZHE+IpTNR?= =?us-ascii?Q?w82MUVZG3GdiFTPQmB/KlD+QRwu11/3nCljnDWS2UZvMvzNxaGPGcvEDC0xu?= =?us-ascii?Q?eUoxdVviHwXqoPZEEMpZh3f6ZMzGWtFVFRHSjel4xl4HIurVWuG1UF4+Wz3x?= =?us-ascii?Q?KbxN/Rw17J6a7WFD0ISO3XbwQcIhwLbGxXJGA6UOmfF/o9Yijl7Cmee22SuA?= =?us-ascii?Q?+r77phNd7MObt2ss2NfhXuJYNSx2BGTNs1s0YfGzLhvXDH3JAFQweKA0Ao2X?= =?us-ascii?Q?06/ngBsnK9WQK3FqjYA=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: 39c60e19-02cf-422b-0e99-08dc009d575d X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Dec 2023 14:18:15.4857 (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: dI1SFxccgvXEgMODIUK4aT9RpDTikPRnOR5sQ3fw0VuY105eRUmuUvYMalJIsCR02H8i0XORNEv1FGiD1MEQHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8981 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 6:00 PM > To: Konstantin Ananyev ; Tummala, Sivapras= ad > ; 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. > > > > > > > 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, t= hey > 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 s= pecific lcore. If there a NICs that support more than 256 queues, then it makes sense to c= hange the queue_id type as well. 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 lcore= 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 with = 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