X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmlx5%2Fmlx5.c;h=4eaabcda77735f55bbc893c75a932ea718ba9cad;hb=c830cb295411fc71c3f3d3591308d531937dd58f;hp=9113121054ff64fcfdd992052e3c9047d403091c;hpb=af424af840c336e265a8ab853a2ae9e57c1e81b2;p=dpdk.git diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 9113121054..4eaabcda77 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -739,11 +739,10 @@ static struct eth_driver mlx5_driver = { /** * Driver initialization routine. */ -static int -rte_mlx5_pmd_init(const char *name, const char *args) +RTE_INIT(rte_mlx5_pmd_init); +static void +rte_mlx5_pmd_init(void) { - (void)name; - (void)args; /* * RDMAV_HUGEPAGES_SAFE tells ibv_fork_init() we intend to use * huge pages. Calling ibv_fork_init() during init allows @@ -753,13 +752,7 @@ rte_mlx5_pmd_init(const char *name, const char *args) setenv("RDMAV_HUGEPAGES_SAFE", "1", 1); ibv_fork_init(); rte_eal_pci_register(&mlx5_driver.pci_drv); - return 0; } -static struct rte_driver rte_mlx5_driver = { - .type = PMD_PDEV, - .init = rte_mlx5_pmd_init, -}; - -PMD_REGISTER_DRIVER(rte_mlx5_driver, net_mlx5); +DRIVER_EXPORT_NAME(net_mlx5, __COUNTER__); DRIVER_REGISTER_PCI_TABLE(net_mlx5, mlx5_pci_id_map);