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 B04AFA0A0E; Mon, 5 Apr 2021 12:54:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54599140EB7; Mon, 5 Apr 2021 12:54:57 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2085.outbound.protection.outlook.com [40.107.223.85]) by mails.dpdk.org (Postfix) with ESMTP id 0C123140EB6 for ; Mon, 5 Apr 2021 12:54:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ub9fTzDZzNZVbar/LCPU3tLvy89N1ooCAB8PnPrD/H2hAjWyXXvmiHRqJhoi/1TfuL9Z7dnyVznNS+2/2qHbbGa0xGVvahdZrKs4uGwmlMTcsdUtRHljc12fkKtP0algTWdXvMw15s3UdZYSNHy4l5d+8uTGa8oNllS6IP+59ytt1mpeJz3Yx3CajwobBsjz+k1XH4bvAiQq+a9/9JkO7UY8LMjwBaFigaXnXs3uowr/DbMJocGIZYubOPSjB02Sn7q0EtYLRnGezX6cqn6FAiDU2da1ltdJi6GjKjgI9iFTJS/BE30nxxGtlxNYXttN71hqSDea7MQrVQFHotoaqA== 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=QgBies1IVx0eIRzOmMcXfeIh//bPaGkjRGzakSmkHU4=; b=W+n4uXYbtGKV8W/YCdIx+pt9iZu+0QXlku0xRu8SySsFtcqq6MrbJTNqrjmP5ekRoePt+VLQzJAuIGIgbINApLUW5MMU3fFkbuoP8yhQakwA/GgfSMQoggDz4kn8hiCRDTKq44fj+91aPc4OmVF7zRWukzMjO47ZmsqghbnYkObC8j8BD8H8dKORixOiwu0yt3uHFxJH/QXo2ujjWFROcVyrMoxB30Eg8KZESsn6/QfohromlPiRYqFkdNJlu5qALwPvTzf8QRhHxAjGHid8AttoQl+Uum5bl3Il3286Q9w9xdQvrCrgY0TRdZ1ph2Z6v+knHFs3SGaMalGFU/7xuQ== 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=QgBies1IVx0eIRzOmMcXfeIh//bPaGkjRGzakSmkHU4=; b=rvBnvzCs1k5DSKIJy/HGQ4JdxfsFHfgE9UPCAgqCpFB9bKI5Ih5wuSyplGFXE9Z/mMRmi/7Pxnvo54ulQDOUJH59JCdjC0SlnHSHRdGW/LKntan5OzdwG9O1Q5PDmBfhlMzEYCTq/Kd7QcgF/m6P7x7tLNBzv/6T+/DXjfLyznK2+i+aRZk1rPm9+3Hxox3QXJoyD/A14vtFqsn0UH+Gk0dt4Wv+Xbt6pJoxOKHl/awiPNKQPOKGnyb0RTXUmbwLCNUgRvfvzbO5prPonTtWnitWivLJJ4+g0yWufeQzQYDWP/N6VyxmmRgcN7BeQwQmHqs0/y7diG1RlMc31ixiaA== Received: from DM6PR12MB3753.namprd12.prod.outlook.com (2603:10b6:5:1c7::18) by DM5PR12MB1402.namprd12.prod.outlook.com (2603:10b6:3:73::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25; Mon, 5 Apr 2021 10:54:38 +0000 Received: from DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::20f7:11fc:9d46:9258]) by DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::20f7:11fc:9d46:9258%6]) with mapi id 15.20.3999.032; Mon, 5 Apr 2021 10:54:38 +0000 From: Slava Ovsiienko To: "Xueming(Steven) Li" CC: "dev@dpdk.org" , Matan Azrad , Shahaf Shuler , NBU-Contact-Thomas Monjalon , "Xueming(Steven) Li" , Asaf Penso Thread-Topic: [PATCH v2 1/2] common/mlx5: support device global syntax Thread-Index: AQHW7a5prxY4n9fpvkaZAHcDbbtHA6qmOIgA Date: Mon, 5 Apr 2021 10:54:38 +0000 Message-ID: References: <1608304614-13908-2-git-send-email-xuemingl@nvidia.com> <1610983607-7969-2-git-send-email-xuemingl@nvidia.com> In-Reply-To: <1610983607-7969-2-git-send-email-xuemingl@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [95.164.10.10] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a627f02a-9e7b-4e25-02b1-08d8f821353f x-ms-traffictypediagnostic: DM5PR12MB1402: 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:525; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8R9GnNTVM4O49mdeheSrikDoVsNvSbNyfgFcj+3rNZYSSu/tnLXqlOYTOuvwa6JhfdNrcUyqq/jedWbYcWLnYfT6swXpPW8mzEDjM0fibzfxBl9v4T3Vv9GmTsWSEKYpbsyyS5SkiSufZGTgx+ZmE/jirdejGLssBnEGKTVDxVRPoNa01sdRHDR2PeTfcy7WhCR7+MzZlogxaHGQspT5BNfeYcgTUUJak0Jv1yoIV9e7gGqEcZxadpXjjbT8KPJqzI63WbZmlfFDLMBGNly7Mdjncy4qNz+44vBtVpCy606Wfcdls2TUx3eXiUb9eHUGf+gE5dIaH/RJlgQ3MuLxGGHb60QME7+GGE8QHzCwvrz7H7BbQSeP2OeFRK8UhQu2em9VzDV2oUmH4aM1hopS8pSC8v5sS2CUD+3ajhcemsdO9l4CwLsLY8rMb5eF8yXKqYAzUIcsLlUXcgvKZaPU+at91PfvIc1F9dpMqiV36EnP5mlTNhhQPwvNHPmejR5OwNjgqOdRvv5PDV+vtTCY8M2MApUvreJTPutXI4lAJexM6BJ5FyoMi5lZbf0j44e69zQGTrQWVWn2Nu9yDWtEx/2y++lv5umegMJSTtGshibEbIrOr5BDGZi0pkIP5bUYZ8PKAP2WkJze9P+0udk9o2GSFM/84u0SrnfEUCfS9yY= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3753.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(136003)(346002)(366004)(376002)(396003)(316002)(38100700001)(66946007)(9686003)(66476007)(76116006)(52536014)(8936002)(55016002)(66556008)(186003)(66446008)(64756008)(71200400001)(54906003)(26005)(107886003)(4326008)(478600001)(8676002)(83380400001)(53546011)(33656002)(86362001)(6506007)(2906002)(7696005)(5660300002)(6636002)(6862004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?PGbOK7yU35m6wb0/0RyXE6raMkAFmX9lTvNPnkGHMTAZELz4sIWXJ3JHENyQ?= =?us-ascii?Q?iW2I3fn4evXZW5LZmzT98uXM0iiFVnQLiOtGjdKNX8Ghtrnjxo2CLc9sGv0n?= =?us-ascii?Q?ufVDGxhZt/7ZjrMj1rvHN5tiFImewdWczm4+3vJ9i69RkG6ituImgGklSZg+?= =?us-ascii?Q?LGPxiny/z/w6bL0hP3XlKPK9WEwdfHFvPSy+jb+QHftsohdQRpf6nypXMhaD?= =?us-ascii?Q?KJ/wlgnozMuQ3bTwMFUWRRfJR2qpeUXYifRu6MkdMqI/eoME634lJatcLUZw?= =?us-ascii?Q?pLOZoXiwOT2Lfpybx+C4HgJZdTvDQBgZ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ascii?Q?oAKNgFLi9EbyvgbdkZStF3SkRLoZo7tQxZ52W9Hq8zY+PZshepVH0nuwK4EK?= =?us-ascii?Q?BWxuNr6UmOt/RpI6gcaR3sbSSZ9T3sl/qCEVoAyW3YLmbGZVvLUtr+SRbuyT?= =?us-ascii?Q?v8c=3D?= 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: DM6PR12MB3753.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a627f02a-9e7b-4e25-02b1-08d8f821353f X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2021 10:54:38.3216 (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: 05MBzfEOsiYRi28cXfmE45dJOyyHWsHVD3XcWCv6X7cyzBQbq7wzJeZfXDSStpwG8JbH2zJwYnKUpHki+biKqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1402 Subject: Re: [dpdk-dev] [PATCH v2 1/2] common/mlx5: support device global syntax 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" > -----Original Message----- > From: Xueming Li > Sent: Monday, January 18, 2021 17:27 > To: Slava Ovsiienko > Cc: dev@dpdk.org; Matan Azrad ; Shahaf Shuler > ; NBU-Contact-Thomas Monjalon > ; Xueming(Steven) Li ; > Asaf Penso > Subject: [PATCH v2 1/2] common/mlx5: support device global syntax >=20 > This patch supports new device global device syntax, resolve class type f= rom > "class" section if the devarg is global device syntax: > bus=3D,k=3Dv,,,/class=3D,k=3Dv,,,/driver=3D,k=3Dv,,,, >=20 > To reuse class name of global device syntax, this patch also changes inte= rnal > class name introduced by commit [1] to algin with RTE class name. Typo: algin -> align Beside this: Acked-by: Viacheslav Ovsiienko >=20 > [1] > 8a41f4deccc3: common/mlx5: introduce layer for multiple class drivers >=20 > Signed-off-by: Xueming Li > --- > drivers/common/mlx5/mlx5_common_pci.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/common/mlx5/mlx5_common_pci.c > b/drivers/common/mlx5/mlx5_common_pci.c > index 5208972bb6..c03bdbf4eb 100644 > --- a/drivers/common/mlx5/mlx5_common_pci.c > +++ b/drivers/common/mlx5/mlx5_common_pci.c > @@ -4,6 +4,7 @@ >=20 > #include > #include > +#include > #include "mlx5_common_utils.h" > #include "mlx5_common_pci.h" >=20 > @@ -26,7 +27,7 @@ static const struct { > unsigned int driver_class; > } mlx5_classes[] =3D { > { .name =3D "vdpa", .driver_class =3D MLX5_CLASS_VDPA }, > - { .name =3D "net", .driver_class =3D MLX5_CLASS_NET }, > + { .name =3D "eth", .driver_class =3D MLX5_CLASS_NET }, > { .name =3D "regex", .driver_class =3D MLX5_CLASS_REGEX }, }; >=20 > @@ -115,6 +116,9 @@ parse_class_options(const struct rte_devargs > *devargs) >=20 > if (devargs =3D=3D NULL) > return 0; > + if (devargs->cls !=3D NULL) > + /* support new global syntax */ > + return class_name_to_value(devargs->cls->name); > kvlist =3D rte_kvargs_parse(devargs->args, NULL); > if (kvlist =3D=3D NULL) > return 0; > -- > 2.25.1