cryptodev: fix RSA key type name
[dpdk.git] / lib / eal / linux / eal.c
index fad062a..025e5cc 100644 (file)
@@ -7,10 +7,8 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <string.h>
-#include <stdarg.h>
 #include <unistd.h>
 #include <pthread.h>
-#include <syslog.h>
 #include <getopt.h>
 #include <sys/file.h>
 #include <dirent.h>
 #include <errno.h>
 #include <limits.h>
 #include <sys/mman.h>
-#include <sys/queue.h>
 #include <sys/stat.h>
 #if defined(RTE_ARCH_X86)
 #include <sys/io.h>
 #endif
 #include <linux/version.h>
 
-#include <rte_compat.h>
 #include <rte_common.h>
 #include <rte_debug.h>
 #include <rte_memory.h>
 #include <rte_launch.h>
 #include <rte_eal.h>
 #include <rte_errno.h>
-#include <rte_per_lcore.h>
 #include <rte_lcore.h>
 #include <rte_service_component.h>
 #include <rte_log.h>
-#include <rte_random.h>
-#include <rte_cycles.h>
 #include <rte_string_fns.h>
 #include <rte_cpuflags.h>
-#include <rte_interrupts.h>
 #include <rte_bus.h>
-#include <rte_dev.h>
-#include <rte_devargs.h>
 #include <rte_version.h>
 #include <malloc_heap.h>
 #include <rte_vfio.h>
@@ -643,8 +633,7 @@ eal_parse_args(int argc, char **argv)
                                RTE_LOG(ERR, EAL, "Could not store hugepage directory\n");
                        else {
                                /* free old hugepage dir */
-                               if (internal_conf->hugepage_dir != NULL)
-                                       free(internal_conf->hugepage_dir);
+                               free(internal_conf->hugepage_dir);
                                internal_conf->hugepage_dir = hdir;
                        }
                        break;
@@ -656,8 +645,7 @@ eal_parse_args(int argc, char **argv)
                                RTE_LOG(ERR, EAL, "Could not store file prefix\n");
                        else {
                                /* free old prefix */
-                               if (internal_conf->hugefile_prefix != NULL)
-                                       free(internal_conf->hugefile_prefix);
+                               free(internal_conf->hugefile_prefix);
                                internal_conf->hugefile_prefix = prefix;
                        }
                        break;
@@ -717,9 +705,7 @@ eal_parse_args(int argc, char **argv)
                                RTE_LOG(ERR, EAL, "Could not store mbuf pool ops name\n");
                        else {
                                /* free old ops name */
-                               if (internal_conf->user_mbuf_pool_ops_name !=
-                                               NULL)
-                                       free(internal_conf->user_mbuf_pool_ops_name);
+                               free(internal_conf->user_mbuf_pool_ops_name);
 
                                internal_conf->user_mbuf_pool_ops_name =
                                                ops_name;
@@ -1276,10 +1262,16 @@ rte_eal_cleanup(void)
        if (rte_eal_process_type() == RTE_PROC_PRIMARY &&
                        internal_conf->hugepage_file.unlink_existing)
                rte_memseg_walk(mark_freeable, NULL);
+
        rte_service_finalize();
+#ifdef VFIO_PRESENT
+       vfio_mp_sync_cleanup();
+#endif
        rte_mp_channel_cleanup();
        /* after this point, any DPDK pointers will become dangling */
        rte_eal_memory_detach();
+       eal_mp_dev_hotplug_cleanup();
+       rte_eal_malloc_heap_cleanup();
        rte_eal_alarm_cleanup();
        rte_trace_save();
        eal_trace_fini();