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 A5DBAA0A02; Tue, 6 Apr 2021 08:23:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CE8A406A2; Tue, 6 Apr 2021 08:23:58 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2074.outbound.protection.outlook.com [40.107.93.74]) by mails.dpdk.org (Postfix) with ESMTP id 94EA54068B for ; Tue, 6 Apr 2021 08:23:57 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WodciHDVI2+bLDs3ELS97GDLqJrksaxZ16GwneSZgON1nO2lWiyrznL5ZK//Rxzi/+3JEnpj4TqUr6il2ki3EamEWr02MI5swzNOS8VUJW13Roq9NrT3kcLwQUfSycPcU4kblRFFu7EtkIo6v2RMKzZ3c2d2TB6haNX4o28JF+RqIZ/2epD0G3hn0Xer6tD7AVUucvBf+U54Xx2Xkxcx9RPk8QbfQBXQ7rAB0P0sgFPmVPErNCXWFs0eF4m4162A7H5ZMeOj7it/mUTMaCaJicG2CaCR/S6VeY28Q7FBIqnQw6oqm6m5Xeo6glgU07FMcEBqxRDErhx6aqdCoKpThA== 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=jtrcpPwzgWAfLd003eHb2CAa4HnNZjawumYz+BIUP9k=; b=NvO08zDyDXngD8EiAy4R/d9Jl1kZ0ISFnvLxNR+9ejoooIC3MTTgA47JCzOO3zWkj5K5gp12nAkj2zS7hk6skt0L1G/MnDR4Y8R/r0lPUFRjZKkUJgBNNl7tHusAhU7LQT/yCjonySte6PbNQYtJE0xY413ZA+uKTpszhzfofLJTemfCDm5PafV6x3MUp9zcB2zbOsNRkfmhHbOTiui9OUxSqZ1ngd5ZJQvviqo5BQddO7rbXqkB02QUm8s8i6RSooSTBY0HffYi+MgsCE0HnOxTngGg3+nuYmPzWS90oiWd2cQbRQ0/BhhSJ36K+TuXZP/I7HUDYoM1paat2NZ6tw== 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=jtrcpPwzgWAfLd003eHb2CAa4HnNZjawumYz+BIUP9k=; b=pvzpBJ3zXsW1OEYlbXmh5/GLtmaBYmG89s7Pr79rzMgANSUvaG6UjAiQ8KkorJMk+JKxGK6L2K63MpXdprl1iYzKaVGCC+1h+RGZSU69fTsSnsPkWd7VMdr2ak4kKBYX/QKU1a1bROzuSOTeSJFN/KagZG6KwF6RWbE51J1Bl0zKEJGmrsIHtw4VTe6adp8O8GM4JzTbH+RZdMJ6sSyxccalYD3FnQj4Pkz9aL1+zooZcrVZNiU5Tf9dj73qagE3V+CEQ/X866sJEBy+d2HF4W9QRrJK966RE+xy61as43VzsXYp4K8SKd/DfCyqMrh0GyOK8zLjHZiMEuFcdzEdkQ== Received: from BY5PR12MB4324.namprd12.prod.outlook.com (2603:10b6:a03:209::10) by BY5PR12MB3987.namprd12.prod.outlook.com (2603:10b6:a03:1a8::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.29; Tue, 6 Apr 2021 06:23:56 +0000 Received: from BY5PR12MB4324.namprd12.prod.outlook.com ([fe80::b919:53f4:6757:331c]) by BY5PR12MB4324.namprd12.prod.outlook.com ([fe80::b919:53f4:6757:331c%5]) with mapi id 15.20.3999.032; Tue, 6 Apr 2021 06:23:56 +0000 From: "Xueming(Steven) Li" To: NBU-Contact-Thomas Monjalon , "dev@dpdk.org" CC: Matan Azrad , Shahaf Shuler , Slava Ovsiienko , Gaetan Rivet Thread-Topic: [dpdk-dev] [PATCH v2 1/2] pci: rename catch-all ID Thread-Index: AQHXKfw21gUcivi2EUGuroOuUOWwo6qnBg8w Date: Tue, 6 Apr 2021 06:23:55 +0000 Message-ID: References: <20210331223423.2089467-1-thomas@monjalon.net> <20210405091506.562830-1-thomas@monjalon.net> <20210405091506.562830-2-thomas@monjalon.net> In-Reply-To: <20210405091506.562830-2-thomas@monjalon.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [207.244.67.150] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 160af23a-977c-4200-5913-08d8f8c48e8d x-ms-traffictypediagnostic: BY5PR12MB3987: 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:6790; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: blgdqd6iU8pCf1DsWiGZ9fhFG9tAQdduVetYBYfO5LM0RsTYAAmIyGsXQJeuuxpSQ0AwdfL7IxqgINLwylNJkCk4XZhmSmOCteIZKlzYZAf/yAC6subJAU7Uvl+kCpjqU9ugSO6GSUgphChTGCrnAA+Px+j64k8uhONG435o2vCXWgbn7nDQTSrCtlnHQCTpxT0wE8ekx2Zx6d8c4iM2pdzR3tt6NUvfff4j3uhEjn+R+q50Cef+j4sgihfILLTn8nvFog4H/7JT73Xuv8urtyovJx2PEllK5bnMiX0YVSi4zaj7pj6uYPzI0arNCe29OyCPxnPb6lPc4a3Zz1ssJduSCGcc5cpCNQHRtVWQhTyMYJGeLAp9MPX177FJ0WB6sosgT9+6pauFMmW7DuAfneZWvRhfQa9Vzayc61b3S8crCqb9qGkcGm11WZD2o5z0hMU9Gq7AUk5dAHY0HTce/UZJ7tUNgKHprdt6jolC9OLRWF9eA68yvCSFyWw8ve8t14U7WZJ53bMVCUSJxalWtbBiiupYf2adTyfWYiN1svNvNFU+ER0LUB3Q4G40rEKjoISDZMX5Ige3jz/HU5F8TsDmCSrIachZjeFNs+2c7vntyo88I6qnAyuEsBnInthl3YRf1V6xb54SASa7dN7liQ6Lwpqb14Fvx6kciLf83BY= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4324.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(396003)(346002)(39860400002)(136003)(366004)(26005)(8936002)(7696005)(71200400001)(8676002)(4326008)(66946007)(76116006)(5660300002)(66556008)(66476007)(55016002)(316002)(110136005)(9686003)(2906002)(38100700001)(83380400001)(186003)(55236004)(54906003)(52536014)(6506007)(64756008)(478600001)(66446008)(86362001)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?+fST8Lcqt/A8UhZtp5hE2kF7BltDiWrB4kEOHwFdAvP4fSodovH524mLuks4?= =?us-ascii?Q?+J09d1LBlHCMtfS3kqUKITViFgVQ68vS2657d0/pQwe05bffYtvnNpofP9k4?= =?us-ascii?Q?ZrOzzgAdV/2o5CUl13pqtuRIBT/CV5kulGsSPuj1faCUGYtnlZGGErKsw9vf?= =?us-ascii?Q?NR1fcRltsffYIQ4ItalPypBTGFrOtHuGiUA7oJLlgLxNGJkeCVB5fRA/kgLD?= =?us-ascii?Q?k3Hi5wj8/UQojdlY9FlgHGAR74rucGyhfbh8NBMvs++Y2PqBHH+stQe9mmxw?= =?us-ascii?Q?2OaB9iJOYYegf5ZgSjZLQcXlN/OGOHAIvSLH/i2uhZ/wGvrmC/arEd5rcYQa?= =?us-ascii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BiTucfUWP71RRb3PaOiY51/Q?= =?us-ascii?Q?sRxvg3SYAGDTpGSHJszq0Hbsdtf8DvwuRlpLvlTdiYIdWSc9hLVwSGxze9ve?= =?us-ascii?Q?YOWI8QJw0v3bZWMlgTHx83wj?= 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: BY5PR12MB4324.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 160af23a-977c-4200-5913-08d8f8c48e8d X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Apr 2021 06:23:55.9900 (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: rk00vg57vV47KCFnBu4mrh3hqdKmq9oUrqwU+Dt5vII0uPv86lsAS2mOEgTx/mOuKYCNDgJMm2J+23jE5/F1xg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB3987 Subject: Re: [dpdk-dev] [PATCH v2 1/2] pci: rename catch-all ID 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: dev On Behalf Of Thomas Monjalon >Sent: Monday, April 5, 2021 5:15 PM >To: dev@dpdk.org >Cc: Matan Azrad ; Shahaf Shuler ; Sl= ava Ovsiienko ; Gaetan >Rivet >Subject: [dpdk-dev] [PATCH v2 1/2] pci: rename catch-all ID > >The name of the constant PCI_ANY_ID was missing RTE_ prefix. >It is renamed, and the old name becomes a deprecated alias. > >While renaming, the duplicate definitions in rte_bus_pci.h are removed to = keep only those in rte_pci.h. >Note: rte_pci.h is included in rte_bus_pci.h > >Signed-off-by: Thomas Monjalon >--- > drivers/bus/pci/pci_common.c | 8 ++++---- > drivers/bus/pci/rte_bus_pci.h | 12 ++++-------- > drivers/common/mlx5/mlx5_common_pci.c | 8 ++++---- > lib/librte_pci/rte_pci.h | 12 +++++++----- > 4 files changed, 19 insertions(+), 21 deletions(-) > >diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c i= ndex 9b8d769287..ee7f966358 100644 >--- a/drivers/bus/pci/pci_common.c >+++ b/drivers/bus/pci/pci_common.c >@@ -133,18 +133,18 @@ rte_pci_match(const struct rte_pci_driver *pci_drv, > id_table++) { > /* check if device's identifiers match the driver's ones */ > if (id_table->vendor_id !=3D pci_dev->id.vendor_id && >- id_table->vendor_id !=3D PCI_ANY_ID) >+ id_table->vendor_id !=3D RTE_PCI_ANY_ID) > continue; > if (id_table->device_id !=3D pci_dev->id.device_id && >- id_table->device_id !=3D PCI_ANY_ID) >+ id_table->device_id !=3D RTE_PCI_ANY_ID) > continue; > if (id_table->subsystem_vendor_id !=3D > pci_dev->id.subsystem_vendor_id && >- id_table->subsystem_vendor_id !=3D PCI_ANY_ID) >+ id_table->subsystem_vendor_id !=3D RTE_PCI_ANY_ID) > continue; > if (id_table->subsystem_device_id !=3D > pci_dev->id.subsystem_device_id && >- id_table->subsystem_device_id !=3D PCI_ANY_ID) >+ id_table->subsystem_device_id !=3D RTE_PCI_ANY_ID) > continue; > if (id_table->class_id !=3D pci_dev->id.class_id && > id_table->class_id !=3D RTE_CLASS_ANY_ID) diff --git a/drivers/bus/pc= i/rte_bus_pci.h >b/drivers/bus/pci/rte_bus_pci.h index 876abddefb..3a092bc6d5 100644 >--- a/drivers/bus/pci/rte_bus_pci.h >+++ b/drivers/bus/pci/rte_bus_pci.h >@@ -91,26 +91,22 @@ struct rte_pci_device { > > #define RTE_ETH_DEV_TO_PCI(eth_dev) RTE_DEV_TO_PCI((eth_dev)->device) > >-/** Any PCI device identifier (vendor, device, ...) */ -#define PCI_ANY_I= D (0xffff) -#define RTE_CLASS_ANY_ID (0xffffff) >- > #ifdef __cplusplus > /** C++ macro used to help building up tables of device IDs */ #define R= TE_PCI_DEVICE(vend, dev) \ > RTE_CLASS_ANY_ID, \ > (vend), \ > (dev), \ >- PCI_ANY_ID, \ >- PCI_ANY_ID >+ RTE_PCI_ANY_ID, \ >+ RTE_PCI_ANY_ID > #else > /** Macro used to help building up tables of device IDs */ > #define RTE_PCI_DEVICE(vend, dev) \ > .class_id =3D RTE_CLASS_ANY_ID, \ > .vendor_id =3D (vend), \ > .device_id =3D (dev), \ >- .subsystem_vendor_id =3D PCI_ANY_ID, \ >- .subsystem_device_id =3D PCI_ANY_ID >+ .subsystem_vendor_id =3D RTE_PCI_ANY_ID, \ >+ .subsystem_device_id =3D RTE_PCI_ANY_ID > #endif > > /** >diff --git a/drivers/common/mlx5/mlx5_common_pci.c b/drivers/common/mlx5/m= lx5_common_pci.c >index a7f541a90c..9689ca86fc 100644 >--- a/drivers/common/mlx5/mlx5_common_pci.c >+++ b/drivers/common/mlx5/mlx5_common_pci.c >@@ -142,18 +142,18 @@ mlx5_bus_match(const struct mlx5_pci_driver *drv, > id_table++) { > /* Check if device's ids match the class driver's ids. */ > if (id_table->vendor_id !=3D pci_dev->id.vendor_id && >- id_table->vendor_id !=3D PCI_ANY_ID) >+ id_table->vendor_id !=3D RTE_PCI_ANY_ID) > continue; > if (id_table->device_id !=3D pci_dev->id.device_id && >- id_table->device_id !=3D PCI_ANY_ID) >+ id_table->device_id !=3D RTE_PCI_ANY_ID) > continue; > if (id_table->subsystem_vendor_id !=3D > pci_dev->id.subsystem_vendor_id && >- id_table->subsystem_vendor_id !=3D PCI_ANY_ID) >+ id_table->subsystem_vendor_id !=3D RTE_PCI_ANY_ID) > continue; > if (id_table->subsystem_device_id !=3D > pci_dev->id.subsystem_device_id && >- id_table->subsystem_device_id !=3D PCI_ANY_ID) >+ id_table->subsystem_device_id !=3D RTE_PCI_ANY_ID) > continue; > if (id_table->class_id !=3D pci_dev->id.class_id && > id_table->class_id !=3D RTE_CLASS_ANY_ID) diff --git a/lib/librte_p= ci/rte_pci.h b/lib/librte_pci/rte_pci.h index >f89c7dbbea..a8f8e404a9 100644 >--- a/lib/librte_pci/rte_pci.h >+++ b/lib/librte_pci/rte_pci.h >@@ -78,10 +78,10 @@ extern "C" { > */ > struct rte_pci_id { > uint32_t class_id; /**< Class ID or RTE_CLASS_ANY_ID. */ >- uint16_t vendor_id; /**< Vendor ID or PCI_ANY_ID. */ >- uint16_t device_id; /**< Device ID or PCI_ANY_ID. */ >- uint16_t subsystem_vendor_id; /**< Subsystem vendor ID or PCI_ANY_ID. */ >- uint16_t subsystem_device_id; /**< Subsystem device ID or PCI_ANY_ID. */ >+ uint16_t vendor_id; /**< Vendor ID or RTE_PCI_ANY_ID. */ >+ uint16_t device_id; /**< Device ID or RTE_PCI_ANY_ID. */ >+ uint16_t subsystem_vendor_id; /**< Subsystem vendor ID or RTE_PCI_ANY_ID= . */ >+ uint16_t subsystem_device_id; /**< Subsystem device ID or +RTE_PCI_ANY_I= D. */ Line length exceeds 80 chars. > }; > > /** >@@ -95,7 +95,9 @@ struct rte_pci_addr { > }; > > /** Any PCI device identifier (vendor, device, ...) */ -#define PCI_ANY_I= D (0xffff) >+#define RTE_PCI_ANY_ID (0xffff) >+/** @deprecated Replaced with RTE_PCI_ANY_ID */ #define PCI_ANY_ID >+RTE_DEPRECATED(PCI_ANY_ID) RTE_PCI_ANY_ID > #define RTE_CLASS_ANY_ID (0xffffff) > > /** >-- >2.31.1