spelling fixes
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal.c
index 905ce37..de182e1 100644 (file)
@@ -289,8 +289,6 @@ eal_proc_type_detect(void)
 static void
 rte_config_init(void)
 {
-       /* set the magic in configuration structure */
-       rte_config.magic = RTE_MAGIC;
        rte_config.process_type = (internal_config.process_type == RTE_PROC_AUTO) ?
                        eal_proc_type_detect() : /* for auto, detect the type */
                        internal_config.process_type; /* otherwise use what's already set */
@@ -441,6 +439,11 @@ eal_parse_coremask(const char *coremask)
                val = xdigit2val(c);
                for(j = 0; j < BITS_PER_HEX && idx < RTE_MAX_LCORE; j++, idx++) {
                        if((1 << j) & val) {
+                               if (!lcore_config[idx].detected) {
+                                       RTE_LOG(ERR, EAL, "lcore %u "
+                                               "unavailable\n", idx);
+                                       return -1;
+                               }
                                cfg->lcore_role[idx] = ROLE_RTE;
                                if(count == 0)
                                        cfg->master_lcore = idx;
@@ -938,7 +941,7 @@ rte_eal_mcfg_complete(void)
 }
 
 /*
- * Request iopl priviledge for all RPL, returns 0 on success
+ * Request iopl privilege for all RPL, returns 0 on success
  */
 static int
 rte_eal_iopl_init(void)
@@ -1046,24 +1049,21 @@ rte_eal_init(int argc, char **argv)
 
        rte_eal_mcfg_complete();
 
-       if (rte_eal_non_pci_ethdev_init() < 0)
-               rte_panic("Cannot init non-PCI eth_devs\n");
-
        TAILQ_FOREACH(solib, &solib_list, next) {
+               RTE_LOG(INFO, EAL, "open shared lib %s\n", solib->name);
                solib->lib_handle = dlopen(solib->name, RTLD_NOW);
-               if ((solib->lib_handle == NULL) && (solib->name[0] != '/')) {
-                       /* relative path: try again with "./" prefix */
-                       char sopath[PATH_MAX];
-                       snprintf(sopath, sizeof(sopath), "./%s", solib->name);
-                       solib->lib_handle = dlopen(sopath, RTLD_NOW);
-               }
                if (solib->lib_handle == NULL)
                        RTE_LOG(WARNING, EAL, "%s\n", dlerror());
        }
 
+       eal_thread_init_master(rte_config.master_lcore);
+
        RTE_LOG(DEBUG, EAL, "Master core %u is ready (tid=%x)\n",
                rte_config.master_lcore, (int)thread_id);
 
+       if (rte_eal_vdev_init() < 0)
+               rte_panic("Cannot init virtual devices\n");
+
        RTE_LCORE_FOREACH_SLAVE(i) {
 
                /*
@@ -1084,8 +1084,6 @@ rte_eal_init(int argc, char **argv)
                        rte_panic("Cannot create thread\n");
        }
 
-       eal_thread_init_master(rte_config.master_lcore);
-
        /*
         * Launch a dummy function on all slave lcores, so that master lcore
         * knows they are all ready when this function returns.