net/dpaa: support Rx buffer size
[dpdk.git] / lib / librte_eal / linux / eal.c
index 9cf0e2e..6c34ac8 100644 (file)
@@ -883,10 +883,10 @@ eal_check_mem_on_local_socket(void)
        int socket_id;
        const struct rte_config *config = rte_eal_get_configuration();
 
-       socket_id = rte_lcore_to_socket_id(config->master_lcore);
+       socket_id = rte_lcore_to_socket_id(config->main_lcore);
 
        if (rte_memseg_list_walk(check_socket, &socket_id) == 0)
-               RTE_LOG(WARNING, EAL, "WARNING: Master core has no memory on local socket!\n");
+               RTE_LOG(WARNING, EAL, "WARNING: Main core has no memory on local socket!\n");
 }
 
 static int
@@ -1085,7 +1085,7 @@ rte_eal_init(int argc, char **argv)
                                 */
                                iova_mode = RTE_IOVA_VA;
                                RTE_LOG(DEBUG, EAL, "Physical addresses are unavailable, selecting IOVA as VA mode.\n");
-#if defined(RTE_LIBRTE_KNI) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
+#if defined(RTE_LIB_KNI) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
                        } else if (rte_eal_check_module("rte_kni") == 1) {
                                iova_mode = RTE_IOVA_PA;
                                RTE_LOG(DEBUG, EAL, "KNI is loaded, selecting IOVA as PA mode for better KNI performance.\n");
@@ -1102,7 +1102,7 @@ rte_eal_init(int argc, char **argv)
                                RTE_LOG(DEBUG, EAL, "IOMMU is not available, selecting IOVA as PA mode.\n");
                        }
                }
-#if defined(RTE_LIBRTE_KNI) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+#if defined(RTE_LIB_KNI) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
                /* Workaround for KNI which requires physical address to work
                 * in kernels < 4.10
                 */
@@ -1215,28 +1215,28 @@ rte_eal_init(int argc, char **argv)
        eal_check_mem_on_local_socket();
 
        if (pthread_setaffinity_np(pthread_self(), sizeof(rte_cpuset_t),
-                       &lcore_config[config->master_lcore].cpuset) != 0) {
+                       &lcore_config[config->main_lcore].cpuset) != 0) {
                rte_eal_init_alert("Cannot set affinity");
                rte_errno = EINVAL;
                return -1;
        }
-       __rte_thread_init(config->master_lcore,
-               &lcore_config[config->master_lcore].cpuset);
+       __rte_thread_init(config->main_lcore,
+               &lcore_config[config->main_lcore].cpuset);
 
        ret = eal_thread_dump_current_affinity(cpuset, sizeof(cpuset));
-       RTE_LOG(DEBUG, EAL, "Master lcore %u is ready (tid=%zx;cpuset=[%s%s])\n",
-               config->master_lcore, (uintptr_t)thread_id, cpuset,
+       RTE_LOG(DEBUG, EAL, "Main lcore %u is ready (tid=%zx;cpuset=[%s%s])\n",
+               config->main_lcore, (uintptr_t)thread_id, cpuset,
                ret == 0 ? "" : "...");
 
-       RTE_LCORE_FOREACH_SLAVE(i) {
+       RTE_LCORE_FOREACH_WORKER(i) {
 
                /*
-                * create communication pipes between master thread
+                * create communication pipes between main thread
                 * and children
                 */
-               if (pipe(lcore_config[i].pipe_master2slave) < 0)
+               if (pipe(lcore_config[i].pipe_main2worker) < 0)
                        rte_panic("Cannot create pipe\n");
-               if (pipe(lcore_config[i].pipe_slave2master) < 0)
+               if (pipe(lcore_config[i].pipe_worker2main) < 0)
                        rte_panic("Cannot create pipe\n");
 
                lcore_config[i].state = WAIT;
@@ -1249,7 +1249,7 @@ rte_eal_init(int argc, char **argv)
 
                /* Set thread_name for aid in debugging. */
                snprintf(thread_name, sizeof(thread_name),
-                       "lcore-slave-%d", i);
+                       "lcore-worker-%d", i);
                ret = rte_thread_setname(lcore_config[i].thread_id,
                                                thread_name);
                if (ret != 0)
@@ -1263,17 +1263,17 @@ rte_eal_init(int argc, char **argv)
        }
 
        /*
-        * Launch a dummy function on all slave lcores, so that master lcore
+        * Launch a dummy function on all worker lcores, so that main lcore
         * knows they are all ready when this function returns.
         */
-       rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);
+       rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MAIN);
        rte_eal_mp_wait_lcore();
 
        /* initialize services so vdevs register service during bus_probe. */
        ret = rte_service_init();
        if (ret) {
                rte_eal_init_alert("rte_service_init() failed");
-               rte_errno = ENOEXEC;
+               rte_errno = -ret;
                return -1;
        }
 
@@ -1295,7 +1295,7 @@ rte_eal_init(int argc, char **argv)
         */
        ret = rte_service_start_with_defaults();
        if (ret < 0 && ret != -ENOTSUP) {
-               rte_errno = ENOEXEC;
+               rte_errno = -ret;
                return -1;
        }
 
@@ -1360,6 +1360,8 @@ rte_eal_cleanup(void)
                rte_memseg_walk(mark_freeable, NULL);
        rte_service_finalize();
        rte_mp_channel_cleanup();
+       /* after this point, any DPDK pointers will become dangling */
+       rte_eal_memory_detach();
        rte_trace_save();
        eal_trace_fini();
        eal_cleanup_config(internal_conf);