eal: support link bonding device initialization
[dpdk.git] / lib / librte_eal / bsdapp / eal / eal.c
index a1f014f..c53f63e 100644 (file)
@@ -874,7 +874,7 @@ rte_eal_init(int argc, char **argv)
 
        rte_eal_mcfg_complete();
 
-       if (rte_eal_dev_init() < 0)
+       if (rte_eal_dev_init(PMD_INIT_PRE_PCI_PROBE) < 0)
                rte_panic("Cannot init pmd devices\n");
 
        RTE_LCORE_FOREACH_SLAVE(i) {
@@ -906,6 +906,14 @@ rte_eal_init(int argc, char **argv)
        rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);
        rte_eal_mp_wait_lcore();
 
+       /* Probe & Initialize PCI devices */
+       if (rte_eal_pci_probe())
+                       rte_panic("Cannot probe PCI\n");
+
+       /* Initialize any outstanding devices */
+       if (rte_eal_dev_init(PMD_INIT_POST_PCI_PROBE) < 0)
+               rte_panic("Cannot init pmd devices\n");
+
        return fctret;
 }