eal: remove unused device init function
[dpdk.git] / lib / librte_eal / bsdapp / eal / eal.c
index 0c157b4..3b66da6 100644 (file)
@@ -195,7 +195,7 @@ rte_eal_config_create(void)
                rte_panic("Cannot mmap memory for rte_config\n");
        }
        memcpy(rte_mem_cfg_addr, &early_mem_config, sizeof(early_mem_config));
-       rte_config.mem_config = (struct rte_mem_config *) rte_mem_cfg_addr;
+       rte_config.mem_config = rte_mem_cfg_addr;
 }
 
 /* attach to an existing shared memory config */
@@ -220,7 +220,7 @@ rte_eal_config_attach(void)
        if (rte_mem_cfg_addr == MAP_FAILED)
                rte_panic("Cannot mmap memory for rte_config\n");
 
-       rte_config.mem_config = (struct rte_mem_config *) rte_mem_cfg_addr;
+       rte_config.mem_config = rte_mem_cfg_addr;
 }
 
 /* Detect if we are a primary or a secondary process */
@@ -519,10 +519,8 @@ rte_eal_init(int argc, char **argv)
 
        thread_id = pthread_self();
 
-       eal_log_level_parse(argc, argv);
-
        /* set log level as early as possible */
-       rte_set_log_level(internal_config.log_level);
+       eal_log_level_parse(argc, argv);
 
        if (rte_eal_cpu_init() < 0) {
                rte_eal_init_alert("Cannot detect lcores.");
@@ -604,13 +602,10 @@ rte_eal_init(int argc, char **argv)
                return -1;
        }
 
-       if (rte_eal_pci_init() < 0)
-               rte_panic("Cannot init PCI\n");
-
        eal_check_mem_on_local_socket();
 
        if (eal_plugins_init() < 0)
-               rte_panic("Cannot init plugins\n");
+               rte_eal_init_alert("Cannot init plugins\n");
 
        eal_thread_init_master(rte_config.master_lcore);
 
@@ -620,8 +615,11 @@ 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");
+       if (rte_bus_scan()) {
+               rte_eal_init_alert("Cannot scan the buses for devices\n");
+               rte_errno = ENODEV;
+               return -1;
+       }
 
        RTE_LCORE_FOREACH_SLAVE(i) {
 
@@ -656,15 +654,11 @@ rte_eal_init(int argc, char **argv)
        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");
-
-       if (rte_eal_dev_init() < 0)
-               rte_panic("Cannot init pmd devices\n");
+       if (rte_bus_probe()) {
+               rte_eal_init_alert("Cannot probe devices\n");
+               rte_errno = ENOTSUP;
+               return -1;
+       }
 
        rte_eal_mcfg_complete();