Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/74173/?format=api
http://patches.dpdk.org/api/patches/74173/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200716072938.812733-7-parav@mellanox.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": "<20200716072938.812733-7-parav@mellanox.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200716072938.812733-7-parav@mellanox.com", "date": "2020-07-16T07:29:35", "name": "[v6,6/9] bus/mlx5_pci: add mlx5 PCI bus", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "ca07d850bf2de26bf87874bbf31d77bcf8c8aabc", "submitter": { "id": 1780, "url": "http://patches.dpdk.org/api/people/1780/?format=api", "name": "Parav Pandit", "email": "parav@mellanox.com" }, "delegate": { "id": 3268, "url": "http://patches.dpdk.org/api/users/3268/?format=api", "username": "rasland", "first_name": "Raslan", "last_name": "Darawsheh", "email": "rasland@nvidia.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200716072938.812733-7-parav@mellanox.com/mbox/", "series": [ { "id": 11075, "url": "http://patches.dpdk.org/api/series/11075/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11075", "date": "2020-07-16T07:29:29", "name": "Improve mlx5 PMD driver framework for multiple classes", "version": 6, "mbox": "http://patches.dpdk.org/series/11075/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/74173/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/74173/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 4D2C3A0546;\n\tThu, 16 Jul 2020 09:31:04 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1D6631BF70;\n\tThu, 16 Jul 2020 09:30:15 +0200 (CEST)", "from EUR04-DB3-obe.outbound.protection.outlook.com\n (mail-eopbgr60070.outbound.protection.outlook.com [40.107.6.70])\n by dpdk.org (Postfix) with ESMTP id 24D721BF46\n for <dev@dpdk.org>; Thu, 16 Jul 2020 09:30:13 +0200 (CEST)", "from AM0PR05MB4866.eurprd05.prod.outlook.com (2603:10a6:208:c0::32)\n by AM0PR05MB5329.eurprd05.prod.outlook.com (2603:10a6:208:ed::23)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.23; Thu, 16 Jul\n 2020 07:30:11 +0000", "from AM0PR05MB4866.eurprd05.prod.outlook.com\n ([fe80::d44d:a804:c730:d2b7]) by AM0PR05MB4866.eurprd05.prod.outlook.com\n ([fe80::d44d:a804:c730:d2b7%2]) with mapi id 15.20.3174.026; Thu, 16 Jul 2020\n 07:30:11 +0000", "from sw-mtx-036.mtx.labs.mlnx (208.176.44.194) by\n SN6PR16CA0057.namprd16.prod.outlook.com (2603:10b6:805:ca::34) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.3195.18 via Frontend Transport; Thu, 16 Jul 2020 07:30:09 +0000" ], "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=KS+0RGIu8+CseJ0mEwdbLjD8GmvPakVe+SalxLYeD64kuHK2S3fyarh9K2Zgxd6J4y2w0vng9sRmQXSU8oJqiWpAbf4OLPlWwTcaXLOxsjagvKu053Oactx34hSnv3ipg5EYhZ5IpfGziHy/e2jJu7zkY0rRxrHaXkTtResCRKDvV3KQhd81ToTsEoQNThAzQkVyzadmYtfU+BytbGmF3xLPL4F+3lzQv8gag87iKx0ACp6Mt7DoudzGIr5To/k0gbwgYu0K13j/UGz2T0Q+h+suSD8xD0Wwr7JOsc9HV1mVh7s82SLcbCYn3UocCNQD4duFBngE8eKsxIWdfv0jIg==", "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=3yiQljzA4NxcJY/AjpQWRaqpDlUV1dDKlspCx0+4xR4=;\n b=N4RXt2kuHSG4tLUsukmhioHVE65eW/PgSW0VVmHR7SNETJQ9gbcr/+hsJV6b268j9MOLpaPAcOe6gWFdl9Oey9DJKzen8N1MVBnPUnqH/3RKOvKdb8V3h6a0wkRCre9C1wg6rh5WEVLnKtyVdSl7zx6zhAgSTPCrz2FRuHpJWdCpPw2+ekcay5HIZRnCxCwTL7zNAsSRn0IN4BiMnBU5sbTiRZz7GLByuFxW19e49ujxJfXSwzYRnbRGpcaFXx+iA9/UJnU1xJ0GY68UM6riIzE6uLhGT9KAh3jn//0h/GMWzQzh+TpF6wk3E43oDzLOKR1AmxHdnP++QEay3y+5zw==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com;\n dkim=pass header.d=mellanox.com; arc=none", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com;\n s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=3yiQljzA4NxcJY/AjpQWRaqpDlUV1dDKlspCx0+4xR4=;\n b=EOvFey3N5I44Q4cTyIgOvywB/yl/KsgMWKH6v3dWBx63BGpFKHREBIc68fPPJzXR2goLvgxtS/dyjmesOMlztGI595fzvdCFpthY08LwYICRUqOj14cZQ03xmKLe0NiZYu8JtaEDZrL4WaVPJr5OpLx1TtrGyleghvvzqQe+rsY=", "Authentication-Results": "dpdk.org; dkim=none (message not signed)\n header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com;", "From": "Parav Pandit <parav@mellanox.com>", "To": "dev@dpdk.org, grive@u256.net, ferruh.yigit@intel.com, thomas@monjalon.net", "Cc": "rasland@mellanox.com, orika@mellanox.com, matan@mellanox.com,\n joyce.kong@arm.com, Parav Pandit <parav@mellanox.com>", "Date": "Thu, 16 Jul 2020 10:29:35 +0300", "Message-Id": "<20200716072938.812733-7-parav@mellanox.com>", "X-Mailer": [ "git-send-email 2.26.2", "git-send-email 2.26.2" ], "In-Reply-To": "<20200716072938.812733-1-parav@mellanox.com>", "References": "<20200610171728.89-2-parav@mellanox.com>\n <20200716072938.812733-1-parav@mellanox.com>", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-ClientProxiedBy": "SN6PR16CA0057.namprd16.prod.outlook.com\n (2603:10b6:805:ca::34) To AM0PR05MB4866.eurprd05.prod.outlook.com\n (2603:10a6:208:c0::32)", "MIME-Version": "1.0", "X-MS-Exchange-MessageSentRepresentingType": "1", "X-Originating-IP": "[208.176.44.194]", "X-MS-PublicTrafficType": "Email", "X-MS-Office365-Filtering-HT": "Tenant", "X-MS-Office365-Filtering-Correlation-Id": "48a45cf8-a1b2-4eae-f263-08d8295a12bf", "X-MS-TrafficTypeDiagnostic": "AM0PR05MB5329:", "X-LD-Processed": "a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd,ExtAddr", "X-MS-Exchange-Transport-Forked": "True", "X-Microsoft-Antispam-PRVS": "\n <AM0PR05MB53296735EB284EC39F78A271D17F0@AM0PR05MB5329.eurprd05.prod.outlook.com>", "X-MS-Oob-TLC-OOBClassifiers": "OLM:7219;", "X-MS-Exchange-SenderADCheck": "1", "X-Microsoft-Antispam": "BCL:0;", "X-Microsoft-Antispam-Message-Info": "\n G100yDJdVq1QSz63Q+48dFzieAboeKURGW12mmha0BbembPoZYjsPaYtGBhTbbbBJJtZGduWlUkS8imFXAkVEI1hcaIITn2cNtwOoigj2GIxA9cBCkq/hHutSkOpinsS7v+1YyePwWD7OPbk259BYTpSNaRUGBsfDMz6UNDjWuapRh62LCPlG45WpxvH654WnV/6FmwAb2IPiqnAKkXV+ZjW+ZZYiOsZOg+GhvbxjmDBjCqj0jXUa9XQiNeKgvrK/tyBtuLPJGIW+khnPn63KXepJ+vA097U0VbYLkXFeGk3NeiVWs7tfD7Kmjg0XP2cgWfo+IjWswiA0v9lkPANvA==", "X-Forefront-Antispam-Report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:AM0PR05MB4866.eurprd05.prod.outlook.com; PTR:; CAT:NONE;\n SFTY:;\n SFS:(4636009)(376002)(366004)(346002)(136003)(396003)(39860400002)(6506007)(6666004)(16526019)(186003)(66946007)(107886003)(66556008)(26005)(8936002)(86362001)(6512007)(6486002)(52116002)(83380400001)(66476007)(5660300002)(2616005)(956004)(36756003)(8676002)(478600001)(316002)(1076003)(2906002)(4326008);\n DIR:OUT; SFP:1101;", "X-MS-Exchange-AntiSpam-MessageData": "\n ZVTa8iH5rZzoS8KIyRrtv9xoKIO3dtq4/f7BSgyWT5jnFPu6gngJXaRIatv2rS+dE+QOm0Ap52b664G6uLaA0fc8MkX4GviHwyUxF4KMdrlwP6ciMk0jC71cSKlxSHm2a1+1pIWYbYZbDgYTfd7ltQn4neF2rbdHvVJ6A6Oc/DEDpYHmmJf1xOiv7VjWC6lQ3efYtq7pFfkmfV15XKLS/66ZhoZ6CLTBDrcheovjvm0LV15CCkaZ4s0GlF4cg3FW0W/tq0+7NRN7YIo48BZzQD0u7JEk2TDY9us1cxLf51kPA0p8LYw4kNwnZvETl2NZimE8JeL0Uk4Z4vpR7Y7qO/PVwcf7t7EZq4uJ5pkkgcWmIzCVhN4iMWmUH4jJz8PwIcKF0Omj8hVM4juTtjJTYfpxZsyhbcAg20uLc7XUOLtDgs9VCF5u+RfaZLSkaqpN3gaKvjaxVe9LlLrd0y8/TYjWEzijT/J+fTPYzXMtonqNOqA88gE9GNGvZvuEwE8h", "X-OriginatorOrg": "Mellanox.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 48a45cf8-a1b2-4eae-f263-08d8295a12bf", "X-MS-Exchange-CrossTenant-AuthSource": "AM0PR05MB4866.eurprd05.prod.outlook.com", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "16 Jul 2020 07:30:11.5617 (UTC)", "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted", "X-MS-Exchange-CrossTenant-Id": "a652971c-7d2e-4d9b-a6a4-d149256f461b", "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED", "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n pFkWEqpJ92Y6eoejvQKdA/q79JjHdDvQq4cvM58nMVz5uc+tm/80FrUkWqlRu4b0dBZgk+Q66BxI6xDLKtJe0Q==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "AM0PR05MB5329", "Subject": "[dpdk-dev] [PATCH v6 6/9] bus/mlx5_pci: add mlx5 PCI bus", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "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": "Add mlx5 PCI bus which enables multiple mlx5 drivers to bind to single\npci device.\n\nSigned-off-by: Parav Pandit <parav@mellanox.com>\nAcked-by: Matan Azrad <matan@mellanox.com>\n---\nChangelog:\nv5->v6:\n - Updated Makefile for parallel shared build support\nv4->v5:\n - Merged maintainers update patch with this patch\nv2->v3:\n - Addressed comments from Thomas and Asaf\n - Moved pci_driver structure instance as first in driver\n - Removed white spaces at the end of line in diagram\n - Address comments from Matan\n - Removed CONFIG_RTE_LIBRTE_MLX5_PCI_BUS from config files\n - Changed alignedment to mlx5 specific aligment instead of standard\n DPDK\n - Using uint32_t instead of mlx5_class enum\nv1->v2:\n - Address comments from Thomas and Gaetan\n - Inheriting ret_pci_driver instead of rte_driver\n - Added design and description of the mlx5_pci bus\n---\n MAINTAINERS | 5 ++\n drivers/bus/Makefile | 4 +\n drivers/bus/meson.build | 2 +-\n drivers/bus/mlx5_pci/Makefile | 39 +++++++++\n drivers/bus/mlx5_pci/meson.build | 19 +++++\n drivers/bus/mlx5_pci/mlx5_pci_bus.c | 14 ++++\n drivers/bus/mlx5_pci/rte_bus_mlx5_pci.h | 84 +++++++++++++++++++\n .../bus/mlx5_pci/rte_bus_mlx5_pci_version.map | 5 ++\n 8 files changed, 171 insertions(+), 1 deletion(-)\n create mode 100644 drivers/bus/mlx5_pci/Makefile\n create mode 100644 drivers/bus/mlx5_pci/meson.build\n create mode 100644 drivers/bus/mlx5_pci/mlx5_pci_bus.c\n create mode 100644 drivers/bus/mlx5_pci/rte_bus_mlx5_pci.h\n create mode 100644 drivers/bus/mlx5_pci/rte_bus_mlx5_pci_version.map", "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 3cd402b34..9e3bd1672 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -525,6 +525,11 @@ Intel FPGA bus\n M: Rosen Xu <rosen.xu@intel.com>\n F: drivers/bus/ifpga/\n \n+Melllanox mlx5 PCI bus driver\n+M: Parav Pandit <parav@mellaox.com>\n+M: Matan Azrad <matan@mellanox.com>\n+F: drivers/bus/mlx5_pci\n+\n NXP buses\n M: Hemant Agrawal <hemant.agrawal@nxp.com>\n M: Sachin Saxena <sachin.saxena@nxp.com>\ndiff --git a/drivers/bus/Makefile b/drivers/bus/Makefile\nindex cea3b55e6..a70f213c1 100644\n--- a/drivers/bus/Makefile\n+++ b/drivers/bus/Makefile\n@@ -9,6 +9,10 @@ DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc\n endif\n DIRS-$(CONFIG_RTE_LIBRTE_IFPGA_BUS) += ifpga\n DIRS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += pci\n+ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)),y)\n+DEPDIRS-mlx5_pci := pci\n+DIRS-y += mlx5_pci\n+endif\n DIRS-$(CONFIG_RTE_LIBRTE_VDEV_BUS) += vdev\n DIRS-$(CONFIG_RTE_LIBRTE_VMBUS) += vmbus\n \ndiff --git a/drivers/bus/meson.build b/drivers/bus/meson.build\nindex 80de2d91d..b1381838d 100644\n--- a/drivers/bus/meson.build\n+++ b/drivers/bus/meson.build\n@@ -1,7 +1,7 @@\n # SPDX-License-Identifier: BSD-3-Clause\n # Copyright(c) 2017 Intel Corporation\n \n-drivers = ['dpaa', 'fslmc', 'ifpga', 'pci', 'vdev', 'vmbus']\n+drivers = ['dpaa', 'fslmc', 'ifpga', 'pci', 'mlx5_pci', 'vdev', 'vmbus']\n std_deps = ['eal']\n config_flag_fmt = 'RTE_LIBRTE_@0@_BUS'\n driver_name_fmt = 'rte_bus_@0@'\ndiff --git a/drivers/bus/mlx5_pci/Makefile b/drivers/bus/mlx5_pci/Makefile\nnew file mode 100644\nindex 000000000..dd24811a3\n--- /dev/null\n+++ b/drivers/bus/mlx5_pci/Makefile\n@@ -0,0 +1,39 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright 2020 Mellanox Technologies, Ltd\n+\n+include $(RTE_SDK)/mk/rte.vars.mk\n+\n+#\n+# library name\n+#\n+LIB = librte_bus_mlx5_pci.a\n+\n+CFLAGS += -O3 -Wall -Wextra\n+CFLAGS += $(WERROR_FLAGS)\n+CFLAGS += -Wno-strict-prototypes\n+CFLAGS += -I$(RTE_SDK)/drivers/common/mlx5\n+CFLAGS += -I$(BUILDDIR)/drivers/common/mlx5\n+CFLAGS += -I$(RTE_SDK)/drivers/common/mlx5/linux\n+CFLAGS += -I$(BUILDDIR)/drivers/bus/pci\n+CFLAGS += -I$(BUILDDIR)/drivers/bus\n+LDLIBS += -lrte_eal\n+LDLIBS += -lrte_common_mlx5\n+LDLIBS += -lrte_pci -lrte_bus_pci\n+\n+# versioning export map\n+EXPORT_MAP := rte_bus_mlx5_pci_version.map\n+\n+SRCS-y += mlx5_pci_bus.c\n+\n+# DEBUG which is usually provided on the command-line may enable\n+# CONFIG_RTE_LIBRTE_MLX5_DEBUG.\n+ifeq ($(DEBUG),1)\n+CONFIG_RTE_LIBRTE_MLX5_DEBUG := y\n+endif\n+\n+#\n+# Export include files\n+#\n+SYMLINK-y-include += rte_bus_mlx5_pci.h\n+\n+include $(RTE_SDK)/mk/rte.lib.mk\ndiff --git a/drivers/bus/mlx5_pci/meson.build b/drivers/bus/mlx5_pci/meson.build\nnew file mode 100644\nindex 000000000..64a17cbad\n--- /dev/null\n+++ b/drivers/bus/mlx5_pci/meson.build\n@@ -0,0 +1,19 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2020 Mellanox Technologies Ltd\n+\n+deps += ['pci', 'bus_pci', 'common_mlx5']\n+install_headers('rte_bus_mlx5_pci.h')\n+sources = files('mlx5_pci_bus.c')\n+\n+cflags_options = [\n+\t'-std=c11',\n+\t'-Wno-strict-prototypes',\n+\t'-D_BSD_SOURCE',\n+\t'-D_DEFAULT_SOURCE',\n+\t'-D_XOPEN_SOURCE=600'\n+]\n+foreach option:cflags_options\n+\tif cc.has_argument(option)\n+\t\tcflags += option\n+\tendif\n+endforeach\ndiff --git a/drivers/bus/mlx5_pci/mlx5_pci_bus.c b/drivers/bus/mlx5_pci/mlx5_pci_bus.c\nnew file mode 100644\nindex 000000000..66db3c7b0\n--- /dev/null\n+++ b/drivers/bus/mlx5_pci/mlx5_pci_bus.c\n@@ -0,0 +1,14 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright 2020 Mellanox Technologies, Ltd\n+ */\n+\n+#include \"rte_bus_mlx5_pci.h\"\n+\n+static TAILQ_HEAD(mlx5_pci_bus_drv_head, rte_mlx5_pci_driver) drv_list =\n+\t\t\t\tTAILQ_HEAD_INITIALIZER(drv_list);\n+\n+void\n+rte_mlx5_pci_driver_register(struct rte_mlx5_pci_driver *driver)\n+{\n+\tTAILQ_INSERT_TAIL(&drv_list, driver, next);\n+}\ndiff --git a/drivers/bus/mlx5_pci/rte_bus_mlx5_pci.h b/drivers/bus/mlx5_pci/rte_bus_mlx5_pci.h\nnew file mode 100644\nindex 000000000..9f8d22e2b\n--- /dev/null\n+++ b/drivers/bus/mlx5_pci/rte_bus_mlx5_pci.h\n@@ -0,0 +1,84 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright 2020 Mellanox Technologies, Ltd\n+ */\n+\n+#ifndef _RTE_BUS_MLX5_PCI_H_\n+#define _RTE_BUS_MLX5_PCI_H_\n+\n+/**\n+ * @file\n+ *\n+ * RTE Mellanox PCI Bus Interface\n+ * Mellanox ConnectX PCI device supports multiple class (net/vdpa/regex)\n+ * devices. This bus enables creating such multiple class of devices on a\n+ * single PCI device by allowing to bind multiple class specific device\n+ * driver to attach to mlx5_pci bus driver.\n+ *\n+ * ----------- ------------ -----------------\n+ * | mlx5 | | mlx5 | | mlx5 |\n+ * | net pmd | | vdpa pmd | | new class pmd |\n+ * ----------- ------------ -----------------\n+ * \\ | /\n+ * \\ | /\n+ * \\ ------------- /\n+ * \\______| mlx5 |_____ /\n+ * | pci bus |\n+ * -------------\n+ * |\n+ * -----------\n+ * | mlx5 |\n+ * | pci dev |\n+ * -----------\n+ *\n+ * - mlx5 pci bus 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+/**\n+ * A structure describing a mlx5 pci driver.\n+ */\n+struct rte_mlx5_pci_driver {\n+\tstruct rte_pci_driver pci_driver;\t/**< Inherit core pci driver. */\n+\tuint32_t dev_class;\t/**< Class of this driver, enum mlx5_class */\n+\tTAILQ_ENTRY(rte_mlx5_pci_driver) next;\n+};\n+\n+/**\n+ * Register a mlx5_pci device driver.\n+ *\n+ * @param driver\n+ * A pointer to a rte_mlx5_pci_driver structure describing the driver\n+ * to be registered.\n+ */\n+__rte_internal\n+void\n+rte_mlx5_pci_driver_register(struct rte_mlx5_pci_driver *driver);\n+\n+#define RTE_PMD_REGISTER_MLX5_PCI(nm, drv) \\\n+\tstatic const char *mlx5_pci_drvinit_fn_ ## nm; \\\n+\tRTE_INIT(mlx5_pci_drvinit_fn_ ##drv) \\\n+\t{ \\\n+\t\t(drv).driver.name = RTE_STR(nm); \\\n+\t\trte_mlx5_pci_driver_register(&drv); \\\n+\t} \\\n+\tRTE_PMD_EXPORT_NAME(nm, __COUNTER__)\n+\n+#ifdef __cplusplus\n+}\n+#endif /* __cplusplus */\n+\n+#endif /* _RTE_BUS_MLX5_PCI_H_ */\ndiff --git a/drivers/bus/mlx5_pci/rte_bus_mlx5_pci_version.map b/drivers/bus/mlx5_pci/rte_bus_mlx5_pci_version.map\nnew file mode 100644\nindex 000000000..4cfd3db10\n--- /dev/null\n+++ b/drivers/bus/mlx5_pci/rte_bus_mlx5_pci_version.map\n@@ -0,0 +1,5 @@\n+INTERNAL {\n+\tglobal:\n+\n+\trte_mlx5_pci_driver_register;\n+};\n", "prefixes": [ "v6", "6/9" ] }{ "id": 74173, "url": "