[dpdk-dev,3/3] net/mlx5: net bus support

Message ID 0db089a5094090564baebaef102e88e13589b0c4.1496313294.git.gaetan.rivet@6wind.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Gaëtan Rivet June 1, 2017, 10:44 a.m. UTC
  Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 drivers/net/mlx5/mlx5.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
  

Patch

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index fc99c0d..4e33703 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -58,6 +58,7 @@ 
 #include <rte_ethdev.h>
 #include <rte_ethdev_pci.h>
 #include <rte_pci.h>
+#include <rte_bus_net.h>
 #include <rte_common.h>
 #include <rte_kvargs.h>
 #ifdef PEDANTIC
@@ -898,3 +899,12 @@  rte_mlx5_pmd_init(void)
 RTE_PMD_EXPORT_NAME(net_mlx5, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(net_mlx5, mlx5_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_mlx5, "* ib_uverbs & mlx5_core & mlx5_ib");
+
+static struct rte_net_driver mlx5_net_driver = {
+	RTE_BUS_NET_PCI_HEADER
+	.driver = {
+		.name = MLX5_DRIVER_NAME,
+	},
+	.kmod = "mlx5_core",
+};
+RTE_PMD_REGISTER_NET(mlx5, mlx5_net_driver);