]> git.droids-corp.org - dpdk.git/blobdiff - examples/l2fwd/main.c
ethdev: init all builtin drivers
[dpdk.git] / examples / l2fwd / main.c
index b887f6b347322c4340031e9332b4760236f5cbed..6731a14a97df9ec049dc4573cc86ab38a1883935 100644 (file)
@@ -566,14 +566,8 @@ MAIN(int argc, char **argv)
                rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n");
 
        /* init driver(s) */
-#ifdef RTE_LIBRTE_IGB_PMD
-       if (rte_igb_pmd_init() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init igb pmd\n");
-#endif
-#ifdef RTE_LIBRTE_IXGBE_PMD
-       if (rte_ixgbe_pmd_init() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init ixgbe pmd\n");
-#endif
+       if (rte_pmd_init_all() < 0)
+               rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
 
        if (rte_eal_pci_probe() < 0)
                rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");