get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 96172,
    "url": "http://patchwork.dpdk.org/api/patches/96172/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210721143743.24626-17-xuemingl@nvidia.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20210721143743.24626-17-xuemingl@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210721143743.24626-17-xuemingl@nvidia.com",
    "date": "2021-07-21T14:37:43",
    "name": "[v4,16/16] common/mlx5: clean up legacy PCI bus driver",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7438ecb3df37900ff3a7ac920d983e8651cc89f4",
    "submitter": {
        "id": 1904,
        "url": "http://patchwork.dpdk.org/api/people/1904/?format=api",
        "name": "Xueming Li",
        "email": "xuemingl@nvidia.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210721143743.24626-17-xuemingl@nvidia.com/mbox/",
    "series": [
        {
            "id": 17938,
            "url": "http://patchwork.dpdk.org/api/series/17938/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=17938",
            "date": "2021-07-21T14:37:27",
            "name": "net/mlx5: support Sub-Function",
            "version": 4,
            "mbox": "http://patchwork.dpdk.org/series/17938/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/96172/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/96172/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 C0087A0C51;\n\tWed, 21 Jul 2021 16:40:28 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C43E14111B;\n\tWed, 21 Jul 2021 16:40:01 +0200 (CEST)",
            "from NAM10-MW2-obe.outbound.protection.outlook.com\n (mail-mw2nam10on2054.outbound.protection.outlook.com [40.107.94.54])\n by mails.dpdk.org (Postfix) with ESMTP id AF7D84114B\n for <dev@dpdk.org>; Wed, 21 Jul 2021 16:40:00 +0200 (CEST)",
            "from BN9PR03CA0935.namprd03.prod.outlook.com (2603:10b6:408:108::10)\n by CY4PR12MB1510.namprd12.prod.outlook.com (2603:10b6:910:9::19) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.24; Wed, 21 Jul\n 2021 14:39:58 +0000",
            "from BN8NAM11FT010.eop-nam11.prod.protection.outlook.com\n (2603:10b6:408:108:cafe::c2) by BN9PR03CA0935.outlook.office365.com\n (2603:10b6:408:108::10) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.22 via Frontend\n Transport; Wed, 21 Jul 2021 14:39:58 +0000",
            "from mail.nvidia.com (216.228.112.34) by\n BN8NAM11FT010.mail.protection.outlook.com (10.13.177.53) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.4352.24 via Frontend Transport; Wed, 21 Jul 2021 14:39:57 +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; Wed, 21 Jul\n 2021 14:39:54 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=SJJW3PBXtlO7Fh143oQgGgmWIf3+w6Br8dorlAhI4ZOJlO1XZ2KkEk+xT44+JeJXerQGJk/pVvYp4PLXm/jblS7GVTqqtKVIJsGYQCfIn/LA1h2kv4e+q8oLEY9NNstkzwOSwa5+PHAj2ntbCaELzKemxlHh+FiE1/sgTJoUd5vLJpKO05hs3yKX+Bi+aQv028xF6DjuwWTNHJgYxGIE3o7O/e+BfNStW69J/uDCgw5leb47WlDhRUzEvevcAqxqNLQrG5NTYYfNBGICsBa7l0rq/wB5J/4sfLMYpqjAWXJoMjdMUwBFOcqU8UZlusFCflxhp7QLsVqVFZ2LvtcVWQ==",
        "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=hB57NZTEI8r8aCZSq4AWy2HtvTV8NxC3SwrJw/i/ugo=;\n b=I9hID2dMUkEC4jWDWQCKBzqzac/Ao2y/rLv6UrwmTBs+/J3NRdsGisDtylCu1j87EqXdh2RQ4vsQbHdnP1549tiF2+y/NqPr4XWPp8xDjjHBJFLYNIMC4ljpQFzLusc4WfaSfJtFRtkeytZoeg5TDWBu0bQ2gf+4W6NNFIFyqklbAgQG6/QREHVoGWjj0ZYQL7klejTtdommRX7NwTTdifsL55+3WEI4RiVZ6JthiOLXvWDYDe70cRjKJlfcrnI6M/w34s6SPqgXQuuxGhz1C38xyP1eq8Yr5fTo2oiuTne3EW9tjE7XmkSjhTqztLNnK767uQZQfxHrI+Ad6a/ekw==",
        "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=hB57NZTEI8r8aCZSq4AWy2HtvTV8NxC3SwrJw/i/ugo=;\n b=jV9pbqSaOxe2ziLkT8CtPozGu5Z/jON/ALopoAyf76lR5oNDJdDEUw4TkuH1Jxc6xNZvukh4vRlpgKYI6Ei4gwY/+t0Qlpc8iwBsp5cHFwCLkHBee5DjRw5jQORMtf8ScIPGNxnh75hnT+dLcXmQvdD8mdJIYVhP7levikDVvUGciuV4I1vAxpynbIVPWQiq6PbvNf8mr1Xg75vIZ79ot/Wg7T++ggU9HGpyBc6ujf2Xs/W6DULZ4xTSUzDGY2lT8EvHwuqSFZk9Hj+Z3KdGZTAveeZat7InWRj4nMQ17YJnNGIN1XUU0seQdEz8omvU6okQG5G8GPCdFNlB0i5Ihg==",
        "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": "Wed, 21 Jul 2021 22:37:43 +0800",
        "Message-ID": "<20210721143743.24626-17-xuemingl@nvidia.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210721143743.24626-1-xuemingl@nvidia.com>",
        "References": "<20210616040935.311733-1-xuemingl@nvidia.com>\n <20210721143743.24626-1-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": "a5849322-3e15-420b-1c65-08d94c5569aa",
        "X-MS-TrafficTypeDiagnostic": "CY4PR12MB1510:",
        "X-Microsoft-Antispam-PRVS": "\n <CY4PR12MB151016DD4AFC473A17ED8AF2A1E39@CY4PR12MB1510.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 r3Ogv6Hi3SwCxrPAZhzSb5NLtw/8QCA4o22gS2ZlCkM8DyQnown4xVE2hW3rYBhrYu9KlzSxQmrJd19u7D+3kw0oXL568iJ21HHWl8WOSobLo4+JY3HX9FY0E9C2UWQV4pNWzgoUm42aUuRMZl7Rq50C5PIbZWJ2Vby/+tXJuL4ALgMJ80yWudTHUzM6VbAEYZbLFYzkOzhB4h8pxGHJAeNomVKgn0nS9Gt0z2EbRimV4NojmYgqAYolP9z28w5+506u88NtUuwbtv2h1SodUAALCD3fV6Miff7BB6mJejKSYvG2Pa+mCRkEMvEZEGYuFKIGYe4nyuW4MpOKGZRK6ghyWhGWSrmALtoUipXVpy7eizRZKTDeKqB0l0brJxel8Vm3hnMcuMFwzwYuG+K4Gja+LpxPhCYS/3hf6LLvSaFfp/QC7opIAnSAiRi3/g5swxBXy0rh7vFYyD/lXtTyqAbRuB0jPiGij1+QfNB0FdsxqfpkFr3/TDTotLRNfEbQJGb/ovnVzI5ufpICQL2/VX7tB5AqHJgDnl7Rupp16asztwjc4dDYrw/aVCJswqFuL0Es/VlCB1GPyQsfrO9rHxTF6bd2cHev1jZCPmvMfZZuwBPW9eL8gMpzTmWkwrLic+LHMzynyEeIiWg8wQ9eocHJDvl4TNrIKI2YBEhsoOKjoR2WvesPAbQo6swC5et5Aj4yHqJ6yCcx8Za0B0Tp1g==",
        "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)(346002)(136003)(376002)(39860400002)(46966006)(36840700001)(54906003)(37006003)(316002)(4326008)(6862004)(6666004)(36906005)(70586007)(6636002)(82310400003)(36756003)(336012)(7636003)(86362001)(2616005)(2906002)(356005)(8936002)(6286002)(426003)(70206006)(8676002)(55016002)(82740400003)(47076005)(1076003)(30864003)(186003)(26005)(16526019)(36860700001)(478600001)(83380400001)(7696005)(5660300002);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "21 Jul 2021 14:39:57.6044 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n a5849322-3e15-420b-1c65-08d94c5569aa",
        "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 BN8NAM11FT010.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "CY4PR12MB1510",
        "Subject": "[dpdk-dev] [PATCH v4 16/16] 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>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@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      | 449 +--------------------\n drivers/common/mlx5/mlx5_common_pci.h      |  78 ----\n drivers/common/mlx5/mlx5_common_private.h  |   1 +\n drivers/common/mlx5/version.map            |   3 -\n 7 files changed, 4 insertions(+), 530 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 8fe36f7077..459cf4bcc4 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 66c83047a1..25737bfffb 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 a7db6e2c11..8b38091d87 100644\n--- a/drivers/common/mlx5/mlx5_common_pci.c\n+++ b/drivers/common/mlx5/mlx5_common_pci.c\n@@ -8,447 +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-\t{ .name = \"crypto\", .driver_class = MLX5_CLASS_CRYPTO },\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_CRYPTO,\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_CRYPTO,\n-\tMLX5_CLASS_ETH | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS,\n-\tMLX5_CLASS_VDPA | MLX5_CLASS_CRYPTO,\n-\tMLX5_CLASS_REGEX | MLX5_CLASS_CRYPTO,\n-\tMLX5_CLASS_COMPRESS | MLX5_CLASS_CRYPTO,\n-\tMLX5_CLASS_VDPA | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS,\n-\tMLX5_CLASS_ETH | MLX5_CLASS_REGEX | MLX5_CLASS_CRYPTO,\n-\tMLX5_CLASS_VDPA | MLX5_CLASS_REGEX | MLX5_CLASS_CRYPTO,\n-\tMLX5_CLASS_ETH | MLX5_CLASS_COMPRESS | MLX5_CLASS_CRYPTO,\n-\tMLX5_CLASS_VDPA | MLX5_CLASS_COMPRESS | MLX5_CLASS_CRYPTO,\n-\tMLX5_CLASS_ETH | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS |\n-\tMLX5_CLASS_CRYPTO,\n-\tMLX5_CLASS_VDPA | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS |\n-\tMLX5_CLASS_CRYPTO,\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@@ -525,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@@ -533,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 cb8d2f5f87..0000000000\n--- a/drivers/common/mlx5/mlx5_common_pci.h\n+++ /dev/null\n@@ -1,78 +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,compress\n- * and crypto devices. This layer enables creating such multiple class of\n- * devices on a single PCI device by allowing to bind multiple class specific\n- * device driver to attach to mlx5_pci driver.\n- *\n- * --------    --------    ---------    ------------    ----------\n- * | mlx5 |    | mlx5 |    | mlx5  |    |   mlx5   |    |  mlx5  |\n- * | net  |    | vdpa |    | regex |    | compress |    | crypto |\n- * | pmd  |    | pmd  |    |  pmd  |    |   pmd    |    |  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": [
        "v4",
        "16/16"
    ]
}