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 A1D7AA0A0C; Mon, 5 Jul 2021 11:26:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 205654068C; Mon, 5 Jul 2021 11:26:22 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2074.outbound.protection.outlook.com [40.107.94.74]) by mails.dpdk.org (Postfix) with ESMTP id 766614003C for ; Mon, 5 Jul 2021 11:26:20 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=grZyE5ARHsK6LpWE1PuX9n2lHlujSKjUUZV78HvqFRXdI6skqkyAsqWpxU1AXErpMDS0HWfgSo+SjCBn2fk0g7SrwQleHRfsHBQ/9b/aQxkPpvdfvbGQBNnAKFWjnk2rrgKrHRSqaNaDI871Z46TtmuaCCE8rHVzG9C7r8IvmMHZvvi7ZCqj4VrAX4ImgKD2zMF+xmKzWgJ99o14YJLawjcKnVLmx/MiqMJog2nJiD+KCEH3vW0uFeVo5G6ERF7EjOEO39vnnOKiy7rDhrK84Rj37q+CszsXKhMxPc6PX7f14bsLZ0nUK+HZqumU8dndFJ86kx5cG2nJLQwgedKb7g== 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-SenderADCheck; bh=uW6ZVB+F5M80NtwZ2h21omgxeq+fByHdX0GEOOcNlVs=; b=fI3OnFktWujc4Cp9Yz/0bDm00QOP3X+89dD883yA8IEPMSnNpXIlUmuFwGqIQil7mu1qcmc3sECB2FISWI9zX2AaNfdZdWBZ379InJdjEuyF31CuOj98MjmpWk4m/eXVzGSax/RDBfd7MP/uMw/+YF17F9Hf8SZRn0tM72a4LVZVov0Qd8jDyM9SXYn1E+y+EofpJR9YsIUtCA36Z/y+8it6jpR1qi7Y6zWzlrsOuFvvA29yLsW4ZwD2W2N+YJeudtI3LqY6OPJAOmVtUH/cRZc3SczljByP0e3mUxhHZkFBdmB+T/Wn6hbwjPblc+tgZ36GA32tgrqWslQFSHnZdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uW6ZVB+F5M80NtwZ2h21omgxeq+fByHdX0GEOOcNlVs=; b=s3D4QsxhhoCB6nRFlZGBbaRELLdpfpBrIqLYSNmkyAjolsOLmykBBPzyrUSow7Ze6UaruUDgDqQ8YZWIVRBVW0SOQVX7uwYfrPnyCMr31P4WmQoSqJ+jGkPvvl/Fzv7bKnmcWhOpnEwl/xD/ICojXEHSHXSn7yvfYW0IKBuUfZCldwaMb4JpeTPYOfZhKXxXsPI1znyRSOrZKc20czC70Z74SkqhG2A2JXjwpkYJcaXo0YZv8/1q7SS9Mlj7tWRBtakAPmGDWMdLePJxvh1OBze090NXexp3zpdI9SAtu65+FGKz9AHz9gobaejpwrQpR8Odj4drBfQ/nQCVd/Bscw== Received: from DM4PR12MB5373.namprd12.prod.outlook.com (2603:10b6:5:39a::17) by DM4PR12MB5342.namprd12.prod.outlook.com (2603:10b6:5:39f::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.30; Mon, 5 Jul 2021 09:26:19 +0000 Received: from DM4PR12MB5373.namprd12.prod.outlook.com ([fe80::ac75:9b9a:a03f:1676]) by DM4PR12MB5373.namprd12.prod.outlook.com ([fe80::ac75:9b9a:a03f:1676%3]) with mapi id 15.20.4287.033; Mon, 5 Jul 2021 09:26:19 +0000 From: "Xueming(Steven) Li" CC: "dev@dpdk.org" , NBU-Contact-Thomas Monjalon , Matan Azrad , Shahaf Shuler , Slava Ovsiienko , Andrew Rybchenko , Chas Williams , "Min Hu (Connor)" , Beilei Xing , Jingjing Wu Thread-Topic: [PATCH v8 1/2] devargs: add common key definition Thread-Index: AQHXcWlfHwNZNoFAX0+GiSre69z5gKs0HJRg Date: Mon, 5 Jul 2021 09:26:18 +0000 Message-ID: References: <20210625114726.776425-1-xuemingl@nvidia.com> <20210705064512.13116-1-xuemingl@nvidia.com> In-Reply-To: <20210705064512.13116-1-xuemingl@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [2409:891f:c020:78b2:6904:8926:afd9:665f] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: af09858d-4267-446c-3652-08d93f96f22d x-ms-traffictypediagnostic: DM4PR12MB5342: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:107; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NJiWWi/4qrTUhLn6dhkWMDlYyTo+RsOmuiRqgxtLIEzfxhIHQkkpkRXIP37YlvlCXWMo2gxM3K9w2GKvX5T/RcyGdjcJNwvDw22fR63K1sSHz5DPUQQqIkAfXizuxq3jJJGa7V4lEyg2CalIfGcOiMeLiVYSgbnXlX4MmzJLpyvyrp3UPQDLZa/D3X+fevYZ3q7Z4bwMD53Vp936CEfEEVLKVlaQY+XsMQFatfg2S11j3uOPpFimKlXQ3UWCbPrOhGdCZiCjMBNJ8ZuIX3t4dED+GMk8PYk+hSpq0XSgEc7kjIR8J2xbezGN2wylKKga0D6cuxYZ9RVbQv0S8y7fVvhyFlKrHOE1/JEebEG3So7LY12FUTlsWVHms2YslZEsqvL78GyiKMus9J6krrIuMh8zd/YUlbdhlvV1cui7k7cIi4wMHnIdJq/A6QRNneTNHJKRjKIsjVckV6aoE/IOTjLwwiRKB6pk9XeJBeIjq8OXe/6w7kqYAiNt9kE0zq68s27CUDFtH7UsqAXjTbZW1h0KDIIpD/JfeNIyZiuztNlGmj2J+EEN8LOEn3ArKWqZyRNb9b572z4NN9wrJxhj5T08KtWsft9jj/X/Nc9SyEkShuz7ttCGvj4Gi2E/OeNk2+/alm8juMZx4OLXf0e9LA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5373.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(39860400002)(346002)(136003)(396003)(366004)(4326008)(71200400001)(83380400001)(8676002)(9686003)(5660300002)(54906003)(66946007)(66446008)(186003)(64756008)(52536014)(55016002)(66476007)(66556008)(122000001)(38100700002)(109986005)(6506007)(478600001)(86362001)(316002)(7696005)(2906002)(33656002)(8936002)(30864003)(76116006); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?rBP+767RTVs2gqkOUKuztPNdKxSEnHYye6Dii2iD1cfGBI0U3bCq98nuan5V?= =?us-ascii?Q?zfIVH9QNrNQeqeV6gaX++g/Hm/p9X7KvHE1VfRZORMuC0Ue6oOcuvsFezne2?= =?us-ascii?Q?jsEHwDmo+s1FTCuADO0f/QOLy4wQHRtVDg+oTa2AJz9hxbCyEwICI+bMxzbr?= =?us-ascii?Q?QnPCxl6DM+2P/qEb+0Tz90wo8Ffy6xThibwnNFP0EQMJCoc7BEXpZJHXo13P?= =?us-ascii?Q?gyC8pzcYB+tRySkqJEE4Dd80CCtb6hVJIVAccpRFjIScS2QVdunQcRDUJJVk?= =?us-ascii?Q?HK3G42p8QwhXtwBFkim15zMxhU/WCfKMRFtxj3TaSgId5jQ6iNHcdn6zVCov?= =?us-ascii?Q?awGafI3PUpEQHVv+eQwgJMX5sIy1M2zAXb668f49QwpIgpxf3rjs5W3kaCst?= =?us-ascii?Q?GGbLCWvvsOuptG7m4n8Ob5gjtZ/D7lpxQSYRqzrriYyyTR0/P2TRENOMthUR?= =?us-ascii?Q?2Loy7nEt/A6ZcSVjZUirtExiinNSu7GbW7FXCcUfvSkLiwXh++HY/jmuKQwt?= =?us-ascii?Q?0fKfVv1mDzf2WNE7iBerMsDaT5ZootEm1LUGhQxioMTINrpHnOWedF+m1kUw?= =?us-ascii?Q?HfRINBRS2HmIXb+LRZQgkX0gWMsuQk3W7n5iyzwgzclde7CNnwkrLL34+3Px?= =?us-ascii?Q?AvtGCMWJVXPLiWqj3breb5Trpf7UbnvNGzXO9bs3AbSi4/SZ8TndQ56lO3VE?= =?us-ascii?Q?8fBTyFt/kuQhGzJ+okoIN0UjXxHdjpt22sWYktUO2WeiPLZN56tgYlxgdDHE?= =?us-ascii?Q?V9L0zXzdEmh+1WeNlYmUvVjiD2mJB+Z11vVZB8mJh8FjFw9g4kR2rZ4/xKf+?= =?us-ascii?Q?qdmasCTTTApfL8qUTFIoSmIlpjdm32ANqWWKOLrp/9prYmLxH2FRlB1x8FI6?= =?us-ascii?Q?nR/3igw13akKEqDoYbsl0fCYHlLJHNVksUcT8uehatvPJJzO5hDes4dDEpO+?= =?us-ascii?Q?CNFTLuwQN9n6wTlBT9IHCjrIAwGD43ObQsu1LM7tYnzLT8ntkHlwJEsNBR4Q?= =?us-ascii?Q?sqzBhdpwWsB4dQU19eq6hALb3DH/9jDt68Sr2DHWOrFDMor/XWz2CyP54SgC?= =?us-ascii?Q?XMpoW79+8pl+ozDa/B3fcMoUigK98idf4NnsnH8jfeRC5chZJmTv7VKZXuvE?= =?us-ascii?Q?CAUUyoMnydv+qRRIfs52ymcJs9YaDuHaAopbIe0/X+uIJkZISf57eXTC9DoS?= =?us-ascii?Q?kgCUm7aVlM4kPxueeidYwxwLw3NB9nCkI/ZHQlZaqmb2QPZSKm9vFuCV07wj?= =?us-ascii?Q?mIaebLKK+hxdQScPgujZ18mJCaJC28p/eV25FFaCyhhbEM5uM//ufhb4Plk3?= =?us-ascii?Q?kWyq+zBRUvE+AWBFrLBkFJ0TttI6FZQ8+BQ5GXxBqkke5Ass8f9OpJ7/A0xY?= =?us-ascii?Q?hxKYmtjN02N+mx8i8MJrIOAFOjLq?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: af09858d-4267-446c-3652-08d93f96f22d X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2021 09:26:18.9672 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: PGhWd3JxysKW+QGTSff+uH3SZfCL/UdAcu7awkTzyXm8ClWjwCGlQnH5mds7pSb02GBwaRf/5d90mvwEJjncBw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5342 Subject: Re: [dpdk-dev] [PATCH v8 1/2] devargs: add common key definition 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 Sender: "dev" Sorry, this patch missed the ack line from Andrew: Acked-by: Andrew Rybchenko > -----Original Message----- > From: Xueming(Steven) Li > Sent: Monday, July 5, 2021 2:45 PM > Cc: dev@dpdk.org; Xueming(Steven) Li ; NBU-Contact-T= homas Monjalon ; Matan > Azrad ; Shahaf Shuler ; Slava Ovsii= enko ; Andrew Rybchenko > ; Chas Williams ; Min Hu (C= onnor) ; Beilei Xing > ; Jingjing Wu > Subject: [PATCH v8 1/2] devargs: add common key definition >=20 > Adds common devargs key definition for "bus", "class" and "driver". >=20 > Acked-by: Thomas Monjalon > Signed-off-by: Xueming Li > --- > drivers/common/mlx5/mlx5_common.h | 2 -- > drivers/common/mlx5/mlx5_common_pci.c | 2 +- > drivers/common/sfc_efx/sfc_efx.c | 7 +++---- > drivers/common/sfc_efx/sfc_efx.h | 2 -- > drivers/net/bonding/rte_eth_bond_args.c | 2 +- > drivers/net/i40e/i40e_ethdev_vf.c | 5 ++--- > drivers/net/iavf/iavf_ethdev.c | 5 ++--- > drivers/net/mlx5/mlx5.c | 4 ++-- > drivers/net/sfc/sfc_kvargs.c | 2 +- > drivers/vdpa/mlx5/mlx5_vdpa.c | 2 +- > lib/eal/common/eal_common_devargs.c | 12 ++++++------ > lib/eal/include/rte_devargs.h | 24 ++++++++++++++++++++++++ > 12 files changed, 43 insertions(+), 26 deletions(-) >=20 > diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5= _common.h > index 1fbefe0fa6..306f2f1ab7 100644 > --- a/drivers/common/mlx5/mlx5_common.h > +++ b/drivers/common/mlx5/mlx5_common.h > @@ -208,8 +208,6 @@ __rte_internal > int mlx5_get_ifname_sysfs(const char *ibdev_path, char *ifname); >=20 >=20 > -#define MLX5_CLASS_ARG_NAME "class" > - > enum mlx5_class { > MLX5_CLASS_INVALID, > MLX5_CLASS_NET =3D RTE_BIT64(0), > diff --git a/drivers/common/mlx5/mlx5_common_pci.c b/drivers/common/mlx5/= mlx5_common_pci.c > index 3f16cd21cf..34747c4e07 100644 > --- a/drivers/common/mlx5/mlx5_common_pci.c > +++ b/drivers/common/mlx5/mlx5_common_pci.c > @@ -118,7 +118,7 @@ bus_cmdline_options_handler(__rte_unused const char *= key, static int parse_class_options(const struct > rte_devargs *devargs) { > - const char *key =3D MLX5_CLASS_ARG_NAME; > + const char *key =3D RTE_DEVARGS_KEY_CLASS; > struct rte_kvargs *kvlist; > int ret =3D 0; >=20 > diff --git a/drivers/common/sfc_efx/sfc_efx.c b/drivers/common/sfc_efx/sf= c_efx.c > index 0b78933d9f..2dc5545760 100644 > --- a/drivers/common/sfc_efx/sfc_efx.c > +++ b/drivers/common/sfc_efx/sfc_efx.c > @@ -42,7 +42,6 @@ enum sfc_efx_dev_class sfc_efx_dev_class_get(struct rt= e_devargs *devargs) { > struct rte_kvargs *kvargs; > - const char *key =3D SFC_EFX_KVARG_DEV_CLASS; > enum sfc_efx_dev_class dev_class =3D SFC_EFX_DEV_CLASS_NET; >=20 > if (devargs =3D=3D NULL) > @@ -52,9 +51,9 @@ sfc_efx_dev_class_get(struct rte_devargs *devargs) > if (kvargs =3D=3D NULL) > return dev_class; >=20 > - if (rte_kvargs_count(kvargs, key) !=3D 0) { > - rte_kvargs_process(kvargs, key, sfc_efx_kvarg_dev_class_handler, > - &dev_class); > + if (rte_kvargs_count(kvargs, RTE_DEVARGS_KEY_CLASS) !=3D 0) { > + rte_kvargs_process(kvargs, RTE_DEVARGS_KEY_CLASS, > + sfc_efx_kvarg_dev_class_handler, &dev_class); > } >=20 > rte_kvargs_free(kvargs); > diff --git a/drivers/common/sfc_efx/sfc_efx.h b/drivers/common/sfc_efx/sf= c_efx.h > index 6b6164cb1f..c16eca60f3 100644 > --- a/drivers/common/sfc_efx/sfc_efx.h > +++ b/drivers/common/sfc_efx/sfc_efx.h > @@ -19,8 +19,6 @@ > extern "C" { > #endif >=20 > -#define SFC_EFX_KVARG_DEV_CLASS "class" > - > enum sfc_efx_dev_class { > SFC_EFX_DEV_CLASS_INVALID =3D 0, > SFC_EFX_DEV_CLASS_NET, > diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bondin= g/rte_eth_bond_args.c > index 764b1b8c8e..5406e1c934 100644 > --- a/drivers/net/bonding/rte_eth_bond_args.c > +++ b/drivers/net/bonding/rte_eth_bond_args.c > @@ -18,7 +18,7 @@ const char *pmd_bond_init_valid_arguments[] =3D { > PMD_BOND_SOCKET_ID_KVARG, > PMD_BOND_MAC_ADDR_KVARG, > PMD_BOND_AGG_MODE_KVARG, > - "driver", > + RTE_DEVARGS_KEY_DRIVER, > NULL > }; >=20 > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_et= hdev_vf.c > index 385ebedcd3..0cfe13b7b2 100644 > --- a/drivers/net/i40e/i40e_ethdev_vf.c > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > @@ -1660,7 +1660,6 @@ static int > i40evf_driver_selected(struct rte_devargs *devargs) { > struct rte_kvargs *kvlist; > - const char *key =3D "driver"; > int ret =3D 0; >=20 > if (devargs =3D=3D NULL) > @@ -1670,13 +1669,13 @@ i40evf_driver_selected(struct rte_devargs *devarg= s) > if (kvlist =3D=3D NULL) > return 0; >=20 > - if (!rte_kvargs_count(kvlist, key)) > + if (!rte_kvargs_count(kvlist, RTE_DEVARGS_KEY_DRIVER)) > goto exit; >=20 > /* i40evf driver selected when there's a key-value pair: > * driver=3Di40evf > */ > - if (rte_kvargs_process(kvlist, key, > + if (rte_kvargs_process(kvlist, RTE_DEVARGS_KEY_DRIVER, > i40evf_check_driver_handler, NULL) < 0) > goto exit; >=20 > diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethde= v.c index 5290588b17..472538181e 100644 > --- a/drivers/net/iavf/iavf_ethdev.c > +++ b/drivers/net/iavf/iavf_ethdev.c > @@ -2448,7 +2448,6 @@ static int > iavf_drv_i40evf_selected(struct rte_devargs *devargs, uint16_t device_id= ) { > struct rte_kvargs *kvlist; > - const char *key =3D "driver"; > int ret =3D 0; >=20 > if (device_id !=3D IAVF_DEV_ID_VF && > @@ -2464,13 +2463,13 @@ iavf_drv_i40evf_selected(struct rte_devargs *deva= rgs, uint16_t device_id) > if (kvlist =3D=3D NULL) > return 0; >=20 > - if (!rte_kvargs_count(kvlist, key)) > + if (!rte_kvargs_count(kvlist, RTE_DEVARGS_KEY_DRIVER)) > goto exit; >=20 > /* i40evf driver selected when there's a key-value pair: > * driver=3Di40evf > */ > - if (rte_kvargs_process(kvlist, key, > + if (rte_kvargs_process(kvlist, RTE_DEVARGS_KEY_DRIVER, > iavf_drv_i40evf_check_handler, NULL) < 0) > goto exit; >=20 > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index cf18= 15cb74..d0faa45944 100644 > --- a/drivers/net/mlx5/mlx5.c > +++ b/drivers/net/mlx5/mlx5.c > @@ -1931,7 +1931,7 @@ mlx5_args_check(const char *key, const char *val, v= oid *opaque) > config->max_dump_files_num =3D tmp; > } else if (strcmp(MLX5_LRO_TIMEOUT_USEC, key) =3D=3D 0) { > config->lro.timeout =3D tmp; > - } else if (strcmp(MLX5_CLASS_ARG_NAME, key) =3D=3D 0) { > + } else if (strcmp(RTE_DEVARGS_KEY_CLASS, key) =3D=3D 0) { > DRV_LOG(DEBUG, "class argument is %s.", val); > } else if (strcmp(MLX5_HP_BUF_SIZE, key) =3D=3D 0) { > config->log_hp_size =3D tmp; > @@ -2002,7 +2002,7 @@ mlx5_args(struct mlx5_dev_config *config, struct rt= e_devargs *devargs) > MLX5_REPRESENTOR, > MLX5_MAX_DUMP_FILES_NUM, > MLX5_LRO_TIMEOUT_USEC, > - MLX5_CLASS_ARG_NAME, > + RTE_DEVARGS_KEY_CLASS, > MLX5_HP_BUF_SIZE, > MLX5_RECLAIM_MEM, > MLX5_SYS_MEM_EN, > diff --git a/drivers/net/sfc/sfc_kvargs.c b/drivers/net/sfc/sfc_kvargs.c = index 0efa92ed28..974c05e68e 100644 > --- a/drivers/net/sfc/sfc_kvargs.c > +++ b/drivers/net/sfc/sfc_kvargs.c > @@ -28,7 +28,7 @@ sfc_kvargs_parse(struct sfc_adapter *sa) > SFC_KVARG_TX_DATAPATH, > SFC_KVARG_FW_VARIANT, > SFC_KVARG_RXD_WAIT_TIMEOUT_NS, > - SFC_EFX_KVARG_DEV_CLASS, > + RTE_DEVARGS_KEY_CLASS, > NULL, > }; >=20 > diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.= c index e5e03e6582..8b5bfd8c3d 100644 > --- a/drivers/vdpa/mlx5/mlx5_vdpa.c > +++ b/drivers/vdpa/mlx5/mlx5_vdpa.c > @@ -588,7 +588,7 @@ mlx5_vdpa_args_check_handler(const char *key, const c= har *val, void *opaque) > unsigned long tmp; > int n_cores =3D sysconf(_SC_NPROCESSORS_ONLN); >=20 > - if (strcmp(key, "class") =3D=3D 0) > + if (strcmp(key, RTE_DEVARGS_KEY_CLASS) =3D=3D 0) > return 0; > errno =3D 0; > tmp =3D strtoul(val, NULL, 0); > diff --git a/lib/eal/common/eal_common_devargs.c b/lib/eal/common/eal_com= mon_devargs.c > index b31ac879a9..23aaf8b7e4 100644 > --- a/lib/eal/common/eal_common_devargs.c > +++ b/lib/eal/common/eal_common_devargs.c > @@ -49,9 +49,9 @@ rte_devargs_layers_parse(struct rte_devargs *devargs, > const char *str; > struct rte_kvargs *kvlist; > } layers[] =3D { > - { "bus=3D", NULL, NULL, }, > - { "class=3D", NULL, NULL, }, > - { "driver=3D", NULL, NULL, }, > + { RTE_DEVARGS_KEY_BUS "=3D", NULL, NULL, }, > + { RTE_DEVARGS_KEY_CLASS "=3D", NULL, NULL, }, > + { RTE_DEVARGS_KEY_DRIVER "=3D", NULL, NULL, }, > }; > struct rte_kvargs_pair *kv =3D NULL; > struct rte_class *cls =3D NULL; > @@ -118,7 +118,7 @@ rte_devargs_layers_parse(struct rte_devargs *devargs, > if (layers[i].kvlist =3D=3D NULL) > continue; > kv =3D &layers[i].kvlist->pairs[0]; > - if (strcmp(kv->key, "bus") =3D=3D 0) { > + if (strcmp(kv->key, RTE_DEVARGS_KEY_BUS) =3D=3D 0) { > bus =3D rte_bus_find_by_name(kv->value); > if (bus =3D=3D NULL) { > RTE_LOG(ERR, EAL, "Could not find bus \"%s\"\n", @@ -126,7 +126,7 @@ > rte_devargs_layers_parse(struct rte_devargs *devargs, > ret =3D -EFAULT; > goto get_out; > } > - } else if (strcmp(kv->key, "class") =3D=3D 0) { > + } else if (strcmp(kv->key, RTE_DEVARGS_KEY_CLASS) =3D=3D 0) { > cls =3D rte_class_find_by_name(kv->value); > if (cls =3D=3D NULL) { > RTE_LOG(ERR, EAL, "Could not find class \"%s\"\n", @@ -134,7 +134,7 = @@ > rte_devargs_layers_parse(struct rte_devargs *devargs, > ret =3D -EFAULT; > goto get_out; > } > - } else if (strcmp(kv->key, "driver") =3D=3D 0) { > + } else if (strcmp(kv->key, RTE_DEVARGS_KEY_DRIVER) =3D=3D 0) { > /* Ignore */ > continue; > } > diff --git a/lib/eal/include/rte_devargs.h b/lib/eal/include/rte_devargs.= h index 1e595b3c51..cd90944fe8 100644 > --- a/lib/eal/include/rte_devargs.h > +++ b/lib/eal/include/rte_devargs.h > @@ -25,6 +25,30 @@ extern "C" { > #include > #include >=20 > +/** > + * Bus type key in global devargs syntax. > + * > + * Legacy devargs parser doesn't use this key as bus type > + * is resolved as first optional value separated by ":". > + */ > +#define RTE_DEVARGS_KEY_BUS "bus" > + > +/** > + * Class type key in global devargs syntax. > + * > + * Legacy devargs parser doesn't parse class type. PMD driver is > + * encouraged to use this key to resolve class type. > + */ > +#define RTE_DEVARGS_KEY_CLASS "class" > + > +/** > + * Driver type key in global devargs syntax. > + * > + * Legacy devargs parser doesn't parse driver type. PMD driver is > + * encouraged to use this key to resolve driver type. > + */ > +#define RTE_DEVARGS_KEY_DRIVER "driver" > + > /** > * Type of generic device > */ > -- > 2.25.1