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
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) {
#include <mlx5_common.h>
#include <mlx5_common_os.h>
#include <mlx5_common_mp.h>
+#include <mlx5_common_pci.h>
#include <mlx5_malloc.h>
#include "mlx5_defs.h"
}
};
-struct rte_pci_driver mlx5_driver = {
- .driver = {
- .name = MLX5_DRIVER_NAME
+static struct mlx5_pci_driver mlx5_driver = {
+ .driver_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,
};
/* Initialize driver log type. */
mlx5_set_cksum_table();
mlx5_set_swp_types_table();
if (mlx5_glue)
- rte_pci_register(&mlx5_driver);
+ mlx5_pci_driver_register(&mlx5_driver);
}
RTE_PMD_EXPORT_NAME(net_mlx5, __COUNTER__);
};
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;
endif
fmt_name = 'mlx5_regex'
-deps += ['common_mlx5', 'bus_pci', 'eal', 'regexdev']
+deps += ['common_mlx5', 'eal', 'regexdev']
sources = files(
'mlx5_regex.c',
'mlx5_rxp.c',
#include <rte_malloc.h>
#include <rte_log.h>
#include <rte_errno.h>
-#include <rte_bus_pci.h>
#include <rte_pci.h>
#include <rte_regexdev.h>
#include <rte_regexdev_core.h>
#include <rte_regexdev_driver.h>
+#include <mlx5_common_pci.h>
#include <mlx5_glue.h>
#include <mlx5_devx_cmds.h>
#include <mlx5_prm.h>
}
};
-static struct rte_pci_driver mlx5_regex_driver = {
- .driver = {
- .name = "mlx5_regex",
+static struct mlx5_pci_driver mlx5_regex_driver = {
+ .driver_class = MLX5_CLASS_REGEX,
+ .pci_driver = {
+ .driver = {
+ .name = "mlx5_regex",
+ },
+ .id_table = mlx5_regex_pci_id_map,
+ .probe = mlx5_regex_pci_probe,
+ .remove = mlx5_regex_pci_remove,
+ .drv_flags = 0,
},
- .id_table = mlx5_regex_pci_id_map,
- .probe = mlx5_regex_pci_probe,
- .remove = mlx5_regex_pci_remove,
- .drv_flags = 0,
};
RTE_INIT(rte_mlx5_regex_init)
{
mlx5_common_init();
if (mlx5_glue)
- rte_pci_register(&mlx5_regex_driver);
+ mlx5_pci_driver_register(&mlx5_regex_driver);
}
RTE_LOG_REGISTER(mlx5_regex_logtype, pmd.regex.mlx5, NOTICE)
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_sched
LDLIBS += -pthread
# A few warnings cannot be avoided in external headers.
endif
fmt_name = 'mlx5_vdpa'
-deps += ['hash', 'common_mlx5', 'vhost', 'pci', 'bus_pci', 'eal', 'sched']
+deps += ['hash', 'common_mlx5', 'vhost', 'pci', 'eal', 'sched']
sources = files(
'mlx5_vdpa.c',
'mlx5_vdpa_mem.c',
#include <rte_malloc.h>
#include <rte_log.h>
#include <rte_errno.h>
-#include <rte_bus_pci.h>
#include <rte_pci.h>
#include <rte_string_fns.h>
#include <mlx5_glue.h>
#include <mlx5_common.h>
+#include <mlx5_common_pci.h>
#include <mlx5_devx_cmds.h>
#include <mlx5_prm.h>
#include <mlx5_nl.h>
}
/**
- * DPDK callback to register a PCI device.
+ * DPDK callback to register a mlx5 PCI device.
*
* This function spawns vdpa device out of a given PCI device.
*
}
};
-static struct rte_pci_driver mlx5_vdpa_driver = {
- .driver = {
- .name = "mlx5_vdpa",
+static struct mlx5_pci_driver mlx5_vdpa_driver = {
+ .driver_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,
};
RTE_LOG_REGISTER(mlx5_vdpa_logtype, pmd.vdpa.mlx5, NOTICE)
{
mlx5_common_init();
if (mlx5_glue)
- rte_pci_register(&mlx5_vdpa_driver);
+ mlx5_pci_driver_register(&mlx5_vdpa_driver);
}
RTE_PMD_EXPORT_NAME(net_mlx5_vdpa, __COUNTER__);