examples/l3fwd: merge l3fwd-acl example
[dpdk.git] / lib / eal / linux / eal_memory.c
index 83eec07..c890c42 100644 (file)
@@ -5,7 +5,6 @@
 
 #include <errno.h>
 #include <fcntl.h>
-#include <stdarg.h>
 #include <stdbool.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <inttypes.h>
 #include <string.h>
 #include <sys/mman.h>
-#include <sys/types.h>
 #include <sys/stat.h>
-#include <sys/queue.h>
 #include <sys/file.h>
 #include <sys/resource.h>
 #include <unistd.h>
 #include <limits.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
 #include <signal.h>
 #include <setjmp.h>
 #ifdef F_ADD_SEALS /* if file sealing is supported, so is memfd */
-#include <linux/memfd.h>
 #define MEMFD_SUPPORTED
 #endif
 #ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES
 #include <rte_errno.h>
 #include <rte_log.h>
 #include <rte_memory.h>
-#include <rte_launch.h>
 #include <rte_eal.h>
-#include <rte_per_lcore.h>
 #include <rte_lcore.h>
 #include <rte_common.h>
-#include <rte_string_fns.h>
 
 #include "eal_private.h"
 #include "eal_memalloc.h"
@@ -1883,8 +1874,8 @@ memseg_secondary_init(void)
 
                msl = &mcfg->memsegs[msl_idx];
 
-               /* skip empty memseg lists */
-               if (msl->memseg_arr.len == 0)
+               /* skip empty and external memseg lists */
+               if (msl->memseg_arr.len == 0 || msl->external)
                        continue;
 
                if (rte_fbarray_attach(&msl->memseg_arr)) {