eal: remove log level from internal config
[dpdk.git] / lib / librte_eal / bsdapp / eal / eal.c
index 4ee9c66..05f0c1f 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 */
@@ -323,8 +323,6 @@ eal_log_level_parse(int argc, char **argv)
        optind = 1;
        optreset = 1;
 
-       eal_reset_internal_config(&internal_config);
-
        while ((opt = getopt_long(argc, argvopt, eal_short_options,
                                  eal_long_options, &option_index)) != EOF) {
 
@@ -519,10 +517,10 @@ rte_eal_init(int argc, char **argv)
 
        thread_id = pthread_self();
 
-       eal_log_level_parse(argc, argv);
+       eal_reset_internal_config(&internal_config);
 
        /* 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,6 @@ rte_eal_init(int argc, char **argv)
                return -1;
        }
 
-       if (rte_eal_pci_init() < 0) {
-               rte_eal_init_alert("Cannot init PCI\n");
-               rte_errno = EPROTO;
-               rte_atomic32_clear(&run_once);
-               return -1;
-       }
-
        eal_check_mem_on_local_socket();
 
        if (eal_plugins_init() < 0)
@@ -669,16 +660,6 @@ rte_eal_init(int argc, char **argv)
                return -1;
        }
 
-       /* Probe & Initialize PCI devices */
-       if (rte_eal_pci_probe()) {
-               rte_eal_init_alert("Cannot probe PCI\n");
-               rte_errno = ENOTSUP;
-               return -1;
-       }
-
-       if (rte_eal_dev_init() < 0)
-               rte_eal_init_alert("Cannot init pmd devices\n");
-
        rte_eal_mcfg_complete();
 
        return fctret;