1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation.
3 * Copyright(c) 2014 6WIND S.A.
9 #ifndef RTE_EXEC_ENV_WINDOWS
16 #ifndef RTE_EXEC_ENV_WINDOWS
19 #include <sys/types.h>
21 #ifndef RTE_EXEC_ENV_WINDOWS
25 #include <rte_string_fns.h>
28 #include <rte_lcore.h>
29 #include <rte_memory.h>
30 #include <rte_tailq.h>
31 #include <rte_version.h>
32 #include <rte_devargs.h>
33 #include <rte_memcpy.h>
34 #ifndef RTE_EXEC_ENV_WINDOWS
35 #include <rte_telemetry.h>
38 #include "eal_internal_cfg.h"
39 #include "eal_options.h"
40 #include "eal_filesystem.h"
41 #include "eal_private.h"
42 #ifndef RTE_EXEC_ENV_WINDOWS
43 #include "eal_trace.h"
46 #define BITS_PER_HEX 4
47 #define LCORE_OPT_LST 1
48 #define LCORE_OPT_MSK 2
49 #define LCORE_OPT_MAP 3
53 "b:" /* pci-blacklist */
55 "s:" /* service coremask */
59 "S:" /* service corelist */
60 "m:" /* memory size */
61 "n:" /* memory channels */
62 "r:" /* memory ranks */
64 "w:" /* pci-whitelist */
68 eal_long_options[] = {
69 {OPT_BASE_VIRTADDR, 1, NULL, OPT_BASE_VIRTADDR_NUM },
70 {OPT_CREATE_UIO_DEV, 0, NULL, OPT_CREATE_UIO_DEV_NUM },
71 {OPT_FILE_PREFIX, 1, NULL, OPT_FILE_PREFIX_NUM },
72 {OPT_HELP, 0, NULL, OPT_HELP_NUM },
73 {OPT_HUGE_DIR, 1, NULL, OPT_HUGE_DIR_NUM },
74 {OPT_HUGE_UNLINK, 0, NULL, OPT_HUGE_UNLINK_NUM },
75 {OPT_IOVA_MODE, 1, NULL, OPT_IOVA_MODE_NUM },
76 {OPT_LCORES, 1, NULL, OPT_LCORES_NUM },
77 {OPT_LOG_LEVEL, 1, NULL, OPT_LOG_LEVEL_NUM },
78 {OPT_TRACE, 1, NULL, OPT_TRACE_NUM },
79 {OPT_TRACE_DIR, 1, NULL, OPT_TRACE_DIR_NUM },
80 {OPT_TRACE_BUF_SIZE, 1, NULL, OPT_TRACE_BUF_SIZE_NUM },
81 {OPT_TRACE_MODE, 1, NULL, OPT_TRACE_MODE_NUM },
82 {OPT_MASTER_LCORE, 1, NULL, OPT_MASTER_LCORE_NUM },
83 {OPT_MBUF_POOL_OPS_NAME, 1, NULL, OPT_MBUF_POOL_OPS_NAME_NUM},
84 {OPT_NO_HPET, 0, NULL, OPT_NO_HPET_NUM },
85 {OPT_NO_HUGE, 0, NULL, OPT_NO_HUGE_NUM },
86 {OPT_NO_PCI, 0, NULL, OPT_NO_PCI_NUM },
87 {OPT_NO_SHCONF, 0, NULL, OPT_NO_SHCONF_NUM },
88 {OPT_IN_MEMORY, 0, NULL, OPT_IN_MEMORY_NUM },
89 {OPT_PCI_BLACKLIST, 1, NULL, OPT_PCI_BLACKLIST_NUM },
90 {OPT_PCI_WHITELIST, 1, NULL, OPT_PCI_WHITELIST_NUM },
91 {OPT_PROC_TYPE, 1, NULL, OPT_PROC_TYPE_NUM },
92 {OPT_SOCKET_MEM, 1, NULL, OPT_SOCKET_MEM_NUM },
93 {OPT_SOCKET_LIMIT, 1, NULL, OPT_SOCKET_LIMIT_NUM },
94 {OPT_SYSLOG, 1, NULL, OPT_SYSLOG_NUM },
95 {OPT_VDEV, 1, NULL, OPT_VDEV_NUM },
96 {OPT_VFIO_INTR, 1, NULL, OPT_VFIO_INTR_NUM },
97 {OPT_VMWARE_TSC_MAP, 0, NULL, OPT_VMWARE_TSC_MAP_NUM },
98 {OPT_LEGACY_MEM, 0, NULL, OPT_LEGACY_MEM_NUM },
99 {OPT_SINGLE_FILE_SEGMENTS, 0, NULL, OPT_SINGLE_FILE_SEGMENTS_NUM},
100 {OPT_MATCH_ALLOCATIONS, 0, NULL, OPT_MATCH_ALLOCATIONS_NUM},
101 {OPT_TELEMETRY, 0, NULL, OPT_TELEMETRY_NUM },
102 {OPT_NO_TELEMETRY, 0, NULL, OPT_NO_TELEMETRY_NUM },
106 TAILQ_HEAD(shared_driver_list, shared_driver);
108 /* Definition for shared object drivers. */
109 struct shared_driver {
110 TAILQ_ENTRY(shared_driver) next;
116 /* List of external loadable drivers */
117 static struct shared_driver_list solib_list =
118 TAILQ_HEAD_INITIALIZER(solib_list);
120 #ifndef RTE_EXEC_ENV_WINDOWS
121 /* Default path of external loadable drivers */
122 static const char *default_solib_dir = RTE_EAL_PMD_PATH;
126 * Stringified version of solib path used by dpdk-pmdinfo.py
127 * Note: PLEASE DO NOT ALTER THIS without making a corresponding
128 * change to usertools/dpdk-pmdinfo.py
130 static const char dpdk_solib_path[] __rte_used =
131 "DPDK_PLUGIN_PATH=" RTE_EAL_PMD_PATH;
133 TAILQ_HEAD(device_option_list, device_option);
135 struct device_option {
136 TAILQ_ENTRY(device_option) next;
138 enum rte_devtype type;
142 static struct device_option_list devopt_list =
143 TAILQ_HEAD_INITIALIZER(devopt_list);
145 static int master_lcore_parsed;
146 static int mem_parsed;
147 static int core_parsed;
149 #ifndef RTE_EXEC_ENV_WINDOWS
150 static char **eal_args;
151 static char **eal_app_args;
153 #define EAL_PARAM_REQ "/eal/params"
154 #define EAL_APP_PARAM_REQ "/eal/app_params"
156 /* callback handler for telemetry library to report out EAL flags */
158 handle_eal_info_request(const char *cmd, const char *params __rte_unused,
159 struct rte_tel_data *d)
165 if (strcmp(cmd, EAL_PARAM_REQ) == 0)
170 rte_tel_data_start_array(d, RTE_TEL_STRING_VAL);
171 if (args == NULL || args[0] == NULL)
174 for ( ; args[i] != NULL; i++)
175 used = rte_tel_data_add_array_string(d, args[i]);
180 eal_save_args(int argc, char **argv)
184 rte_telemetry_register_cmd(EAL_PARAM_REQ, handle_eal_info_request,
185 "Returns EAL commandline parameters used. Takes no parameters");
186 rte_telemetry_register_cmd(EAL_APP_PARAM_REQ, handle_eal_info_request,
187 "Returns app commandline parameters used. Takes no parameters");
189 /* clone argv to report out later. We overprovision, but
190 * this does not waste huge amounts of memory
192 eal_args = calloc(argc + 1, sizeof(*eal_args));
193 if (eal_args == NULL)
196 for (i = 0; i < argc; i++) {
197 eal_args[i] = strdup(argv[i]);
198 if (strcmp(argv[i], "--") == 0)
201 eal_args[i++] = NULL; /* always finish with NULL */
203 /* allow reporting of any app args we know about too */
207 eal_app_args = calloc(argc - i + 1, sizeof(*eal_args));
208 if (eal_app_args == NULL)
211 for (j = 0; i < argc; j++, i++)
212 eal_app_args[j] = strdup(argv[i]);
213 eal_app_args[j] = NULL;
220 eal_option_device_add(enum rte_devtype type, const char *optarg)
222 struct device_option *devopt;
226 optlen = strlen(optarg) + 1;
227 devopt = calloc(1, sizeof(*devopt) + optlen);
228 if (devopt == NULL) {
229 RTE_LOG(ERR, EAL, "Unable to allocate device option\n");
234 ret = strlcpy(devopt->arg, optarg, optlen);
236 RTE_LOG(ERR, EAL, "Unable to copy device option\n");
240 TAILQ_INSERT_TAIL(&devopt_list, devopt, next);
245 eal_option_device_parse(void)
247 struct device_option *devopt;
251 TAILQ_FOREACH_SAFE(devopt, &devopt_list, next, tmp) {
253 ret = rte_devargs_add(devopt->type, devopt->arg);
255 RTE_LOG(ERR, EAL, "Unable to parse device '%s'\n",
258 TAILQ_REMOVE(&devopt_list, devopt, next);
265 eal_get_hugefile_prefix(void)
267 if (internal_config.hugefile_prefix != NULL)
268 return internal_config.hugefile_prefix;
269 return HUGEFILE_PREFIX_DEFAULT;
273 eal_reset_internal_config(struct internal_config *internal_cfg)
277 internal_cfg->memory = 0;
278 internal_cfg->force_nrank = 0;
279 internal_cfg->force_nchannel = 0;
280 internal_cfg->hugefile_prefix = NULL;
281 internal_cfg->hugepage_dir = NULL;
282 internal_cfg->force_sockets = 0;
283 /* zero out the NUMA config */
284 for (i = 0; i < RTE_MAX_NUMA_NODES; i++)
285 internal_cfg->socket_mem[i] = 0;
286 internal_cfg->force_socket_limits = 0;
287 /* zero out the NUMA limits config */
288 for (i = 0; i < RTE_MAX_NUMA_NODES; i++)
289 internal_cfg->socket_limit[i] = 0;
290 /* zero out hugedir descriptors */
291 for (i = 0; i < MAX_HUGEPAGE_SIZES; i++) {
292 memset(&internal_cfg->hugepage_info[i], 0,
293 sizeof(internal_cfg->hugepage_info[0]));
294 internal_cfg->hugepage_info[i].lock_descriptor = -1;
296 internal_cfg->base_virtaddr = 0;
299 internal_cfg->syslog_facility = LOG_DAEMON;
302 /* if set to NONE, interrupt mode is determined automatically */
303 internal_cfg->vfio_intr_mode = RTE_INTR_MODE_NONE;
305 #ifdef RTE_LIBEAL_USE_HPET
306 internal_cfg->no_hpet = 0;
308 internal_cfg->no_hpet = 1;
310 internal_cfg->vmware_tsc_map = 0;
311 internal_cfg->create_uio_dev = 0;
312 internal_cfg->iova_mode = RTE_IOVA_DC;
313 internal_cfg->user_mbuf_pool_ops_name = NULL;
314 CPU_ZERO(&internal_cfg->ctrl_cpuset);
315 internal_cfg->init_complete = 0;
319 eal_plugin_add(const char *path)
321 struct shared_driver *solib;
323 solib = malloc(sizeof(*solib));
325 RTE_LOG(ERR, EAL, "malloc(solib) failed\n");
328 memset(solib, 0, sizeof(*solib));
329 strlcpy(solib->name, path, PATH_MAX-1);
330 solib->name[PATH_MAX-1] = 0;
331 TAILQ_INSERT_TAIL(&solib_list, solib, next);
336 #ifndef RTE_EXEC_ENV_WINDOWS
338 eal_plugindir_init(const char *path)
341 struct dirent *dent = NULL;
342 char sopath[PATH_MAX];
344 if (path == NULL || *path == '\0')
349 RTE_LOG(ERR, EAL, "failed to open directory %s: %s\n",
350 path, strerror(errno));
354 while ((dent = readdir(d)) != NULL) {
357 snprintf(sopath, sizeof(sopath), "%s/%s", path, dent->d_name);
359 if (!(stat(sopath, &sb) == 0 && S_ISREG(sb.st_mode)))
362 if (eal_plugin_add(sopath) == -1)
367 /* XXX this ignores failures from readdir() itself */
368 return (dent == NULL) ? 0 : -1;
373 eal_plugins_init(void)
375 #ifndef RTE_EXEC_ENV_WINDOWS
376 struct shared_driver *solib = NULL;
379 if (*default_solib_dir != '\0' && stat(default_solib_dir, &sb) == 0 &&
381 eal_plugin_add(default_solib_dir);
383 TAILQ_FOREACH(solib, &solib_list, next) {
385 if (stat(solib->name, &sb) == 0 && S_ISDIR(sb.st_mode)) {
386 if (eal_plugindir_init(solib->name) == -1) {
388 "Cannot init plugin directory %s\n",
393 RTE_LOG(DEBUG, EAL, "open shared lib %s\n",
395 solib->lib_handle = dlopen(solib->name, RTLD_NOW);
396 if (solib->lib_handle == NULL) {
397 RTE_LOG(ERR, EAL, "%s\n", dlerror());
408 * Parse the coremask given as argument (hexadecimal string) and fill
409 * the global configuration (core role and core count) with the parsed
412 static int xdigit2val(unsigned char c)
426 eal_parse_service_coremask(const char *coremask)
428 struct rte_config *cfg = rte_eal_get_configuration();
430 unsigned int count = 0;
433 uint32_t taken_lcore_count = 0;
435 if (coremask == NULL)
437 /* Remove all blank characters ahead and after .
438 * Remove 0x/0X if exists.
440 while (isblank(*coremask))
442 if (coremask[0] == '0' && ((coremask[1] == 'x')
443 || (coremask[1] == 'X')))
445 i = strlen(coremask);
446 while ((i > 0) && isblank(coremask[i - 1]))
452 for (i = i - 1; i >= 0 && idx < RTE_MAX_LCORE; i--) {
454 if (isxdigit(c) == 0) {
455 /* invalid characters */
459 for (j = 0; j < BITS_PER_HEX && idx < RTE_MAX_LCORE;
461 if ((1 << j) & val) {
462 /* handle master lcore already parsed */
463 uint32_t lcore = idx;
464 if (master_lcore_parsed &&
465 cfg->master_lcore == lcore) {
467 "lcore %u is master lcore, cannot use as service core\n",
472 if (eal_cpu_detected(idx) == 0) {
474 "lcore %u unavailable\n", idx);
478 if (cfg->lcore_role[idx] == ROLE_RTE)
481 lcore_config[idx].core_role = ROLE_SERVICE;
488 if (coremask[i] != '0')
491 for (; idx < RTE_MAX_LCORE; idx++)
492 lcore_config[idx].core_index = -1;
497 if (core_parsed && taken_lcore_count != count) {
498 RTE_LOG(WARNING, EAL,
499 "Not all service cores are in the coremask. "
500 "Please ensure -c or -l includes service cores\n");
503 cfg->service_lcore_count = count;
508 eal_service_cores_parsed(void)
511 for (idx = 0; idx < RTE_MAX_LCORE; idx++) {
512 if (lcore_config[idx].core_role == ROLE_SERVICE)
519 update_lcore_config(int *cores)
521 struct rte_config *cfg = rte_eal_get_configuration();
522 unsigned int count = 0;
526 for (i = 0; i < RTE_MAX_LCORE; i++) {
527 if (cores[i] != -1) {
528 if (eal_cpu_detected(i) == 0) {
529 RTE_LOG(ERR, EAL, "lcore %u unavailable\n", i);
533 cfg->lcore_role[i] = ROLE_RTE;
536 cfg->lcore_role[i] = ROLE_OFF;
538 lcore_config[i].core_index = cores[i];
541 cfg->lcore_count = count;
546 eal_parse_coremask(const char *coremask, int *cores)
553 for (idx = 0; idx < RTE_MAX_LCORE; idx++)
557 /* Remove all blank characters ahead and after .
558 * Remove 0x/0X if exists.
560 while (isblank(*coremask))
562 if (coremask[0] == '0' && ((coremask[1] == 'x')
563 || (coremask[1] == 'X')))
565 i = strlen(coremask);
566 while ((i > 0) && isblank(coremask[i - 1]))
571 for (i = i - 1; i >= 0 && idx < RTE_MAX_LCORE; i--) {
573 if (isxdigit(c) == 0) {
574 /* invalid characters */
578 for (j = 0; j < BITS_PER_HEX && idx < RTE_MAX_LCORE; j++, idx++)
580 if ((1 << j) & val) {
587 if (coremask[i] != '0')
595 eal_parse_service_corelist(const char *corelist)
597 struct rte_config *cfg = rte_eal_get_configuration();
602 uint32_t taken_lcore_count = 0;
604 if (corelist == NULL)
607 /* Remove all blank characters ahead and after */
608 while (isblank(*corelist))
610 i = strlen(corelist);
611 while ((i > 0) && isblank(corelist[i - 1]))
614 /* Get list of cores */
617 while (isblank(*corelist))
619 if (*corelist == '\0')
622 idx = strtoul(corelist, &end, 10);
623 if (errno || end == NULL)
625 while (isblank(*end))
629 } else if ((*end == ',') || (*end == '\0')) {
631 if (min == RTE_MAX_LCORE)
633 for (idx = min; idx <= max; idx++) {
634 if (cfg->lcore_role[idx] != ROLE_SERVICE) {
635 /* handle master lcore already parsed */
636 uint32_t lcore = idx;
637 if (cfg->master_lcore == lcore &&
638 master_lcore_parsed) {
640 "Error: lcore %u is master lcore, cannot use as service core\n",
644 if (cfg->lcore_role[idx] == ROLE_RTE)
647 lcore_config[idx].core_role =
656 } while (*end != '\0');
661 if (core_parsed && taken_lcore_count != count) {
662 RTE_LOG(WARNING, EAL,
663 "Not all service cores were in the coremask. "
664 "Please ensure -c or -l includes service cores\n");
671 eal_parse_corelist(const char *corelist, int *cores)
678 for (idx = 0; idx < RTE_MAX_LCORE; idx++)
681 /* Remove all blank characters ahead */
682 while (isblank(*corelist))
685 /* Get list of cores */
688 while (isblank(*corelist))
690 if (*corelist == '\0')
693 idx = strtol(corelist, &end, 10);
694 if (errno || end == NULL)
696 if (idx < 0 || idx >= RTE_MAX_LCORE)
698 while (isblank(*end))
702 } else if ((*end == ',') || (*end == '\0')) {
704 if (min == RTE_MAX_LCORE)
706 for (idx = min; idx <= max; idx++) {
707 if (cores[idx] == -1) {
716 } while (*end != '\0');
723 /* Changes the lcore id of the master thread */
725 eal_parse_master_lcore(const char *arg)
728 struct rte_config *cfg = rte_eal_get_configuration();
731 cfg->master_lcore = (uint32_t) strtol(arg, &parsing_end, 0);
732 if (errno || parsing_end[0] != 0)
734 if (cfg->master_lcore >= RTE_MAX_LCORE)
736 master_lcore_parsed = 1;
738 /* ensure master core is not used as service core */
739 if (lcore_config[cfg->master_lcore].core_role == ROLE_SERVICE) {
741 "Error: Master lcore is used as a service core\n");
749 * Parse elem, the elem could be single number/range or '(' ')' group
750 * 1) A single number elem, it's just a simple digit. e.g. 9
751 * 2) A single range elem, two digits with a '-' between. e.g. 2-6
752 * 3) A group elem, combines multiple 1) or 2) with '( )'. e.g (0,2-4,6)
753 * Within group elem, '-' used for a range separator;
754 * ',' used for a single number.
757 eal_parse_set(const char *input, rte_cpuset_t *set)
760 const char *str = input;
766 while (isblank(*str))
769 /* only digit or left bracket is qualify for start point */
770 if ((!isdigit(*str) && *str != '(') || *str == '\0')
773 /* process single number or single range of number */
776 idx = strtoul(str, &end, 10);
777 if (errno || end == NULL || idx >= CPU_SETSIZE)
780 while (isblank(*end))
786 /* process single <number>-<number> */
788 while (isblank(*end))
794 idx = strtoul(end, &end, 10);
795 if (errno || end == NULL || idx >= CPU_SETSIZE)
798 while (isblank(*end))
800 if (*end != ',' && *end != '\0')
804 if (*end != ',' && *end != '\0' &&
808 for (idx = RTE_MIN(min, max);
809 idx <= RTE_MAX(min, max); idx++)
816 /* process set within bracket */
818 while (isblank(*str))
826 /* go ahead to the first digit */
827 while (isblank(*str))
832 /* get the digit value */
834 idx = strtoul(str, &end, 10);
835 if (errno || end == NULL || idx >= CPU_SETSIZE)
838 /* go ahead to separator '-',',' and ')' */
839 while (isblank(*end))
842 if (min == RTE_MAX_LCORE)
844 else /* avoid continuous '-' */
846 } else if ((*end == ',') || (*end == ')')) {
848 if (min == RTE_MAX_LCORE)
850 for (idx = RTE_MIN(min, max);
851 idx <= RTE_MAX(min, max); idx++)
859 } while (*end != '\0' && *end != ')');
862 * to avoid failure that tail blank makes end character check fail
863 * in eal_parse_lcores( )
865 while (isblank(*str))
872 check_cpuset(rte_cpuset_t *set)
876 for (idx = 0; idx < CPU_SETSIZE; idx++) {
877 if (!CPU_ISSET(idx, set))
880 if (eal_cpu_detected(idx) == 0) {
881 RTE_LOG(ERR, EAL, "core %u "
882 "unavailable\n", idx);
890 * The format pattern: --lcores='<lcores[@cpus]>[<,lcores[@cpus]>...]'
891 * lcores, cpus could be a single digit/range or a group.
892 * '(' and ')' are necessary if it's a group.
893 * If not supply '@cpus', the value of cpus uses the same as lcores.
894 * e.g. '1,2@(5-7),(3-5)@(0,2),(0,6),7-8' means start 9 EAL thread as below
895 * lcore 0 runs on cpuset 0x41 (cpu 0,6)
896 * lcore 1 runs on cpuset 0x2 (cpu 1)
897 * lcore 2 runs on cpuset 0xe0 (cpu 5,6,7)
898 * lcore 3,4,5 runs on cpuset 0x5 (cpu 0,2)
899 * lcore 6 runs on cpuset 0x41 (cpu 0,6)
900 * lcore 7 runs on cpuset 0x80 (cpu 7)
901 * lcore 8 runs on cpuset 0x100 (cpu 8)
904 eal_parse_lcores(const char *lcores)
906 struct rte_config *cfg = rte_eal_get_configuration();
907 rte_cpuset_t lcore_set;
908 unsigned int set_count;
911 const char *lcore_start = NULL;
912 const char *end = NULL;
921 /* Remove all blank characters ahead and after */
922 while (isblank(*lcores))
927 /* Reset lcore config */
928 for (idx = 0; idx < RTE_MAX_LCORE; idx++) {
929 cfg->lcore_role[idx] = ROLE_OFF;
930 lcore_config[idx].core_index = -1;
931 CPU_ZERO(&lcore_config[idx].cpuset);
934 /* Get list of cores */
936 while (isblank(*lcores))
943 /* record lcore_set start point */
944 lcore_start = lcores;
946 /* go across a complete bracket */
947 if (*lcore_start == '(') {
948 lcores += strcspn(lcores, ")");
949 if (*lcores++ == '\0')
953 /* scan the separator '@', ','(next) or '\0'(finish) */
954 lcores += strcspn(lcores, "@,");
956 if (*lcores == '@') {
957 /* explicit assign cpuset and update the end cursor */
958 offset = eal_parse_set(lcores + 1, &cpuset);
961 end = lcores + 1 + offset;
962 } else { /* ',' or '\0' */
963 /* haven't given cpuset, current loop done */
966 /* go back to check <number>-<number> */
967 offset = strcspn(lcore_start, "(-");
968 if (offset < (end - lcore_start) &&
969 *(lcore_start + offset) != '(')
973 if (*end != ',' && *end != '\0')
976 /* parse lcore_set from start point */
977 if (eal_parse_set(lcore_start, &lcore_set) < 0)
980 /* without '@', by default using lcore_set as cpuset */
982 rte_memcpy(&cpuset, &lcore_set, sizeof(cpuset));
984 set_count = CPU_COUNT(&lcore_set);
985 /* start to update lcore_set */
986 for (idx = 0; idx < RTE_MAX_LCORE; idx++) {
987 if (!CPU_ISSET(idx, &lcore_set))
991 if (cfg->lcore_role[idx] != ROLE_RTE) {
992 lcore_config[idx].core_index = count;
993 cfg->lcore_role[idx] = ROLE_RTE;
999 CPU_SET(idx, &cpuset);
1002 if (check_cpuset(&cpuset) < 0)
1004 rte_memcpy(&lcore_config[idx].cpuset, &cpuset,
1005 sizeof(rte_cpuset_t));
1008 /* some cores from the lcore_set can't be handled by EAL */
1013 } while (*end != '\0');
1018 cfg->lcore_count = count;
1026 #ifndef RTE_EXEC_ENV_WINDOWS
1028 eal_parse_syslog(const char *facility, struct internal_config *conf)
1031 static const struct {
1035 { "auth", LOG_AUTH },
1036 { "cron", LOG_CRON },
1037 { "daemon", LOG_DAEMON },
1039 { "kern", LOG_KERN },
1041 { "mail", LOG_MAIL },
1042 { "news", LOG_NEWS },
1043 { "syslog", LOG_SYSLOG },
1044 { "user", LOG_USER },
1045 { "uucp", LOG_UUCP },
1046 { "local0", LOG_LOCAL0 },
1047 { "local1", LOG_LOCAL1 },
1048 { "local2", LOG_LOCAL2 },
1049 { "local3", LOG_LOCAL3 },
1050 { "local4", LOG_LOCAL4 },
1051 { "local5", LOG_LOCAL5 },
1052 { "local6", LOG_LOCAL6 },
1053 { "local7", LOG_LOCAL7 },
1057 for (i = 0; map[i].name; i++) {
1058 if (!strcmp(facility, map[i].name)) {
1059 conf->syslog_facility = map[i].value;
1068 eal_parse_log_priority(const char *level)
1070 static const char * const levels[] = {
1071 [RTE_LOG_EMERG] = "emergency",
1072 [RTE_LOG_ALERT] = "alert",
1073 [RTE_LOG_CRIT] = "critical",
1074 [RTE_LOG_ERR] = "error",
1075 [RTE_LOG_WARNING] = "warning",
1076 [RTE_LOG_NOTICE] = "notice",
1077 [RTE_LOG_INFO] = "info",
1078 [RTE_LOG_DEBUG] = "debug",
1080 size_t len = strlen(level);
1088 /* look for named values, skip 0 which is not a valid level */
1089 for (i = 1; i < RTE_DIM(levels); i++) {
1090 if (strncmp(levels[i], level, len) == 0)
1094 /* not a string, maybe it is numeric */
1096 tmp = strtoul(level, &end, 0);
1098 /* check for errors */
1099 if (errno != 0 || end == NULL || *end != '\0' ||
1107 eal_parse_log_level(const char *arg)
1109 const char *pattern = NULL;
1110 const char *regex = NULL;
1118 if ((level = strchr(str, ','))) {
1121 } else if ((level = strchr(str, ':'))) {
1128 priority = eal_parse_log_priority(level);
1130 fprintf(stderr, "invalid log priority: %s\n", level);
1135 if (rte_log_set_level_regexp(regex, priority) < 0) {
1136 fprintf(stderr, "cannot set log level %s,%d\n",
1140 if (rte_log_save_regexp(regex, priority) < 0)
1142 } else if (pattern) {
1143 if (rte_log_set_level_pattern(pattern, priority) < 0) {
1144 fprintf(stderr, "cannot set log level %s:%d\n",
1148 if (rte_log_save_pattern(pattern, priority) < 0)
1151 rte_log_set_global_level(priority);
1162 static enum rte_proc_type_t
1163 eal_parse_proc_type(const char *arg)
1165 if (strncasecmp(arg, "primary", sizeof("primary")) == 0)
1166 return RTE_PROC_PRIMARY;
1167 if (strncasecmp(arg, "secondary", sizeof("secondary")) == 0)
1168 return RTE_PROC_SECONDARY;
1169 if (strncasecmp(arg, "auto", sizeof("auto")) == 0)
1170 return RTE_PROC_AUTO;
1172 return RTE_PROC_INVALID;
1176 eal_parse_iova_mode(const char *name)
1183 if (!strcmp("pa", name))
1185 else if (!strcmp("va", name))
1190 internal_config.iova_mode = mode;
1195 eal_parse_base_virtaddr(const char *arg)
1201 addr = strtoull(arg, &end, 16);
1203 /* check for errors */
1204 if ((errno != 0) || (arg[0] == '\0') || end == NULL || (*end != '\0'))
1207 /* make sure we don't exceed 32-bit boundary on 32-bit target */
1209 if (addr >= UINTPTR_MAX)
1213 /* align the addr on 16M boundary, 16MB is the minimum huge page
1214 * size on IBM Power architecture. If the addr is aligned to 16MB,
1215 * it can align to 2MB for x86. So this alignment can also be used
1216 * on x86 and other architectures.
1218 internal_config.base_virtaddr =
1219 RTE_PTR_ALIGN_CEIL((uintptr_t)addr, (size_t)RTE_PGSIZE_16M);
1224 /* caller is responsible for freeing the returned string */
1226 available_cores(void)
1234 /* find the first available cpu */
1235 for (idx = 0; idx < RTE_MAX_LCORE; idx++) {
1236 if (eal_cpu_detected(idx) == 0)
1240 if (idx >= RTE_MAX_LCORE)
1243 /* first sequence */
1244 if (asprintf(&str, "%d", idx) < 0)
1249 for (idx++ ; idx < RTE_MAX_LCORE; idx++) {
1250 if (eal_cpu_detected(idx) == 0)
1253 if (idx == previous + 1) {
1259 /* finish current sequence */
1261 if (asprintf(&tmp, "%s-%d", str, previous) < 0) {
1270 if (asprintf(&tmp, "%s,%d", str, idx) < 0) {
1280 /* finish last sequence */
1282 if (asprintf(&tmp, "%s-%d", str, previous) < 0) {
1294 eal_parse_common_option(int opt, const char *optarg,
1295 struct internal_config *conf)
1305 if (eal_option_device_add(RTE_DEVTYPE_BLACKLISTED_PCI,
1315 if (eal_option_device_add(RTE_DEVTYPE_WHITELISTED_PCI,
1323 int lcore_indexes[RTE_MAX_LCORE];
1325 if (eal_service_cores_parsed())
1326 RTE_LOG(WARNING, EAL,
1327 "Service cores parsed before dataplane cores. Please ensure -c is before -s or -S\n");
1328 if (eal_parse_coremask(optarg, lcore_indexes) < 0) {
1329 RTE_LOG(ERR, EAL, "invalid coremask syntax\n");
1332 if (update_lcore_config(lcore_indexes) < 0) {
1333 char *available = available_cores();
1336 "invalid coremask, please check specified cores are part of %s\n",
1343 RTE_LOG(ERR, EAL, "Option -c is ignored, because (%s) is set!\n",
1344 (core_parsed == LCORE_OPT_LST) ? "-l" :
1345 (core_parsed == LCORE_OPT_MAP) ? "--lcore" :
1350 core_parsed = LCORE_OPT_MSK;
1355 int lcore_indexes[RTE_MAX_LCORE];
1357 if (eal_service_cores_parsed())
1358 RTE_LOG(WARNING, EAL,
1359 "Service cores parsed before dataplane cores. Please ensure -l is before -s or -S\n");
1361 if (eal_parse_corelist(optarg, lcore_indexes) < 0) {
1362 RTE_LOG(ERR, EAL, "invalid core list syntax\n");
1365 if (update_lcore_config(lcore_indexes) < 0) {
1366 char *available = available_cores();
1369 "invalid core list, please check specified cores are part of %s\n",
1376 RTE_LOG(ERR, EAL, "Option -l is ignored, because (%s) is set!\n",
1377 (core_parsed == LCORE_OPT_MSK) ? "-c" :
1378 (core_parsed == LCORE_OPT_MAP) ? "--lcore" :
1383 core_parsed = LCORE_OPT_LST;
1386 /* service coremask */
1388 if (eal_parse_service_coremask(optarg) < 0) {
1389 RTE_LOG(ERR, EAL, "invalid service coremask\n");
1393 /* service corelist */
1395 if (eal_parse_service_corelist(optarg) < 0) {
1396 RTE_LOG(ERR, EAL, "invalid service core list\n");
1400 /* size of memory */
1402 conf->memory = atoi(optarg);
1403 conf->memory *= 1024ULL;
1404 conf->memory *= 1024ULL;
1407 /* force number of channels */
1409 conf->force_nchannel = atoi(optarg);
1410 if (conf->force_nchannel == 0) {
1411 RTE_LOG(ERR, EAL, "invalid channel number\n");
1415 /* force number of ranks */
1417 conf->force_nrank = atoi(optarg);
1418 if (conf->force_nrank == 0 ||
1419 conf->force_nrank > 16) {
1420 RTE_LOG(ERR, EAL, "invalid rank number\n");
1424 /* force loading of external driver */
1426 if (eal_plugin_add(optarg) == -1)
1430 /* since message is explicitly requested by user, we
1431 * write message at highest log level so it can always
1433 * even if info or warning messages are disabled */
1434 RTE_LOG(CRIT, EAL, "RTE Version: '%s'\n", rte_version());
1438 case OPT_HUGE_UNLINK_NUM:
1439 conf->hugepage_unlink = 1;
1442 case OPT_NO_HUGE_NUM:
1443 conf->no_hugetlbfs = 1;
1444 /* no-huge is legacy mem */
1445 conf->legacy_mem = 1;
1448 case OPT_NO_PCI_NUM:
1452 case OPT_NO_HPET_NUM:
1456 case OPT_VMWARE_TSC_MAP_NUM:
1457 conf->vmware_tsc_map = 1;
1460 case OPT_NO_SHCONF_NUM:
1461 conf->no_shconf = 1;
1464 case OPT_IN_MEMORY_NUM:
1465 conf->in_memory = 1;
1466 /* in-memory is a superset of noshconf and huge-unlink */
1467 conf->no_shconf = 1;
1468 conf->hugepage_unlink = 1;
1471 case OPT_PROC_TYPE_NUM:
1472 conf->process_type = eal_parse_proc_type(optarg);
1475 case OPT_MASTER_LCORE_NUM:
1476 if (eal_parse_master_lcore(optarg) < 0) {
1477 RTE_LOG(ERR, EAL, "invalid parameter for --"
1478 OPT_MASTER_LCORE "\n");
1484 if (eal_option_device_add(RTE_DEVTYPE_VIRTUAL,
1490 #ifndef RTE_EXEC_ENV_WINDOWS
1491 case OPT_SYSLOG_NUM:
1492 if (eal_parse_syslog(optarg, conf) < 0) {
1493 RTE_LOG(ERR, EAL, "invalid parameters for --"
1500 case OPT_LOG_LEVEL_NUM: {
1501 if (eal_parse_log_level(optarg) < 0) {
1503 "invalid parameters for --"
1504 OPT_LOG_LEVEL "\n");
1510 #ifndef RTE_EXEC_ENV_WINDOWS
1511 case OPT_TRACE_NUM: {
1512 if (eal_trace_args_save(optarg) < 0) {
1513 RTE_LOG(ERR, EAL, "invalid parameters for --"
1520 case OPT_TRACE_DIR_NUM: {
1521 if (eal_trace_dir_args_save(optarg) < 0) {
1522 RTE_LOG(ERR, EAL, "invalid parameters for --"
1523 OPT_TRACE_DIR "\n");
1529 case OPT_TRACE_BUF_SIZE_NUM: {
1530 if (eal_trace_bufsz_args_save(optarg) < 0) {
1531 RTE_LOG(ERR, EAL, "invalid parameters for --"
1532 OPT_TRACE_BUF_SIZE "\n");
1538 case OPT_TRACE_MODE_NUM: {
1539 if (eal_trace_mode_args_save(optarg) < 0) {
1540 RTE_LOG(ERR, EAL, "invalid parameters for --"
1541 OPT_TRACE_MODE "\n");
1546 #endif /* !RTE_EXEC_ENV_WINDOWS */
1548 case OPT_LCORES_NUM:
1549 if (eal_parse_lcores(optarg) < 0) {
1550 RTE_LOG(ERR, EAL, "invalid parameter for --"
1556 RTE_LOG(ERR, EAL, "Option --lcore is ignored, because (%s) is set!\n",
1557 (core_parsed == LCORE_OPT_LST) ? "-l" :
1558 (core_parsed == LCORE_OPT_MSK) ? "-c" :
1563 core_parsed = LCORE_OPT_MAP;
1565 case OPT_LEGACY_MEM_NUM:
1566 conf->legacy_mem = 1;
1568 case OPT_SINGLE_FILE_SEGMENTS_NUM:
1569 conf->single_file_segments = 1;
1571 case OPT_IOVA_MODE_NUM:
1572 if (eal_parse_iova_mode(optarg) < 0) {
1573 RTE_LOG(ERR, EAL, "invalid parameters for --"
1574 OPT_IOVA_MODE "\n");
1578 case OPT_BASE_VIRTADDR_NUM:
1579 if (eal_parse_base_virtaddr(optarg) < 0) {
1580 RTE_LOG(ERR, EAL, "invalid parameter for --"
1581 OPT_BASE_VIRTADDR "\n");
1585 case OPT_TELEMETRY_NUM:
1587 case OPT_NO_TELEMETRY_NUM:
1588 conf->no_telemetry = 1;
1591 /* don't know what to do, leave this to caller */
1599 RTE_LOG(ERR, EAL, "Options blacklist (-b) and whitelist (-w) "
1600 "cannot be used at the same time\n");
1605 eal_auto_detect_cores(struct rte_config *cfg)
1607 unsigned int lcore_id;
1608 unsigned int removed = 0;
1609 rte_cpuset_t affinity_set;
1611 if (pthread_getaffinity_np(pthread_self(), sizeof(rte_cpuset_t),
1613 CPU_ZERO(&affinity_set);
1615 for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
1616 if (cfg->lcore_role[lcore_id] == ROLE_RTE &&
1617 !CPU_ISSET(lcore_id, &affinity_set)) {
1618 cfg->lcore_role[lcore_id] = ROLE_OFF;
1623 cfg->lcore_count -= removed;
1627 compute_ctrl_threads_cpuset(struct internal_config *internal_cfg)
1629 rte_cpuset_t *cpuset = &internal_cfg->ctrl_cpuset;
1630 rte_cpuset_t default_set;
1631 unsigned int lcore_id;
1633 for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
1634 if (rte_lcore_has_role(lcore_id, ROLE_OFF))
1636 RTE_CPU_OR(cpuset, cpuset, &lcore_config[lcore_id].cpuset);
1638 RTE_CPU_NOT(cpuset, cpuset);
1640 if (pthread_getaffinity_np(pthread_self(), sizeof(rte_cpuset_t),
1642 CPU_ZERO(&default_set);
1644 RTE_CPU_AND(cpuset, cpuset, &default_set);
1646 /* if no remaining cpu, use master lcore cpu affinity */
1647 if (!CPU_COUNT(cpuset)) {
1648 memcpy(cpuset, &lcore_config[rte_get_master_lcore()].cpuset,
1654 eal_cleanup_config(struct internal_config *internal_cfg)
1656 if (internal_cfg->hugefile_prefix != NULL)
1657 free(internal_cfg->hugefile_prefix);
1658 if (internal_cfg->hugepage_dir != NULL)
1659 free(internal_cfg->hugepage_dir);
1660 if (internal_cfg->user_mbuf_pool_ops_name != NULL)
1661 free(internal_cfg->user_mbuf_pool_ops_name);
1667 eal_adjust_config(struct internal_config *internal_cfg)
1670 struct rte_config *cfg = rte_eal_get_configuration();
1673 eal_auto_detect_cores(cfg);
1675 if (internal_config.process_type == RTE_PROC_AUTO)
1676 internal_config.process_type = eal_proc_type_detect();
1678 /* default master lcore is the first one */
1679 if (!master_lcore_parsed) {
1680 cfg->master_lcore = rte_get_next_lcore(-1, 0, 0);
1681 if (cfg->master_lcore >= RTE_MAX_LCORE)
1683 lcore_config[cfg->master_lcore].core_role = ROLE_RTE;
1686 compute_ctrl_threads_cpuset(internal_cfg);
1688 /* if no memory amounts were requested, this will result in 0 and
1689 * will be overridden later, right after eal_hugepage_info_init() */
1690 for (i = 0; i < RTE_MAX_NUMA_NODES; i++)
1691 internal_cfg->memory += internal_cfg->socket_mem[i];
1697 eal_check_common_options(struct internal_config *internal_cfg)
1699 struct rte_config *cfg = rte_eal_get_configuration();
1701 if (cfg->lcore_role[cfg->master_lcore] != ROLE_RTE) {
1702 RTE_LOG(ERR, EAL, "Master lcore is not enabled for DPDK\n");
1706 if (internal_cfg->process_type == RTE_PROC_INVALID) {
1707 RTE_LOG(ERR, EAL, "Invalid process type specified\n");
1710 if (internal_cfg->hugefile_prefix != NULL &&
1711 strlen(internal_cfg->hugefile_prefix) < 1) {
1712 RTE_LOG(ERR, EAL, "Invalid length of --" OPT_FILE_PREFIX " option\n");
1715 if (internal_cfg->hugepage_dir != NULL &&
1716 strlen(internal_cfg->hugepage_dir) < 1) {
1717 RTE_LOG(ERR, EAL, "Invalid length of --" OPT_HUGE_DIR" option\n");
1720 if (internal_cfg->user_mbuf_pool_ops_name != NULL &&
1721 strlen(internal_cfg->user_mbuf_pool_ops_name) < 1) {
1722 RTE_LOG(ERR, EAL, "Invalid length of --" OPT_MBUF_POOL_OPS_NAME" option\n");
1725 if (index(eal_get_hugefile_prefix(), '%') != NULL) {
1726 RTE_LOG(ERR, EAL, "Invalid char, '%%', in --"OPT_FILE_PREFIX" "
1730 if (mem_parsed && internal_cfg->force_sockets == 1) {
1731 RTE_LOG(ERR, EAL, "Options -m and --"OPT_SOCKET_MEM" cannot "
1732 "be specified at the same time\n");
1735 if (internal_cfg->no_hugetlbfs && internal_cfg->force_sockets == 1) {
1736 RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_MEM" cannot "
1737 "be specified together with --"OPT_NO_HUGE"\n");
1740 if (internal_cfg->no_hugetlbfs && internal_cfg->hugepage_unlink &&
1741 !internal_cfg->in_memory) {
1742 RTE_LOG(ERR, EAL, "Option --"OPT_HUGE_UNLINK" cannot "
1743 "be specified together with --"OPT_NO_HUGE"\n");
1746 if (internal_config.force_socket_limits && internal_config.legacy_mem) {
1747 RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_LIMIT
1748 " is only supported in non-legacy memory mode\n");
1750 if (internal_cfg->single_file_segments &&
1751 internal_cfg->hugepage_unlink &&
1752 !internal_cfg->in_memory) {
1753 RTE_LOG(ERR, EAL, "Option --"OPT_SINGLE_FILE_SEGMENTS" is "
1754 "not compatible with --"OPT_HUGE_UNLINK"\n");
1757 if (internal_cfg->legacy_mem &&
1758 internal_cfg->in_memory) {
1759 RTE_LOG(ERR, EAL, "Option --"OPT_LEGACY_MEM" is not compatible "
1760 "with --"OPT_IN_MEMORY"\n");
1763 if (internal_cfg->legacy_mem && internal_cfg->match_allocations) {
1764 RTE_LOG(ERR, EAL, "Option --"OPT_LEGACY_MEM" is not compatible "
1765 "with --"OPT_MATCH_ALLOCATIONS"\n");
1768 if (internal_cfg->no_hugetlbfs && internal_cfg->match_allocations) {
1769 RTE_LOG(ERR, EAL, "Option --"OPT_NO_HUGE" is not compatible "
1770 "with --"OPT_MATCH_ALLOCATIONS"\n");
1773 if (internal_cfg->legacy_mem && internal_cfg->memory == 0) {
1774 RTE_LOG(NOTICE, EAL, "Static memory layout is selected, "
1775 "amount of reserved memory can be adjusted with "
1776 "-m or --"OPT_SOCKET_MEM"\n");
1783 eal_common_usage(void)
1785 printf("[options]\n\n"
1786 "EAL common options:\n"
1787 " -c COREMASK Hexadecimal bitmask of cores to run on\n"
1788 " -l CORELIST List of cores to run on\n"
1789 " The argument format is <c1>[-c2][,c3[-c4],...]\n"
1790 " where c1, c2, etc are core indexes between 0 and %d\n"
1791 " --"OPT_LCORES" COREMAP Map lcore set to physical cpu set\n"
1792 " The argument format is\n"
1793 " '<lcores[@cpus]>[<,lcores[@cpus]>...]'\n"
1794 " lcores and cpus list are grouped by '(' and ')'\n"
1795 " Within the group, '-' is used for range separator,\n"
1796 " ',' is used for single number separator.\n"
1797 " '( )' can be omitted for single element group,\n"
1798 " '@' can be omitted if cpus and lcores have the same value\n"
1799 " -s SERVICE COREMASK Hexadecimal bitmask of cores to be used as service cores\n"
1800 " --"OPT_MASTER_LCORE" ID Core ID that is used as master\n"
1801 " --"OPT_MBUF_POOL_OPS_NAME" Pool ops name for mbuf to use\n"
1802 " -n CHANNELS Number of memory channels\n"
1803 " -m MB Memory to allocate (see also --"OPT_SOCKET_MEM")\n"
1804 " -r RANKS Force number of memory ranks (don't detect)\n"
1805 " -b, --"OPT_PCI_BLACKLIST" Add a PCI device in black list.\n"
1806 " Prevent EAL from using this PCI device. The argument\n"
1807 " format is <domain:bus:devid.func>.\n"
1808 " -w, --"OPT_PCI_WHITELIST" Add a PCI device in white list.\n"
1809 " Only use the specified PCI devices. The argument format\n"
1810 " is <[domain:]bus:devid.func>. This option can be present\n"
1811 " several times (once per device).\n"
1812 " [NOTE: PCI whitelist cannot be used with -b option]\n"
1813 " --"OPT_VDEV" Add a virtual device.\n"
1814 " The argument format is <driver><id>[,key=val,...]\n"
1815 " (ex: --vdev=net_pcap0,iface=eth2).\n"
1816 " --"OPT_IOVA_MODE" Set IOVA mode. 'pa' for IOVA_PA\n"
1817 " 'va' for IOVA_VA\n"
1818 " -d LIB.so|DIR Add a driver or driver directory\n"
1819 " (can be used multiple times)\n"
1820 " --"OPT_VMWARE_TSC_MAP" Use VMware TSC map instead of native RDTSC\n"
1821 " --"OPT_PROC_TYPE" Type of this process (primary|secondary|auto)\n"
1822 #ifndef RTE_EXEC_ENV_WINDOWS
1823 " --"OPT_SYSLOG" Set syslog facility\n"
1825 " --"OPT_LOG_LEVEL"=<int> Set global log level\n"
1826 " --"OPT_LOG_LEVEL"=<type-match>:<int>\n"
1827 " Set specific log level\n"
1828 #ifndef RTE_EXEC_ENV_WINDOWS
1829 " --"OPT_TRACE"=<regex-match>\n"
1830 " Enable trace based on regular expression trace name.\n"
1831 " By default, the trace is disabled.\n"
1832 " User must specify this option to enable trace.\n"
1833 " --"OPT_TRACE_DIR"=<directory path>\n"
1834 " Specify trace directory for trace output.\n"
1835 " By default, trace output will created at\n"
1836 " $HOME directory and parameter must be\n"
1837 " specified once only.\n"
1838 " --"OPT_TRACE_BUF_SIZE"=<int>\n"
1839 " Specify maximum size of allocated memory\n"
1840 " for trace output for each thread. Valid\n"
1841 " unit can be either 'B|K|M' for 'Bytes',\n"
1842 " 'KBytes' and 'MBytes' respectively.\n"
1843 " Default is 1MB and parameter must be\n"
1844 " specified once only.\n"
1845 " --"OPT_TRACE_MODE"=<o[verwrite] | d[iscard]>\n"
1846 " Specify the mode of update of trace\n"
1847 " output file. Either update on a file can\n"
1848 " be wrapped or discarded when file size\n"
1849 " reaches its maximum limit.\n"
1850 " Default mode is 'overwrite' and parameter\n"
1851 " must be specified once only.\n"
1852 #endif /* !RTE_EXEC_ENV_WINDOWS */
1853 " -v Display version information on startup\n"
1854 " -h, --help This help\n"
1855 " --"OPT_IN_MEMORY" Operate entirely in memory. This will\n"
1856 " disable secondary process support\n"
1857 " --"OPT_BASE_VIRTADDR" Base virtual address\n"
1858 " --"OPT_TELEMETRY" Enable telemetry support (on by default)\n"
1859 " --"OPT_NO_TELEMETRY" Disable telemetry support\n"
1860 "\nEAL options for DEBUG use only:\n"
1861 " --"OPT_HUGE_UNLINK" Unlink hugepage files after init\n"
1862 " --"OPT_NO_HUGE" Use malloc instead of hugetlbfs\n"
1863 " --"OPT_NO_PCI" Disable PCI\n"
1864 " --"OPT_NO_HPET" Disable HPET\n"
1865 " --"OPT_NO_SHCONF" No shared config (mmap'd files)\n"
1866 "\n", RTE_MAX_LCORE);