]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/bsdapp/eal/eal.c
eal: support link bonding device initialization
[dpdk.git] / lib / librte_eal / bsdapp / eal / eal.c
index a1f014f8a1b7cdface52bed52650ea03571fef69..c53f63e3aa909b960c8f772468092641a463d3bf 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;
 }