bus: add probing
[dpdk.git] / lib / librte_eal / bsdapp / eal / eal.c
index 2206277..534aeea 100644 (file)
@@ -577,6 +577,9 @@ rte_eal_init(int argc, char **argv)
                rte_config.master_lcore, thread_id, cpuset,
                ret == 0 ? "" : "...");
 
+       if (rte_bus_scan())
+               rte_panic("Cannot scan the buses for devices\n");
+
        RTE_LCORE_FOREACH_SLAVE(i) {
 
                /*
@@ -609,6 +612,10 @@ rte_eal_init(int argc, char **argv)
        rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);
        rte_eal_mp_wait_lcore();
 
+       /* Probe all the buses and devices/drivers on them */
+       if (rte_bus_probe())
+               rte_panic("Cannot probe devices\n");
+
        /* Probe & Initialize PCI devices */
        if (rte_eal_pci_probe())
                rte_panic("Cannot probe PCI\n");