From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0E31DA0350; Sun, 21 Jun 2020 21:13:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DA3511C1B3; Sun, 21 Jun 2020 21:12:32 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2054.outbound.protection.outlook.com [40.107.22.54]) by dpdk.org (Postfix) with ESMTP id B9F651C118 for ; Sun, 21 Jun 2020 21:12:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CLR0HpBE5d/DZO5oYwIcs1Kj4O2QsUOe8W11v+rekxZ+sudtjsfpbbClT1vWIxuSzIOarA6vhSd8FMGvvva090MterycUlgowq4Ym1zfZNwgdM+k97BxMqygC9IH0mzX2FYXJCt3ynBzFIFQ5n1x9gfD+/KPullaOvMFRDd8/N8uT9XFKmDTrup/Qe3r6DsRUgeN8EeSi+oMRQHnEFE31kEWAj85hoJuJxb/ARkP7QE3ZW8iDwxpgMcdEOUqyZ9y9Vnm6elPSLsy2cKqmPNNVoiKo3unUBa72LI4kPS5PSAmAZumF066lcTI8iYdt3QOHm3spRWbuj7DfWYNJfkQTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fJEpCf1lltKZO6/jYT4tHAXly7fDL0l4fNdmCKBwH5c=; b=gGmr108iNP+04m/l9d0pc4t8KkXG2vAFYHXdVk+dQnfUSwwMF0TFBZcQKoueUinBCCb7/wxKdE0/vP3A78edzjdBKDK96yb5ZYbmD9S3mz0VgEoufyTvG1vVlgg914U1b2YwvwQIRWV3GXM/B+1eZbDwDQmV6hgVEehWxKHVIBVBiGra2PaekVTLFfMlzlEQ5E7gRoF17jrYio38AdgqplK+BzO8oPZt/lkJH7IDGSCg6zhyZyq8HS8+5Ba7N2JL5g3T59lR3JtZYEvzB4xhG8ZUd+I8aIHmjl86+0whrayP5xi1h86K2gehub3TK0AU0hQ8jOR9PolLq92Wi3MmMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fJEpCf1lltKZO6/jYT4tHAXly7fDL0l4fNdmCKBwH5c=; b=UqrPILK+IxIHPQcMs3lx1MLb8Yeln9KQtbJt+s3eulH+Ar/wU24BE0v9x/B40SxTza3WfDZV3r266da1U5wKESQnBR0kNVwKVN3/cFn2beVJepNtrWDMvmzRD9g7nwErZ7MV7JLfAC5dSjoSwDs5/6Xs/0FLf7OcnJ9AWXdaT+U= Authentication-Results: u256.net; dkim=none (message not signed) header.d=none;u256.net; dmarc=none action=none header.from=mellanox.com; Received: from AM0PR05MB4866.eurprd05.prod.outlook.com (2603:10a6:208:c0::32) by AM0PR05MB6307.eurprd05.prod.outlook.com (2603:10a6:208:145::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.21; Sun, 21 Jun 2020 19:12:27 +0000 Received: from AM0PR05MB4866.eurprd05.prod.outlook.com ([fe80::d44d:a804:c730:d2b7]) by AM0PR05MB4866.eurprd05.prod.outlook.com ([fe80::d44d:a804:c730:d2b7%2]) with mapi id 15.20.3109.026; Sun, 21 Jun 2020 19:12:27 +0000 From: Parav Pandit To: grive@u256.net, ferruh.yigit@intel.com, thomas@monjalon.net, dev@dpdk.org Cc: orika@mellanox.com, matan@mellanox.com, Parav Pandit Date: Sun, 21 Jun 2020 19:11:59 +0000 Message-Id: <20200621191200.28120-6-parav@mellanox.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200621191200.28120-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200621191200.28120-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: DM6PR02CA0105.namprd02.prod.outlook.com (2603:10b6:5:1f4::46) To AM0PR05MB4866.eurprd05.prod.outlook.com (2603:10a6:208:c0::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sw-mtx-036.mtx.labs.mlnx (208.176.44.194) by DM6PR02CA0105.namprd02.prod.outlook.com (2603:10b6:5:1f4::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Sun, 21 Jun 2020 19:12:25 +0000 X-Mailer: git-send-email 2.25.4 X-Originating-IP: [208.176.44.194] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 93e8d361-cea2-42b2-fce0-08d816170916 X-MS-TrafficTypeDiagnostic: AM0PR05MB6307: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:655; X-Forefront-PRVS: 04410E544A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JOqdNBOSevEM2WQMCkiB3GrxpAUcra/q6ivOQW78qT1OIvRuFOKW8Sugkwceh4/mqtMUCb6VVJT/+66nfTwOVBfhdhWtCDtftr1w1HA+/0YWOcMAxQZ5o9tueBAvMbZeP5bDV5uwhKh4fxMcOPCdaBtEZ1wo7IZiWFowIEIHLqtfJ9fk6RscLcR9VKuHkUnEx2/Uwljro88IKUqok+mI2ibVQJP7EENWGxjsvPMi6IcDwrBNn/EdP5rdzakK5Iqvd5/UzpadjlPgkv1J3LSH9KOS3Nc+8UlfASYhCITKo0uQNdIrGwfxwL64+5cRjgwq X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB4866.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(366004)(39860400002)(396003)(346002)(136003)(36756003)(66556008)(66476007)(6506007)(4326008)(5660300002)(6486002)(66946007)(26005)(186003)(107886003)(16526019)(316002)(86362001)(6512007)(1076003)(478600001)(2616005)(6666004)(8676002)(83380400001)(956004)(52116002)(2906002)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 8CKamGfxgWEjQOcXSdbfs7MbgPFZsSqi1+HrKqnSj8hp+TDay5zg1ZOtfoGyJcGpBKu8p0c4DCmlKXQzupHHq27ycT+AOgnRuCYag1388LSznD3FNz03t8ElbgQ1iAhzUApftJn8FrrwK7MiCpQtBPXDXnHh5LvECGGA1u1J6BCrlxrWWIBgp3AJPAGYUl+Gp6zr88Zjbtt9p9KFO/lFjkIxS7GUlvZ2wNtH+d5gAbAYFZTwXTTxlhrZpc8uAK1GxlkkIqHiFpuyh70O8LRu5tJwtmIp9T13w160FpnlYuBpDl3Amt1ykr0o6bMaWMgNEOo8XUZ1pofYklcELji7br/Nkh2QytsRHpQFwTSYeB+dvIKU8wukIRRLuRHcH8I2pDJzY4ktmogFoxPVdzMPDFGbvqdXks3LyTdzI9+uYQpUa7y11IoZ9j4cgJeHrGcyikN1LKamsuPIFl6WQ3xw2xcEkQqyYgjAqEshtSxqaLBravS+2KJ7dM6kv5CaqvNQ X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93e8d361-cea2-42b2-fce0-08d816170916 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2020 19:12:26.9083 (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: rQU+Zh2x9VJg3kLAEVjfMAmk+BzyLuvG3Kx/lZtji8Je/MDfB0XQBjO3aLNoc6RId0vqNUsNT9q0PMCme7Xo8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6307 Subject: [dpdk-dev] [PATCH v2 5/6] bus/mlx5_pci: enable net and vDPA to use mlx5 PCI bus driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Enable class driver to match with the mlx5 pci devices. Migrate mlx5 net PMD and vdpa PMD to start using mlx5 common class driver. Signed-off-by: Parav Pandit --- Changelog: v1->v2: - Migreate API from rte_driver to rte_pci_driver --- drivers/bus/Makefile | 3 ++ drivers/bus/mlx5_pci/mlx5_pci_bus.c | 60 +++++++++++++++++++++++++++++ drivers/net/mlx5/Makefile | 3 +- drivers/net/mlx5/linux/mlx5_os.c | 1 - drivers/net/mlx5/linux/mlx5_os.h | 1 + drivers/net/mlx5/meson.build | 2 +- drivers/net/mlx5/mlx5.c | 24 +++++++----- drivers/net/mlx5/mlx5.h | 1 - drivers/vdpa/mlx5/Makefile | 3 +- drivers/vdpa/mlx5/meson.build | 2 +- drivers/vdpa/mlx5/mlx5_vdpa.c | 23 ++++++----- mk/rte.app.mk | 1 + 12 files changed, 98 insertions(+), 26 deletions(-) diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile index cea3b55e6..3840ac51c 100644 --- a/drivers/bus/Makefile +++ b/drivers/bus/Makefile @@ -8,6 +8,9 @@ ifeq ($(CONFIG_RTE_EAL_VFIO),y) DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc endif DIRS-$(CONFIG_RTE_LIBRTE_IFPGA_BUS) += ifpga +ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)),y) +DIRS-y += mlx5_pci +endif DIRS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += pci DIRS-$(CONFIG_RTE_LIBRTE_VDEV_BUS) += vdev DIRS-$(CONFIG_RTE_LIBRTE_VMBUS) += vmbus diff --git a/drivers/bus/mlx5_pci/mlx5_pci_bus.c b/drivers/bus/mlx5_pci/mlx5_pci_bus.c index e8f1649a3..6844c1961 100644 --- a/drivers/bus/mlx5_pci/mlx5_pci_bus.c +++ b/drivers/bus/mlx5_pci/mlx5_pci_bus.c @@ -282,6 +282,66 @@ mlx5_bus_pci_dma_unmap(struct rte_pci_device *dev, void *addr, } static const struct rte_pci_id mlx5_bus_pci_id_map[] = { + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX4) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX4VF) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX4LX) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX4LXVF) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX5) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX5VF) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX5EX) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX5EXVF) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX5BF) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX5BFVF) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX6) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX6VF) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX6DX) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX6DXVF) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX6DXBF) + }, { .vendor_id = 0 } diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index a458402dc..1cea7cd07 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -45,16 +45,17 @@ CFLAGS += -I$(RTE_SDK)/drivers/common/mlx5/linux CFLAGS += -I$(RTE_SDK)/drivers/net/mlx5 CFLAGS += -I$(RTE_SDK)/drivers/net/mlx5/linux CFLAGS += -I$(BUILDDIR)/drivers/common/mlx5 +CFLAGS += -I$(RTE_SDK)/drivers/bus/mlx5_pci CFLAGS += -D_BSD_SOURCE CFLAGS += -D_DEFAULT_SOURCE CFLAGS += -D_XOPEN_SOURCE=600 CFLAGS += $(WERROR_FLAGS) CFLAGS += -Wno-strict-prototypes LDLIBS += -lrte_common_mlx5 +LDLIBS += -lrte_bus_mlx5_pci LDLIBS += -lm LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -LDLIBS += -lrte_bus_pci # A few warnings cannot be avoided in external headers. CFLAGS += -Wno-error=cast-qual diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 3792371c3..60f42c5d1 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -1394,7 +1394,6 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, strerror(rte_errno)); return -rte_errno; } - MLX5_ASSERT(pci_drv == &mlx5_driver); errno = 0; ibv_list = mlx5_glue->get_device_list(&ret); if (!ibv_list) { diff --git a/drivers/net/mlx5/linux/mlx5_os.h b/drivers/net/mlx5/linux/mlx5_os.h index f310f1773..3479c6428 100644 --- a/drivers/net/mlx5/linux/mlx5_os.h +++ b/drivers/net/mlx5/linux/mlx5_os.h @@ -15,4 +15,5 @@ enum { #define PCI_DRV_FLAGS (RTE_PCI_DRV_INTR_LSC | \ RTE_PCI_DRV_INTR_RMV | \ RTE_PCI_DRV_PROBE_AGAIN) + #endif /* RTE_PMD_MLX5_OS_H_ */ diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build index e95ce0267..26699a79b 100644 --- a/drivers/net/mlx5/meson.build +++ b/drivers/net/mlx5/meson.build @@ -8,7 +8,7 @@ if not (is_linux or is_windows) subdir_done() endif -deps += ['hash', 'common_mlx5'] +deps += ['hash', 'common_mlx5', 'bus_mlx5_pci'] sources = files( 'mlx5.c', 'mlx5_ethdev.c', diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 5c86f6fb9..22eaa64d3 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -1987,16 +1988,19 @@ static const struct rte_pci_id mlx5_pci_id_map[] = { } }; -struct rte_pci_driver mlx5_driver = { - .driver = { - .name = MLX5_DRIVER_NAME +static struct rte_mlx5_pci_driver mlx5_driver = { + .dev_class = MLX5_CLASS_NET, + .pci_driver = { + .driver = { + .name = MLX5_DRIVER_NAME, + }, + .id_table = mlx5_pci_id_map, + .probe = mlx5_os_pci_probe, + .remove = mlx5_pci_remove, + .dma_map = mlx5_dma_map, + .dma_unmap = mlx5_dma_unmap, + .drv_flags = PCI_DRV_FLAGS, }, - .id_table = mlx5_pci_id_map, - .probe = mlx5_os_pci_probe, - .remove = mlx5_pci_remove, - .dma_map = mlx5_dma_map, - .dma_unmap = mlx5_dma_unmap, - .drv_flags = PCI_DRV_FLAGS, }; /** @@ -2014,7 +2018,7 @@ RTE_INIT(rte_mlx5_pmd_init) mlx5_set_cksum_table(); mlx5_set_swp_types_table(); if (mlx5_glue) - rte_pci_register(&mlx5_driver); + rte_mlx5_pci_driver_register(&mlx5_driver); } RTE_PMD_EXPORT_NAME(net_mlx5, __COUNTER__); diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 5bd5acd9d..300b15a7d 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -129,7 +129,6 @@ struct mlx5_local_data { }; extern struct mlx5_shared_data *mlx5_shared_data; -extern struct rte_pci_driver mlx5_driver; /* Dev ops structs */ extern const struct eth_dev_ops mlx5_os_dev_ops; diff --git a/drivers/vdpa/mlx5/Makefile b/drivers/vdpa/mlx5/Makefile index 91c89d604..a2231f021 100644 --- a/drivers/vdpa/mlx5/Makefile +++ b/drivers/vdpa/mlx5/Makefile @@ -24,13 +24,14 @@ CFLAGS += -I$(RTE_SDK)/drivers/common/mlx5/linux CFLAGS += -I$(RTE_SDK)/drivers/net/mlx5_vdpa CFLAGS += -I$(RTE_SDK)/lib/librte_sched CFLAGS += -I$(BUILDDIR)/drivers/common/mlx5 +CFLAGS += -I$(RTE_SDK)/drivers/bus/mlx5_pci CFLAGS += -D_BSD_SOURCE CFLAGS += -D_DEFAULT_SOURCE CFLAGS += -D_XOPEN_SOURCE=600 CFLAGS += $(WERROR_FLAGS) CFLAGS += -Wno-strict-prototypes LDLIBS += -lrte_common_mlx5 -LDLIBS += -lrte_eal -lrte_vhost -lrte_kvargs -lrte_pci -lrte_bus_pci -lrte_sched +LDLIBS += -lrte_eal -lrte_vhost -lrte_kvargs -lrte_pci -lrte_bus_mlx5_pci -lrte_sched # A few warnings cannot be avoided in external headers. CFLAGS += -Wno-error=cast-qual diff --git a/drivers/vdpa/mlx5/meson.build b/drivers/vdpa/mlx5/meson.build index 2963aad71..f4175c34e 100644 --- a/drivers/vdpa/mlx5/meson.build +++ b/drivers/vdpa/mlx5/meson.build @@ -8,7 +8,7 @@ if not is_linux endif fmt_name = 'mlx5_vdpa' -deps += ['hash', 'common_mlx5', 'vhost', 'pci', 'bus_pci', 'eal', 'sched'] +deps += ['hash', 'common_mlx5', 'vhost', 'pci', 'bus_mlx5_pci', 'eal', 'sched'] sources = files( 'mlx5_vdpa.c', 'mlx5_vdpa_mem.c', diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c index 1113d6cef..b223da7f2 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include @@ -428,7 +428,7 @@ mlx5_vdpa_roce_disable(struct rte_pci_addr *addr, struct ibv_device **ibv) } /** - * DPDK callback to register a PCI device. + * DPDK callback to register a mlx5 PCI bus device. * * This function spawns vdpa device out of a given PCI device. * @@ -598,14 +598,17 @@ static const struct rte_pci_id mlx5_vdpa_pci_id_map[] = { } }; -static struct rte_pci_driver mlx5_vdpa_driver = { - .driver = { - .name = "mlx5_vdpa", +static struct rte_mlx5_pci_driver mlx5_vdpa_driver = { + .dev_class = MLX5_CLASS_VDPA, + .pci_driver = { + .driver = { + .name = "mlx5_vdpa", + }, + .id_table = mlx5_vdpa_pci_id_map, + .probe = mlx5_vdpa_pci_probe, + .remove = mlx5_vdpa_pci_remove, + .drv_flags = 0, }, - .id_table = mlx5_vdpa_pci_id_map, - .probe = mlx5_vdpa_pci_probe, - .remove = mlx5_vdpa_pci_remove, - .drv_flags = 0, }; /** @@ -618,7 +621,7 @@ RTE_INIT(rte_mlx5_vdpa_init) if (mlx5_vdpa_logtype >= 0) rte_log_set_level(mlx5_vdpa_logtype, RTE_LOG_NOTICE); if (mlx5_glue) - rte_pci_register(&mlx5_vdpa_driver); + rte_mlx5_pci_driver_register(&mlx5_vdpa_driver); } RTE_PMD_EXPORT_NAME(net_mlx5_vdpa, __COUNTER__); diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 0ce8cf541..d7c1d90e4 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -203,6 +203,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_MEMIF) += -lrte_pmd_memif _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -lrte_pmd_mlx4 ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)),y) _LDLIBS-y += -lrte_common_mlx5 +_LDLIBS-y += -lrte_bus_mlx5_pci endif _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += -lrte_pmd_mlx5 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD) += -lrte_pmd_mlx5_vdpa -- 2.25.4