get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/94287/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 94287,
    "url": "https://patches.dpdk.org/api/patches/94287/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210616040935.311733-15-xuemingl@nvidia.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20210616040935.311733-15-xuemingl@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210616040935.311733-15-xuemingl@nvidia.com",
    "date": "2021-06-16T04:09:35",
    "name": "[v1,14/14] common/mlx5: clean up legacy PCI bus driver",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "eb187a319bf27f39abee033a4c3970ac6a7d79c7",
    "submitter": {
        "id": 1904,
        "url": "https://patches.dpdk.org/api/people/1904/?format=api",
        "name": "Xueming Li",
        "email": "xuemingl@nvidia.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210616040935.311733-15-xuemingl@nvidia.com/mbox/",
    "series": [
        {
            "id": 17349,
            "url": "https://patches.dpdk.org/api/series/17349/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17349",
            "date": "2021-06-16T04:09:21",
            "name": "net/mlx5: support Sub-Function",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/17349/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/94287/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/94287/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 740D8A0C45;\n\tWed, 16 Jun 2021 06:11:29 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C9E49410E8;\n\tWed, 16 Jun 2021 06:10:23 +0200 (CEST)",
            "from NAM12-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam12on2070.outbound.protection.outlook.com [40.107.243.70])\n by mails.dpdk.org (Postfix) with ESMTP id AA26341159\n for <dev@dpdk.org>; Wed, 16 Jun 2021 06:10:20 +0200 (CEST)",
            "from BN0PR04CA0101.namprd04.prod.outlook.com (2603:10b6:408:ec::16)\n by BN8PR12MB3075.namprd12.prod.outlook.com (2603:10b6:408:67::11)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16; Wed, 16 Jun\n 2021 04:10:19 +0000",
            "from BN8NAM11FT049.eop-nam11.prod.protection.outlook.com\n (2603:10b6:408:ec:cafe::1) by BN0PR04CA0101.outlook.office365.com\n (2603:10b6:408:ec::16) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20 via Frontend\n Transport; Wed, 16 Jun 2021 04:10:19 +0000",
            "from mail.nvidia.com (216.228.112.34) by\n BN8NAM11FT049.mail.protection.outlook.com (10.13.177.157) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.4242.16 via Frontend Transport; Wed, 16 Jun 2021 04:10:18 +0000",
            "from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com\n (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Jun\n 2021 04:10:14 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=iIxRYmusOh37vHcSB2TWdsOdrTivUso6SB5owJWd5aCGzRBfgXPGbhaxQPjxqzCCtAkCR0Ey88FRlTtIRl0NiFKmURw9uPmgdMiaxXlBvtyHcVLEoRXLm4fXHfT03T27XBof6QUT4AC4YuoLHac1T5OjWI7ymY2rMAXgMHi5DJEnqfL0P0HgfleuAcJDwGr3n+dnWcdR44dJaZyS8poDrlrcAtJTBOLplVJgY8929sANCa0t1+syU8HmRXdOXn2BmrM1b+Da2qnURttNgn8rRu6fcMUqJguYgw839OAVJQGXXX6TG+5laWm1LdKwNxQ1AdwMC7hiy11svH7KuI5c5g==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=HIubkpiBjIx8wfIJnVZjKYKLwtl9fqJavcjVXm3nFmE=;\n b=kZcx+y3FG8JYgm8l4toYW5I2/QD93yCPvIga0Ut118hCYdIDOOdpKIDqY7DSTKDA2ePf0WlPPwlJvfgUPRKKkuZ72dCmFn8P+cgTw4a4Sylhc+OP8VfL3xuydJMo0I7QEfIWy9YUG1Z40w/29y39eqUDY6qfOtMJN+pP7/x5u+a33lW2c2KQfZG9Z/ysl3alPkq5qWaapSbo4bTty69BmXnQyRHFtv/cog5O8VZBEtAartooSfm2zE3jYyTOiZXkJy7Uuf7fK8NVsOF9ODRAFXd8V1bnpEfjIKk37XFBCmosEWvfQPoJIDD58czjNxkq7FP7Ga7wMrOgComeSF3KpA==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.112.34) smtp.rcpttodomain=tuxdriver.com smtp.mailfrom=nvidia.com;\n dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=HIubkpiBjIx8wfIJnVZjKYKLwtl9fqJavcjVXm3nFmE=;\n b=IJZUh5IoIuLM9rtka5L+dfjzaJa7jQzyvHe+tAoCAXfNAEkl+gPci0XpNOtRY2gFda4ul59kKuz0fr6EEmQbPfKDeolzw3285Yp9A51YgO7reiv1A4eNfVtwvbOH5IKjEa90FsI7QiTc07ihUM3AUjUL6i1k7Y5jGjwxk2bq1s5nWj6EIHgadq4vmCRd9WNHiVQMHFFsz4/J8WwDQ1gkegzs4MI/l/syxSE0mC0EkvhXj/04oDe571ok42vi7jSppzqoup+E6hYYStMFK9sJ93Oa3pxRn9skTWmGcBb1njrVSCD93rxpKxWDFU5s12saJ2iQmEnPfJ3ZklWlws350g==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.112.34)\n smtp.mailfrom=nvidia.com; tuxdriver.com; dkim=none (message not signed)\n header.d=none;tuxdriver.com; dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.112.34 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.112.34; helo=mail.nvidia.com;",
        "From": "Xueming Li <xuemingl@nvidia.com>",
        "To": "Viacheslav Ovsiienko <viacheslavo@nvidia.com>",
        "CC": "<dev@dpdk.org>, <xuemingl@nvidia.com>, Matan Azrad <matan@nvidia.com>,\n Shahaf Shuler <shahafs@nvidia.com>, Ray Kinsella <mdr@ashroe.eu>, Neil Horman\n <nhorman@tuxdriver.com>",
        "Date": "Wed, 16 Jun 2021 07:09:35 +0300",
        "Message-ID": "<20210616040935.311733-15-xuemingl@nvidia.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20210527133759.17401-2-xuemingl@nvidia.com>",
        "References": "<20210527133759.17401-2-xuemingl@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[172.20.187.6]",
        "X-ClientProxiedBy": "HQMAIL111.nvidia.com (172.20.187.18) To\n HQMAIL107.nvidia.com (172.20.187.13)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "db003786-c220-4307-496c-08d9307ca758",
        "X-MS-TrafficTypeDiagnostic": "BN8PR12MB3075:",
        "X-Microsoft-Antispam-PRVS": "\n <BN8PR12MB3075A41FB18F45EAAF39A442A10F9@BN8PR12MB3075.namprd12.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:586;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n lhJlOpUapESTlK7Wkh6G0nB89OJZtg86l80fd0aHAVQSBz2FRxkKlWRpAs5bHnDUmBwq+Hi5LwkKZvf2mLtC57JftmFVQZIdjFF6FCd3q0EkwPM/2UjkwKoXaNvf+g0NTbSQa0C492rYLJrLATk9Z5KYx1GQMuZscQz92S7YZRHLbBhUsU/npCf5YVvIbdDr4rzidLv/thweqw1vizkiBkiBWbtJj2BKoCIiIvluudim3OJvpwhkApQb5EOpVl94zgCxNCJUZw8wsM/jN47zw0TmBdD+t7GDAaa2sqDJd8kWNZOTv5wWcwaO9b3G2BwUAjQQwDUIp0w067b8lqFaA0Th7K0wva5JsrVPyHXH0k9fjTnIi8s95WaqQsdB8INCTOg3n6IyORHdBj/EIk1dKxyvlQBZLdkEGBIPWiBjYsmyW2ZXHVfEAU8Sz4APvHwX2ZufnFOQsCNKZv6znS3ylYTA1XaSkJUwjYCLi5fiI9PDV0DrAdFXEna9s8Wmd9lDOCvcF8DmIfCF8PdX2B+kxavcENH0w0SYVD/hH8JNb3yzKwJwr2RvVHovA2OGLchITO19/U2bnTbCFGu7DCeGaEoj40eqlcj2NE8WVXa3+m6ou3qXyATFnUXsaRWPXOtLIaLHJPI8YKmXptLVBFidMg==",
        "X-Forefront-Antispam-Report": "CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE;\n SFS:(4636009)(396003)(376002)(39860400002)(346002)(136003)(46966006)(36840700001)(1076003)(36860700001)(2906002)(6286002)(86362001)(8676002)(8936002)(316002)(83380400001)(36756003)(82310400003)(7696005)(6666004)(6862004)(70206006)(55016002)(26005)(82740400003)(356005)(7636003)(5660300002)(16526019)(70586007)(30864003)(336012)(186003)(54906003)(426003)(2616005)(6636002)(4326008)(37006003)(36906005)(478600001)(47076005);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "16 Jun 2021 04:10:18.9016 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n db003786-c220-4307-496c-08d9307ca758",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n BN8NAM11FT049.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BN8PR12MB3075",
        "Subject": "[dpdk-dev] [PATCH v1 14/14] common/mlx5: clean up legacy PCI bus\n driver",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Clean up legacy PCI bus driver since all mlx5 PMDs moved to new common\nPCI bus driver.\n\nSigned-off-by: Xueming Li <xuemingl@nvidia.com>\n---\n drivers/common/mlx5/linux/mlx5_common_os.h |   1 -\n drivers/common/mlx5/mlx5_common.c          |   1 -\n drivers/common/mlx5/mlx5_common.h          |   1 +\n drivers/common/mlx5/mlx5_common_pci.c      | 433 +--------------------\n drivers/common/mlx5/mlx5_common_pci.h      |  77 ----\n drivers/common/mlx5/mlx5_common_private.h  |   1 +\n drivers/common/mlx5/version.map            |   3 -\n 7 files changed, 4 insertions(+), 513 deletions(-)\n delete mode 100644 drivers/common/mlx5/mlx5_common_pci.h",
    "diff": "diff --git a/drivers/common/mlx5/linux/mlx5_common_os.h b/drivers/common/mlx5/linux/mlx5_common_os.h\nindex 86d0cb09b0..2b03bf811e 100644\n--- a/drivers/common/mlx5/linux/mlx5_common_os.h\n+++ b/drivers/common/mlx5/linux/mlx5_common_os.h\n@@ -289,7 +289,6 @@ mlx5_os_free(void *addr)\n \tfree(addr);\n }\n \n-__rte_internal\n struct ibv_device *\n mlx5_os_get_ibv_device(const struct rte_pci_addr *addr);\n \ndiff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c\nindex 4ff13cb461..6c83cf4bcd 100644\n--- a/drivers/common/mlx5/mlx5_common.c\n+++ b/drivers/common/mlx5/mlx5_common.c\n@@ -14,7 +14,6 @@\n #include \"mlx5_common.h\"\n #include \"mlx5_common_os.h\"\n #include \"mlx5_common_log.h\"\n-#include \"mlx5_common_pci.h\"\n #include \"mlx5_common_private.h\"\n \n uint8_t haswell_broadwell_cpu;\ndiff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h\nindex 7d7b896517..85855345a9 100644\n--- a/drivers/common/mlx5/mlx5_common.h\n+++ b/drivers/common/mlx5/mlx5_common.h\n@@ -10,6 +10,7 @@\n #include <rte_pci.h>\n #include <rte_debug.h>\n #include <rte_atomic.h>\n+#include <rte_rwlock.h>\n #include <rte_log.h>\n #include <rte_kvargs.h>\n #include <rte_devargs.h>\ndiff --git a/drivers/common/mlx5/mlx5_common_pci.c b/drivers/common/mlx5/mlx5_common_pci.c\nindex 6fe28defbf..8b38091d87 100644\n--- a/drivers/common/mlx5/mlx5_common_pci.c\n+++ b/drivers/common/mlx5/mlx5_common_pci.c\n@@ -8,431 +8,17 @@\n #include <rte_devargs.h>\n #include <rte_errno.h>\n #include <rte_class.h>\n+#include <rte_pci.h>\n+#include <rte_bus_pci.h>\n \n #include \"mlx5_common_log.h\"\n-#include \"mlx5_common_pci.h\"\n #include \"mlx5_common_private.h\"\n \n static struct rte_pci_driver mlx5_common_pci_driver;\n \n-/********** Legacy PCI bus driver, to be removed ********/\n-\n-struct mlx5_pci_device {\n-\tstruct rte_pci_device *pci_dev;\n-\tTAILQ_ENTRY(mlx5_pci_device) next;\n-\tuint32_t classes_loaded;\n-};\n-\n-/* Head of list of drivers. */\n-static TAILQ_HEAD(mlx5_pci_bus_drv_head, mlx5_pci_driver) drv_list =\n-\t\t\t\tTAILQ_HEAD_INITIALIZER(drv_list);\n-\n-/* Head of mlx5 pci devices. */\n-static TAILQ_HEAD(mlx5_pci_devices_head, mlx5_pci_device) devices_list =\n-\t\t\t\tTAILQ_HEAD_INITIALIZER(devices_list);\n-\n-static const struct {\n-\tconst char *name;\n-\tunsigned int driver_class;\n-} mlx5_classes[] = {\n-\t{ .name = \"vdpa\", .driver_class = MLX5_CLASS_VDPA },\n-\t{ .name = \"net\", .driver_class = MLX5_CLASS_NET },\n-\t{ .name = \"regex\", .driver_class = MLX5_CLASS_REGEX },\n-\t{ .name = \"compress\", .driver_class = MLX5_CLASS_COMPRESS },\n-};\n-\n-static const unsigned int mlx5_class_combinations[] = {\n-\tMLX5_CLASS_NET,\n-\tMLX5_CLASS_VDPA,\n-\tMLX5_CLASS_REGEX,\n-\tMLX5_CLASS_COMPRESS,\n-\tMLX5_CLASS_NET | MLX5_CLASS_REGEX,\n-\tMLX5_CLASS_VDPA | MLX5_CLASS_REGEX,\n-\tMLX5_CLASS_NET | MLX5_CLASS_COMPRESS,\n-\tMLX5_CLASS_VDPA | MLX5_CLASS_COMPRESS,\n-\tMLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS,\n-\tMLX5_CLASS_NET | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS,\n-\tMLX5_CLASS_VDPA | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS,\n-\t/* New class combination should be added here. */\n-};\n-\n-static int\n-class_name_to_value(const char *class_name)\n-{\n-\tunsigned int i;\n-\n-\tfor (i = 0; i < RTE_DIM(mlx5_classes); i++) {\n-\t\tif (strcmp(class_name, mlx5_classes[i].name) == 0)\n-\t\t\treturn mlx5_classes[i].driver_class;\n-\t}\n-\treturn -EINVAL;\n-}\n-\n-static struct mlx5_pci_driver *\n-driver_get(uint32_t class)\n-{\n-\tstruct mlx5_pci_driver *driver;\n-\n-\tTAILQ_FOREACH(driver, &drv_list, next) {\n-\t\tif (driver->driver_class == class)\n-\t\t\treturn driver;\n-\t}\n-\treturn NULL;\n-}\n-\n-static int\n-bus_cmdline_options_handler(__rte_unused const char *key,\n-\t\t\t    const char *class_names, void *opaque)\n-{\n-\tint *ret = opaque;\n-\tchar *nstr_org;\n-\tint class_val;\n-\tchar *found;\n-\tchar *nstr;\n-\tchar *refstr = NULL;\n-\n-\t*ret = 0;\n-\tnstr = strdup(class_names);\n-\tif (!nstr) {\n-\t\t*ret = -ENOMEM;\n-\t\treturn *ret;\n-\t}\n-\tnstr_org = nstr;\n-\tfound = strtok_r(nstr, \":\", &refstr);\n-\tif (!found)\n-\t\tgoto err;\n-\tdo {\n-\t\t/* Extract each individual class name. Multiple\n-\t\t * class key,value is supplied as class=net:vdpa:foo:bar.\n-\t\t */\n-\t\tclass_val = class_name_to_value(found);\n-\t\t/* Check if its a valid class. */\n-\t\tif (class_val < 0) {\n-\t\t\t*ret = -EINVAL;\n-\t\t\tgoto err;\n-\t\t}\n-\t\t*ret |= class_val;\n-\t\tfound = strtok_r(NULL, \":\", &refstr);\n-\t} while (found);\n-err:\n-\tfree(nstr_org);\n-\tif (*ret < 0)\n-\t\tDRV_LOG(ERR, \"Invalid mlx5 class options %s.\"\n-\t\t\t\" Maybe typo in device class argument setting?\",\n-\t\t\tclass_names);\n-\treturn *ret;\n-}\n-\n-static int\n-parse_class_options(const struct rte_devargs *devargs)\n-{\n-\tconst char *key = RTE_DEVARGS_KEY_CLASS;\n-\tstruct rte_kvargs *kvlist;\n-\tint ret = 0;\n-\n-\tif (devargs == NULL)\n-\t\treturn 0;\n-\tkvlist = rte_kvargs_parse(devargs->args, NULL);\n-\tif (kvlist == NULL)\n-\t\treturn 0;\n-\tif (rte_kvargs_count(kvlist, key))\n-\t\trte_kvargs_process(kvlist, key, bus_cmdline_options_handler,\n-\t\t\t\t   &ret);\n-\trte_kvargs_free(kvlist);\n-\treturn ret;\n-}\n-\n-static bool\n-mlx5_bus_match(const struct mlx5_pci_driver *drv,\n-\t       const struct rte_pci_device *pci_dev)\n-{\n-\tconst struct rte_pci_id *id_table;\n-\n-\tfor (id_table = drv->pci_driver.id_table; id_table->vendor_id != 0;\n-\t     id_table++) {\n-\t\t/* Check if device's ids match the class driver's ids. */\n-\t\tif (id_table->vendor_id != pci_dev->id.vendor_id &&\n-\t\t    id_table->vendor_id != RTE_PCI_ANY_ID)\n-\t\t\tcontinue;\n-\t\tif (id_table->device_id != pci_dev->id.device_id &&\n-\t\t    id_table->device_id != RTE_PCI_ANY_ID)\n-\t\t\tcontinue;\n-\t\tif (id_table->subsystem_vendor_id !=\n-\t\t    pci_dev->id.subsystem_vendor_id &&\n-\t\t    id_table->subsystem_vendor_id != RTE_PCI_ANY_ID)\n-\t\t\tcontinue;\n-\t\tif (id_table->subsystem_device_id !=\n-\t\t    pci_dev->id.subsystem_device_id &&\n-\t\t    id_table->subsystem_device_id != RTE_PCI_ANY_ID)\n-\t\t\tcontinue;\n-\t\tif (id_table->class_id != pci_dev->id.class_id &&\n-\t\t    id_table->class_id != RTE_CLASS_ANY_ID)\n-\t\t\tcontinue;\n-\t\treturn true;\n-\t}\n-\treturn false;\n-}\n-\n-static int\n-is_valid_class_combination(uint32_t user_classes)\n-{\n-\tunsigned int i;\n-\n-\t/* Verify if user specified valid supported combination. */\n-\tfor (i = 0; i < RTE_DIM(mlx5_class_combinations); i++) {\n-\t\tif (mlx5_class_combinations[i] == user_classes)\n-\t\t\treturn 0;\n-\t}\n-\t/* Not found any valid class combination. */\n-\treturn -EINVAL;\n-}\n-\n-static struct mlx5_pci_device *\n-pci_to_mlx5_device(const struct rte_pci_device *pci_dev)\n-{\n-\tstruct mlx5_pci_device *dev;\n-\n-\tTAILQ_FOREACH(dev, &devices_list, next) {\n-\t\tif (dev->pci_dev == pci_dev)\n-\t\t\treturn dev;\n-\t}\n-\treturn NULL;\n-}\n-\n-static bool\n-device_class_enabled(const struct mlx5_pci_device *device, uint32_t class)\n-{\n-\treturn (device->classes_loaded & class) ? true : false;\n-}\n-\n-static void\n-dev_release(struct mlx5_pci_device *dev)\n-{\n-\tTAILQ_REMOVE(&devices_list, dev, next);\n-\trte_free(dev);\n-}\n-\n-static int\n-drivers_remove(struct mlx5_pci_device *dev, uint32_t enabled_classes)\n-{\n-\tstruct mlx5_pci_driver *driver;\n-\tint local_ret = -ENODEV;\n-\tunsigned int i = 0;\n-\tint ret = 0;\n-\n-\tenabled_classes &= dev->classes_loaded;\n-\twhile (enabled_classes) {\n-\t\tdriver = driver_get(RTE_BIT64(i));\n-\t\tif (driver) {\n-\t\t\tlocal_ret = driver->pci_driver.remove(dev->pci_dev);\n-\t\t\tif (!local_ret)\n-\t\t\t\tdev->classes_loaded &= ~RTE_BIT64(i);\n-\t\t\telse if (ret == 0)\n-\t\t\t\tret = local_ret;\n-\t\t}\n-\t\tenabled_classes &= ~RTE_BIT64(i);\n-\t\ti++;\n-\t}\n-\tif (local_ret)\n-\t\tret = local_ret;\n-\treturn ret;\n-}\n-\n-static int\n-drivers_probe(struct mlx5_pci_device *dev, struct rte_pci_driver *pci_drv,\n-\t      struct rte_pci_device *pci_dev, uint32_t user_classes)\n-{\n-\tstruct mlx5_pci_driver *driver;\n-\tuint32_t enabled_classes = 0;\n-\tbool already_loaded;\n-\tint ret;\n-\n-\tTAILQ_FOREACH(driver, &drv_list, next) {\n-\t\tif ((driver->driver_class & user_classes) == 0)\n-\t\t\tcontinue;\n-\t\tif (!mlx5_bus_match(driver, pci_dev))\n-\t\t\tcontinue;\n-\t\talready_loaded = dev->classes_loaded & driver->driver_class;\n-\t\tif (already_loaded &&\n-\t\t    !(driver->pci_driver.drv_flags & RTE_PCI_DRV_PROBE_AGAIN)) {\n-\t\t\tDRV_LOG(ERR, \"Device %s is already probed\",\n-\t\t\t\tpci_dev->device.name);\n-\t\t\tret = -EEXIST;\n-\t\t\tgoto probe_err;\n-\t\t}\n-\t\tret = driver->pci_driver.probe(pci_drv, pci_dev);\n-\t\tif (ret < 0) {\n-\t\t\tDRV_LOG(ERR, \"Failed to load driver %s\",\n-\t\t\t\tdriver->pci_driver.driver.name);\n-\t\t\tgoto probe_err;\n-\t\t}\n-\t\tenabled_classes |= driver->driver_class;\n-\t}\n-\tdev->classes_loaded |= enabled_classes;\n-\treturn 0;\n-probe_err:\n-\t/* Only unload drivers which are enabled which were enabled\n-\t * in this probe instance.\n-\t */\n-\tdrivers_remove(dev, enabled_classes);\n-\treturn ret;\n-}\n-\n-/**\n- * DPDK callback to register to probe multiple drivers for a PCI device.\n- *\n- * @param[in] pci_drv\n- *   PCI driver structure.\n- * @param[in] dev\n- *   PCI device information.\n- *\n- * @return\n- *   0 on success, a negative errno value otherwise and rte_errno is set.\n- */\n-static int\n-mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n-\t       struct rte_pci_device *pci_dev)\n-{\n-\tstruct mlx5_pci_device *dev;\n-\tuint32_t user_classes = 0;\n-\tbool new_device = false;\n-\tint ret;\n-\n-\tret = parse_class_options(pci_dev->device.devargs);\n-\tif (ret < 0)\n-\t\treturn ret;\n-\tuser_classes = ret;\n-\tif (user_classes) {\n-\t\t/* Validate combination here. */\n-\t\tret = is_valid_class_combination(user_classes);\n-\t\tif (ret) {\n-\t\t\tDRV_LOG(ERR, \"Unsupported mlx5 classes supplied.\");\n-\t\t\treturn ret;\n-\t\t}\n-\t} else {\n-\t\t/* Default to net class. */\n-\t\tuser_classes = MLX5_CLASS_NET;\n-\t}\n-\tdev = pci_to_mlx5_device(pci_dev);\n-\tif (!dev) {\n-\t\tdev = rte_zmalloc(\"mlx5_pci_device\", sizeof(*dev), 0);\n-\t\tif (!dev)\n-\t\t\treturn -ENOMEM;\n-\t\tdev->pci_dev = pci_dev;\n-\t\tTAILQ_INSERT_HEAD(&devices_list, dev, next);\n-\t\tnew_device = true;\n-\t}\n-\tret = drivers_probe(dev, pci_drv, pci_dev, user_classes);\n-\tif (ret)\n-\t\tgoto class_err;\n-\treturn 0;\n-class_err:\n-\tif (new_device)\n-\t\tdev_release(dev);\n-\treturn ret;\n-}\n-\n-/**\n- * DPDK callback to remove one or more drivers for a PCI device.\n- *\n- * This function removes all drivers probed for a given PCI device.\n- *\n- * @param[in] pci_dev\n- *   Pointer to the PCI device.\n- *\n- * @return\n- *   0 on success, the function cannot fail.\n- */\n-static int\n-mlx5_pci_remove(struct rte_pci_device *pci_dev)\n-{\n-\tstruct mlx5_pci_device *dev;\n-\tint ret;\n-\n-\tdev = pci_to_mlx5_device(pci_dev);\n-\tif (!dev)\n-\t\treturn -ENODEV;\n-\t/* Matching device found, cleanup and unload drivers. */\n-\tret = drivers_remove(dev, dev->classes_loaded);\n-\tif (!ret)\n-\t\tdev_release(dev);\n-\treturn ret;\n-}\n-\n-static int\n-mlx5_pci_dma_map(struct rte_pci_device *pci_dev, void *addr,\n-\t\t uint64_t iova, size_t len)\n-{\n-\tstruct mlx5_pci_driver *driver = NULL;\n-\tstruct mlx5_pci_driver *temp;\n-\tstruct mlx5_pci_device *dev;\n-\tint ret = -EINVAL;\n-\n-\tdev = pci_to_mlx5_device(pci_dev);\n-\tif (!dev)\n-\t\treturn -ENODEV;\n-\tTAILQ_FOREACH(driver, &drv_list, next) {\n-\t\tif (device_class_enabled(dev, driver->driver_class) &&\n-\t\t    driver->pci_driver.dma_map) {\n-\t\t\tret = driver->pci_driver.dma_map(pci_dev, addr,\n-\t\t\t\t\t\t\t iova, len);\n-\t\t\tif (ret)\n-\t\t\t\tgoto map_err;\n-\t\t}\n-\t}\n-\treturn ret;\n-map_err:\n-\tTAILQ_FOREACH(temp, &drv_list, next) {\n-\t\tif (temp == driver)\n-\t\t\tbreak;\n-\t\tif (device_class_enabled(dev, temp->driver_class) &&\n-\t\t    temp->pci_driver.dma_map && temp->pci_driver.dma_unmap)\n-\t\t\ttemp->pci_driver.dma_unmap(pci_dev, addr, iova, len);\n-\t}\n-\treturn ret;\n-}\n-\n-static int\n-mlx5_pci_dma_unmap(struct rte_pci_device *pci_dev, void *addr,\n-\t\t   uint64_t iova, size_t len)\n-{\n-\tstruct mlx5_pci_driver *driver;\n-\tstruct mlx5_pci_device *dev;\n-\tint local_ret = -EINVAL;\n-\tint ret;\n-\n-\tdev = pci_to_mlx5_device(pci_dev);\n-\tif (!dev)\n-\t\treturn -ENODEV;\n-\tret = 0;\n-\t/* There is no unmap error recovery in current implementation. */\n-\tTAILQ_FOREACH_REVERSE(driver, &drv_list, mlx5_pci_bus_drv_head, next) {\n-\t\tif (device_class_enabled(dev, driver->driver_class) &&\n-\t\t    driver->pci_driver.dma_unmap) {\n-\t\t\tlocal_ret = driver->pci_driver.dma_unmap(pci_dev, addr,\n-\t\t\t\t\t\t\t\t iova, len);\n-\t\t\tif (local_ret && (ret == 0))\n-\t\t\t\tret = local_ret;\n-\t\t}\n-\t}\n-\tif (local_ret)\n-\t\tret = local_ret;\n-\treturn ret;\n-}\n-\n /* PCI ID table is build dynamically based on registered mlx5 drivers. */\n static struct rte_pci_id *mlx5_pci_id_table;\n \n-static struct rte_pci_driver mlx5_pci_driver = {\n-\t.driver = {\n-\t\t.name = MLX5_PCI_DRIVER_NAME,\n-\t},\n-\t.probe = mlx5_pci_probe,\n-\t.remove = mlx5_pci_remove,\n-\t.dma_map = mlx5_pci_dma_map,\n-\t.dma_unmap = mlx5_pci_dma_unmap,\n-};\n-\n static int\n pci_id_table_size_get(const struct rte_pci_id *id_table)\n {\n@@ -509,7 +95,6 @@ pci_ids_table_update(const struct rte_pci_id *driver_id_table)\n \t}\n \t/* Terminate table with empty entry. */\n \tupdated_table[i].vendor_id = 0;\n-\tmlx5_pci_driver.id_table = updated_table;\n \tmlx5_common_pci_driver.id_table = updated_table;\n \tmlx5_pci_id_table = updated_table;\n \tif (old_table)\n@@ -517,20 +102,6 @@ pci_ids_table_update(const struct rte_pci_id *driver_id_table)\n \treturn 0;\n }\n \n-void\n-mlx5_pci_driver_register(struct mlx5_pci_driver *driver)\n-{\n-\tint ret;\n-\n-\tret = pci_ids_table_update(driver->pci_driver.id_table);\n-\tif (ret)\n-\t\treturn;\n-\tmlx5_pci_driver.drv_flags |= driver->pci_driver.drv_flags;\n-\tTAILQ_INSERT_TAIL(&drv_list, driver, next);\n-}\n-\n-/********** New common PCI bus driver ********/\n-\n bool\n mlx5_dev_is_pci(const struct rte_device *dev)\n {\ndiff --git a/drivers/common/mlx5/mlx5_common_pci.h b/drivers/common/mlx5/mlx5_common_pci.h\ndeleted file mode 100644\nindex de89bb98bc..0000000000\n--- a/drivers/common/mlx5/mlx5_common_pci.h\n+++ /dev/null\n@@ -1,77 +0,0 @@\n-/* SPDX-License-Identifier: BSD-3-Clause\n- * Copyright 2020 Mellanox Technologies, Ltd\n- */\n-\n-#ifndef _MLX5_COMMON_PCI_H_\n-#define _MLX5_COMMON_PCI_H_\n-\n-/**\n- * @file\n- *\n- * RTE Mellanox PCI Driver Interface\n- * Mellanox ConnectX PCI device supports multiple class: net,vdpa,regex and\n- * compress devices. This layer enables creating such multiple class of devices\n- * on a single PCI device by allowing to bind multiple class specific device\n- * driver to attach to mlx5_pci driver.\n- *\n- * -----------    ------------    -------------    ----------------\n- * |   mlx5  |    |   mlx5   |    |   mlx5    |    |     mlx5     |\n- * | net pmd |    | vdpa pmd |    | regex pmd |    | compress pmd |\n- * -----------    ------------    -------------    ----------------\n- *      \\              \\                    /              /\n- *       \\              \\                  /              /\n- *        \\              \\_--------------_/              /\n- *         \\_______________|   mlx5     |_______________/\n- *                         | pci common |\n- *                         --------------\n- *                               |\n- *                           -----------\n- *                           |   mlx5  |\n- *                           | pci dev |\n- *                           -----------\n- *\n- * - mlx5 pci driver binds to mlx5 PCI devices defined by PCI\n- *   ID table of all related mlx5 PCI devices.\n- * - mlx5 class driver such as net, vdpa, regex PMD defines its\n- *   specific PCI ID table and mlx5 bus driver probes matching\n- *   class drivers.\n- * - mlx5 pci bus driver is cental place that validates supported\n- *   class combinations.\n- */\n-\n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif /* __cplusplus */\n-\n-#include <rte_pci.h>\n-#include <rte_bus_pci.h>\n-\n-#include <mlx5_common.h>\n-\n-void mlx5_common_pci_init(void);\n-\n-/**\n- * A structure describing a mlx5 pci driver.\n- */\n-struct mlx5_pci_driver {\n-\tstruct rte_pci_driver pci_driver;\t/**< Inherit core pci driver. */\n-\tuint32_t driver_class;\t/**< Class of this driver, enum mlx5_class */\n-\tTAILQ_ENTRY(mlx5_pci_driver) next;\n-};\n-\n-/**\n- * Register a mlx5_pci device driver.\n- *\n- * @param driver\n- *   A pointer to a mlx5_pci_driver structure describing the driver\n- *   to be registered.\n- */\n-__rte_internal\n-void\n-mlx5_pci_driver_register(struct mlx5_pci_driver *driver);\n-\n-#ifdef __cplusplus\n-}\n-#endif /* __cplusplus */\n-\n-#endif /* _MLX5_COMMON_PCI_H_ */\ndiff --git a/drivers/common/mlx5/mlx5_common_private.h b/drivers/common/mlx5/mlx5_common_private.h\nindex 1096fa85e7..c929840408 100644\n--- a/drivers/common/mlx5/mlx5_common_private.h\n+++ b/drivers/common/mlx5/mlx5_common_private.h\n@@ -31,6 +31,7 @@ int mlx5_common_dev_dma_unmap(struct rte_device *dev, void *addr, uint64_t iova,\n \n /* Common PCI bus driver: */\n \n+void mlx5_common_pci_init(void);\n void mlx5_common_driver_on_register_pci(struct mlx5_class_driver *driver);\n bool mlx5_dev_pci_match(const struct mlx5_class_driver *drv,\n \t\t\tconst struct rte_device *dev);\ndiff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map\nindex ea4c49b7e7..39bc7bad23 100644\n--- a/drivers/common/mlx5/version.map\n+++ b/drivers/common/mlx5/version.map\n@@ -130,13 +130,10 @@ INTERNAL {\n \tmlx5_nl_vlan_vmwa_create; # WINDOWS_NO_EXPORT\n \tmlx5_nl_vlan_vmwa_delete; # WINDOWS_NO_EXPORT\n \n-\tmlx5_pci_driver_register;\n-\n \tmlx5_os_alloc_pd;\n \tmlx5_os_dealloc_pd;\n \tmlx5_os_dereg_mr;\n \tmlx5_os_get_ibv_dev; # WINDOWS_NO_EXPORT\n-\tmlx5_os_get_ibv_device; # WINDOWS_NO_EXPORT\n \tmlx5_os_reg_mr;\n \tmlx5_os_umem_dereg;\n \tmlx5_os_umem_reg;\n",
    "prefixes": [
        "v1",
        "14/14"
    ]
}