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 772E1A0A0E; Mon, 5 Apr 2021 12:42:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F289A140EAA; Mon, 5 Apr 2021 12:42:18 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2058.outbound.protection.outlook.com [40.107.243.58]) by mails.dpdk.org (Postfix) with ESMTP id 291C2140EA7 for ; Mon, 5 Apr 2021 12:42:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PFhBjYSWBPbABM7ZgChw4BIlsxTshxaZUd+KEsQXScftQW1Mmo/NeTxiXM3L9hQUeeDV3ToT2zI47SBj5B99aWj0409hxvSZQoTNguq76+9vfYMu98EGeGWVri2p3pgtJSFleLXHqtbalRguQzCkTWIdErM6JxhcrGdYbfGOI1zCyk82aEUHgMiRwe/bulmACecU2MYlXFWmNr5lcQ8yfSjXQHjAlrzCNyEKv9eJr0Y+g/he318yt9aMqW4TitrZlsic0MujkvXskfQc6CokBgidW8hy7V2acUNDuxJ27gktNt/p0JfDrvXXf37I67TPxyVB114gGLeGjUxGCNlR4w== 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=16ADaZxn3fY45gtr82oZhiElO3RDrNb34fzPQHNccQI=; b=G6vl+cK86aruuU5gWthtv+Zd1d/SNTi2vbxQ+0PbuY0Cs4uTTdfJDmszFB9UT42wcDv+pRtK+xSVENuFeNxeuvM782HKqEu5hOk+wRoPlT1HJ07xqxyXS82acnBSDifrrCVYb82U7ruTs4kevlbatxKekDkD5xQn64Yhmyr93/yqPYQkyMAu0lSNVbebKsfiPw9cEmDTz71Bh2VYjuJ8dDLb1O+QTWb9rfnW+LlJmLuVDbFzlfkr0j9JkBLvh+0Fy8TKviepssThKrSa92oCpRA1ZpiT/VXN1tDUEIhTJ3cYvckXgADIDfxTNbsRgxHyWG3CCZr4evwv+5ToBf9fVg== 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=16ADaZxn3fY45gtr82oZhiElO3RDrNb34fzPQHNccQI=; b=r6wic/5LD7oY5AIEbme7W2oSXUoJQEzYowC6IhxCpgMEXBBEaI9oGohOP/gdqdildHx+RtKIJoAiEtxlBDzIq5hbJ8IhPDvRQX1b1yigPBuZkyIdBnc6nN8iF8QuHOhAYO/IQeilhwlxGGrXnCDO7yPztPbE/yXTuM4FKd911wZGnvT3oik4pgyabSrJx3A8osf213YaIA0DRHI4nYrGoBkQDpBVWVc6l6x/z5FAbw1WgmTodq1iKufLQMz09q+kqGR8JvsavzWzX/euJV4mFy6AsPrsN7xacw+sZeLhchB/omtOmwl+iG2wfqBstleb5NzTlWi0UYYM6TtNveombw== Received: from BY5PR12MB4322.namprd12.prod.outlook.com (2603:10b6:a03:20a::20) by BY5PR12MB4193.namprd12.prod.outlook.com (2603:10b6:a03:20c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.27; Mon, 5 Apr 2021 10:42:13 +0000 Received: from BY5PR12MB4322.namprd12.prod.outlook.com ([fe80::7cec:a7fa:db2e:3073]) by BY5PR12MB4322.namprd12.prod.outlook.com ([fe80::7cec:a7fa:db2e:3073%9]) with mapi id 15.20.3999.032; Mon, 5 Apr 2021 10:42:13 +0000 From: Parav Pandit To: NBU-Contact-Thomas Monjalon , "dev@dpdk.org" CC: Gaetan Rivet Thread-Topic: [dpdk-dev] [PATCH 1/2] pci: rename catch-all ID Thread-Index: AQHXJn4OfGJWIzYj8EmWvGcYjBIv0Kqlw5WQ Date: Mon, 5 Apr 2021 10:42:13 +0000 Message-ID: References: <20210331223423.2089467-1-thomas@monjalon.net> <20210331223423.2089467-2-thomas@monjalon.net> In-Reply-To: <20210331223423.2089467-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: [136.185.184.152] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b8a3be87-a791-49c2-7928-08d8f81f7964 x-ms-traffictypediagnostic: BY5PR12MB4193: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3826; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mfs95r0dCk6Cx1aFBHpVWI214biNWALHPJLFefPhS5lE7DYm0BdDjQs7hHziuNRkDsVc5hYqbBhqc6LHaidw2Hh4HCMiLiXQrx1o8GMRwW/A44zOwgHY5/7o5STxwihx0mHjSZ9A/amIMwzz46eGkhqmDLKoVQ36EeXHCp8jyWy3L/GDRhzLIvvCyGc3yX0AzfGllLwr9c1rAiUgWak8m0vWZ6iyNnOXx5+NNN6+JrbLhvw29SSZuay16tmIpHOR6ZTa24WKBQz74F5IUudA2WcABvQGTn+BsD3OzOftUdP13vcGrdmuB5c+Q7cdVOwXnxrJz76TAPQT+J+cF5x+5w6yquO9zK36yNbfrRrIdu64Abb+MGH23iq2lQspvIvefibeB8MuASihd9tLaeYmeqBQG7W8CxgdbfwSH3I/Hgr29L8bNoiDR7krHCC2TGTQ3Q2xYu13jMmJCN9Ad5NRWG9vtOCwHOHeeM0UJemuCERL0ebAh9UIpDIrgbk51cFdmmGiF05vQhpuT+L+NvexPyTVfVPiIq+EfePRGu5uWqRJI9+2pksYVuKuir+4P2iPh+J20mAQkV8kvXNVZ2PixLPEXX/BVxoHDUEVOlVxDoajUed9iQ9t3yp8O6A1FCfza7s/lZ4quxMTIcT8Wy6np55Hz4E3tDGE2UxDwfmclSc= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4322.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(396003)(39860400002)(366004)(376002)(2906002)(4326008)(83380400001)(186003)(5660300002)(478600001)(38100700001)(316002)(76116006)(33656002)(9686003)(26005)(66946007)(71200400001)(6506007)(7696005)(86362001)(8936002)(110136005)(55016002)(66476007)(66556008)(64756008)(66446008)(52536014)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?rAyJnQsGGHaM26uEHo31z70VfO+jDjmvDbw21IfcdYgqEib1J/C1L1h2lCm0?= =?us-ascii?Q?EqeUrx31smYCFK1FPhvbUE1Wl99yOooSw+tGZpxWfg7fjvNpKCUR+5hCrl9f?= =?us-ascii?Q?Eh/kSFd+9oMaGJ+jXCJAOWmYY2u+F52qorua/Gyk9Iv9rKtQ5Ki0KG5oVgl2?= =?us-ascii?Q?mffDfbq+ZHCx99hAxcqjSiz1OfrYCli5ylHG4P4AAr0kefozzt0aVJGdG6UJ?= =?us-ascii?Q?kI7eDTohFjBngGbQ25TUOMQx59AGWZSHldjuDozIKOcJ7BUNkZCA5cgl8xVI?= =?us-ascii?Q?iRj97ytOmBQNbSP66VPCmRl4ixfTtLbMk7NRpk/9PUlOkWT8pAcwpKwbBV1F?= =?us-ascii?Q?fb1z1wd8TXi1di9XNPwq8daduamNmjNRiypDAww+KYYGkQ3KAYmSqoMo15T1?= =?us-ascii?Q?meKWHWdLCe0pwrpS4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l?= =?us-ascii?Q?YbqCxWQTtqeIIhMjCEiNhJDa?= x-ms-exchange-transport-forked: True 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: BY5PR12MB4322.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8a3be87-a791-49c2-7928-08d8f81f7964 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2021 10:42:13.5495 (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: QUpRxnLLPh/th2XSFhvXtZebMLlKkGwmcobE/R1i0Mwi1nO5cZqIctqtpuSIsNPERf83hQTjCMXuqJXMUDHo6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4193 Subject: Re: [dpdk-dev] [PATCH 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" > From: dev On Behalf Of Thomas Monjalon > Sent: Thursday, April 1, 2021 4:04 AM >=20 > The name of the constant PCI_ANY_ID was missing RTE_ prefix. > It is renamed, and the old name becomes a deprecated alias. >=20 > 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 >=20 > Signed-off-by: Thomas Monjalon > --- > drivers/bus/pci/pci_common.c | 8 ++++---- drivers/bus/pci/rte_bus_pci= .h | > 12 ++++-------- > lib/librte_pci/rte_pci.h | 12 +++++++----- > 3 files changed, 15 insertions(+), 17 deletions(-) >=20 > diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c > index 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/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h ind= ex > 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 { >=20 > #define RTE_ETH_DEV_TO_PCI(eth_dev) RTE_DEV_TO_PCI((eth_dev)- > >device) >=20 > -/** Any PCI device identifier (vendor, device, ...) */ -#define PCI_ANY_= ID > (0xffff) -#define RTE_CLASS_ANY_ID (0xffffff) > - > #ifdef __cplusplus > /** C++ macro used to help building up tables of device IDs */ #define > RTE_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 >=20 > /** > diff --git a/lib/librte_pci/rte_pci.h b/lib/librte_pci/rte_pci.h index > f89c7dbbea..ed3196a368 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_ID. */ > }; >=20 > /** > @@ -95,7 +95,9 @@ struct rte_pci_addr { > }; >=20 > /** Any PCI device identifier (vendor, device, ...) */ -#define PCI_ANY_= ID > (0xffff) > +#define RTE_PCI_ANY_ID (0xffff) > +/** @deprecated Replaced with RTE_PCI_ANY_ID */ #define PCI_ANY_ID > +RTE_PCI_ANY_ID > #define RTE_CLASS_ANY_ID (0xffffff) >=20 > /** > -- > 2.30.1 Reviewed-by: Parav Pandit