get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 96039,
    "url": "http://patches.dpdk.org/api/patches/96039/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210719025410.15483-16-xuemingl@nvidia.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20210719025410.15483-16-xuemingl@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210719025410.15483-16-xuemingl@nvidia.com",
    "date": "2021-07-19T02:54:10",
    "name": "[v3,15/15] common/mlx5: clean up legacy PCI bus driver",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "128bc3002e9a1b7bc0c0c03089a17658fa1975f4",
    "submitter": {
        "id": 1904,
        "url": "http://patches.dpdk.org/api/people/1904/?format=api",
        "name": "Xueming Li",
        "email": "xuemingl@nvidia.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210719025410.15483-16-xuemingl@nvidia.com/mbox/",
    "series": [
        {
            "id": 17884,
            "url": "http://patches.dpdk.org/api/series/17884/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=17884",
            "date": "2021-07-19T02:53:55",
            "name": "net/mlx5: support Sub-Function",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/17884/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/96039/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/96039/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 4DC72A0C45;\n\tMon, 19 Jul 2021 04:56:35 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AB2F141193;\n\tMon, 19 Jul 2021 04:56:22 +0200 (CEST)",
            "from NAM11-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam11on2061.outbound.protection.outlook.com [40.107.223.61])\n by mails.dpdk.org (Postfix) with ESMTP id 1020E41197\n for <dev@dpdk.org>; Mon, 19 Jul 2021 04:56:21 +0200 (CEST)",
            "from MWHPR2001CA0011.namprd20.prod.outlook.com\n (2603:10b6:301:15::21) by DM5PR1201MB2504.namprd12.prod.outlook.com\n (2603:10b6:3:e3::22) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Mon, 19 Jul\n 2021 02:56:19 +0000",
            "from CO1NAM11FT053.eop-nam11.prod.protection.outlook.com\n (2603:10b6:301:15:cafe::b9) by MWHPR2001CA0011.outlook.office365.com\n (2603:10b6:301:15::21) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend\n Transport; Mon, 19 Jul 2021 02:56:19 +0000",
            "from mail.nvidia.com (216.228.112.34) by\n CO1NAM11FT053.mail.protection.outlook.com (10.13.175.63) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.4331.21 via Frontend Transport; Mon, 19 Jul 2021 02:56:18 +0000",
            "from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com\n (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 19 Jul\n 2021 02:56:16 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=csJCcIHAxq1gWuEXHfDVGKo2Un1NSgeYN6QsmtmlXsB+Z1dQzgHtJQujNt7G48ZqRDiIWmNL28cqtwZqt7hNTtcU9mLdURJdvaX6ZShiTxZrLMB5usPcVQ5IiaDXQLBMsN763FxXlq0qkNkYM6mA9nGWQpArQk6OicKGAySmWkR2ymSsGTAH7FkdYqwjywoX0QkdMtHpYh7Vk229ktcc+DCmABwFuFTBcHpm2F200FoyU3EfNkk93VHxxJ7Q/6P+q/5Jp0/FnBu8b+dDmoG6YgaiRgunn6zde8qdzFe4O/JjqH+W5PCP1wiXcesAFNJj0g8gqtWUSl5A4ydekdnCKw==",
        "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=2isWTook7PeZQOcF/bRfc4YQbrFWO3nJjpfZ/HuDG80=;\n b=LOXssFU9IhyYgalwiD1q1N58AkKKuKPEvTv01lonsTXvICc9pXbMnOMhJX53hlsdKqgEOAnvhyYnZPaAYs7lNXyVM1CN8Xa2xhY859e7lNK20sY7Bnej1Ub5MkLoHPbVRA3q+HhTXSJimhyqt6Xr+DwnrIzS3RcujXYli9VPqSoId5WsJCJUbnWKd3KjK7AsNMtJI152svvmRRXEkwQCS4K5T+0XMVKmZbci2Rn9xG8HYNjiAm+Enpw5EI0o+urSl+MnID6tbQJPD+JiNWKSK/V8rYuqvQ3eEw5KnnT7yo+CJmsiHFVlXnEwC6w8wySTrYktlRVAbWxTUDAOxHSVDg==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.112.34) smtp.rcpttodomain=ashroe.eu smtp.mailfrom=nvidia.com;\n dmarc=pass (p=quarantine 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=2isWTook7PeZQOcF/bRfc4YQbrFWO3nJjpfZ/HuDG80=;\n b=e+INcY3o6RVcx8Jb5cJcCCJjqBVhPbT7MWKrxp0xcQsfTWQ5TzvrzeFsBHVG1BiJP2XOizoXV9DxMY9+lShwiOYdq9nb6BXkoAPBNxQT2L4sJzNU9hUYOUvYJ7CL4gAphLeeJscvb+U833PmeBVqqlb25C7ZQLHwhJIzC/h6cNhWVnF7wMBPvmRG86oy/dUAvtUmN0MCJYSlMBbgiZn63BUL8UgmkxaPuMq5jnfJMUun5bFeAkhUHOh+ai1N3vPVWxAEiDQ6dz1EYnkERH2nayvj0jxSN6ncv9qRhrh055ecjH77UCrgaz2vwO5zwJ5ODUiSYlU+R857zCWTl8+nHA==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.112.34)\n smtp.mailfrom=nvidia.com; ashroe.eu; dkim=none (message not signed)\n header.d=none;ashroe.eu; 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>",
        "Date": "Mon, 19 Jul 2021 10:54:10 +0800",
        "Message-ID": "<20210719025410.15483-16-xuemingl@nvidia.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210713131437.30170-2-xuemingl@nvidia.com>",
        "References": "<20210713131437.30170-2-xuemingl@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[172.20.187.5]",
        "X-ClientProxiedBy": "HQMAIL105.nvidia.com (172.20.187.12) To\n HQMAIL107.nvidia.com (172.20.187.13)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "74870838-a344-4141-021a-08d94a60c860",
        "X-MS-TrafficTypeDiagnostic": "DM5PR1201MB2504:",
        "X-Microsoft-Antispam-PRVS": "\n <DM5PR1201MB25040EF1CC9163B6E18F60F4A1E19@DM5PR1201MB2504.namprd12.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:586;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n dFXi/Xp4eFRBstxjQoVFrgyyDl/8AUGlxrqzDZhHGm3LbQW1zNuKH1MPWU+67mLTSfx4N2JiRuKbqLsdL7MILwU60MBENQe3qOFSflB6aEP5NZFL1v2lBn2CRQv47/aU0npv5p0s/G1iSYQsFae5DF47+ORZwvu0nkhVGKjdyccAKVshSpLN1/Zb4jz0kvzvsbHLBfPW29qA9medGXsevQMiQtYLGA1qH+AyqGUNcdS1m8WaNIYlvqKQ6Ki22p4Edbdm1ya5hktHccTB5gA28BHFm75n3pGtNXDOONGH+n5wRnxSv7Wm6mOjBGZfqW8tySq3nzRF3ZdEP/W2iMxrjFySNdRq8dz2cUfCaR+efhSwiRxgyWI+OY6oN+sN00FgijIzIgimeBUbBVBeo/OnBUEOgFUz+zNfwpEAL8AaaIVSYMnWZf1/oq+nVnz/CfIlvabdkLZsiPLxJh7eT9IsvVqtV/SY46495MX6BYjvFwPNCn9GMXsj3PynUF2mbLdp3kIog1rz+8v5fhksa18phz6Sf52phri4H+QVfkefoop1BulyVpAwHLNjwTVc/V5JkEI1Sg41M4x5YHIB+tx5SHMtkJ75j+g6JWTK/TDZgGyzHFp416Xpvx5sRIc8zZGtsesft9fGxq3OVHF6wiXwgW7VYWRCDbz951PS6GXZ9W3KnF7uobq0OsvsdbOGWq6r2phlwOQP1thpFcJC6KBHdQ==",
        "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)(376002)(396003)(136003)(39860400002)(346002)(46966006)(36840700001)(37006003)(83380400001)(6636002)(82740400003)(316002)(6862004)(36756003)(356005)(336012)(54906003)(1076003)(8676002)(30864003)(7696005)(26005)(2616005)(36906005)(86362001)(47076005)(36860700001)(4326008)(6666004)(7636003)(82310400003)(8936002)(55016002)(70206006)(2906002)(6286002)(70586007)(426003)(478600001)(186003)(16526019)(5660300002);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "19 Jul 2021 02:56:18.7557 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 74870838-a344-4141-021a-08d94a60c860",
        "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 CO1NAM11FT053.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DM5PR1201MB2504",
        "Subject": "[dpdk-dev] [PATCH v3 15/15] 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      | 435 +--------------------\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(+), 515 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 c258cd127a..558474c706 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 26d1b58853..f28ca938cf 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 f2d2015f9d..8b38091d87 100644\n--- a/drivers/common/mlx5/mlx5_common_pci.c\n+++ b/drivers/common/mlx5/mlx5_common_pci.c\n@@ -8,433 +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 = \"eth\", .driver_class = MLX5_CLASS_ETH },\n-\t/* Keep name \"net\" for backward compatibility. */\n-\t{ .name = \"net\", .driver_class = MLX5_CLASS_ETH },\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_ETH,\n-\tMLX5_CLASS_VDPA,\n-\tMLX5_CLASS_REGEX,\n-\tMLX5_CLASS_COMPRESS,\n-\tMLX5_CLASS_ETH | MLX5_CLASS_REGEX,\n-\tMLX5_CLASS_VDPA | MLX5_CLASS_REGEX,\n-\tMLX5_CLASS_ETH | MLX5_CLASS_COMPRESS,\n-\tMLX5_CLASS_VDPA | MLX5_CLASS_COMPRESS,\n-\tMLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS,\n-\tMLX5_CLASS_ETH | 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_ETH;\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@@ -511,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@@ -519,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 a47c86e354..da91d167b5 100644\n--- a/drivers/common/mlx5/version.map\n+++ b/drivers/common/mlx5/version.map\n@@ -138,13 +138,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": [
        "v3",
        "15/15"
    ]
}