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 /* Allow the application to print its usage message too if set */
150 static rte_usage_hook_t rte_application_usage_hook;
152 /* Returns rte_usage_hook_t */
154 eal_get_application_usage_hook(void)
156 return rte_application_usage_hook;
159 /* Set a per-application usage message */
161 rte_set_application_usage_hook(rte_usage_hook_t usage_func)
163 rte_usage_hook_t old_func;
165 /* Will be NULL on the first call to denote the last usage routine. */
166 old_func = rte_application_usage_hook;
167 rte_application_usage_hook = usage_func;
172 #ifndef RTE_EXEC_ENV_WINDOWS
173 static char **eal_args;
174 static char **eal_app_args;
176 #define EAL_PARAM_REQ "/eal/params"
177 #define EAL_APP_PARAM_REQ "/eal/app_params"
179 /* callback handler for telemetry library to report out EAL flags */
181 handle_eal_info_request(const char *cmd, const char *params __rte_unused,
182 struct rte_tel_data *d)
188 if (strcmp(cmd, EAL_PARAM_REQ) == 0)
193 rte_tel_data_start_array(d, RTE_TEL_STRING_VAL);
194 if (args == NULL || args[0] == NULL)
197 for ( ; args[i] != NULL; i++)
198 used = rte_tel_data_add_array_string(d, args[i]);
203 eal_save_args(int argc, char **argv)
207 rte_telemetry_register_cmd(EAL_PARAM_REQ, handle_eal_info_request,
208 "Returns EAL commandline parameters used. Takes no parameters");
209 rte_telemetry_register_cmd(EAL_APP_PARAM_REQ, handle_eal_info_request,
210 "Returns app commandline parameters used. Takes no parameters");
212 /* clone argv to report out later. We overprovision, but
213 * this does not waste huge amounts of memory
215 eal_args = calloc(argc + 1, sizeof(*eal_args));
216 if (eal_args == NULL)
219 for (i = 0; i < argc; i++) {
220 eal_args[i] = strdup(argv[i]);
221 if (strcmp(argv[i], "--") == 0)
224 eal_args[i++] = NULL; /* always finish with NULL */
226 /* allow reporting of any app args we know about too */
230 eal_app_args = calloc(argc - i + 1, sizeof(*eal_args));
231 if (eal_app_args == NULL)
234 for (j = 0; i < argc; j++, i++)
235 eal_app_args[j] = strdup(argv[i]);
236 eal_app_args[j] = NULL;
243 eal_option_device_add(enum rte_devtype type, const char *optarg)
245 struct device_option *devopt;
249 optlen = strlen(optarg) + 1;
250 devopt = calloc(1, sizeof(*devopt) + optlen);
251 if (devopt == NULL) {
252 RTE_LOG(ERR, EAL, "Unable to allocate device option\n");
257 ret = strlcpy(devopt->arg, optarg, optlen);
259 RTE_LOG(ERR, EAL, "Unable to copy device option\n");
263 TAILQ_INSERT_TAIL(&devopt_list, devopt, next);
268 eal_option_device_parse(void)
270 struct device_option *devopt;
274 TAILQ_FOREACH_SAFE(devopt, &devopt_list, next, tmp) {
276 ret = rte_devargs_add(devopt->type, devopt->arg);
278 RTE_LOG(ERR, EAL, "Unable to parse device '%s'\n",
281 TAILQ_REMOVE(&devopt_list, devopt, next);
288 eal_get_hugefile_prefix(void)
290 const struct internal_config *internal_conf =
291 eal_get_internal_configuration();
293 if (internal_conf->hugefile_prefix != NULL)
294 return internal_conf->hugefile_prefix;
295 return HUGEFILE_PREFIX_DEFAULT;
299 eal_reset_internal_config(struct internal_config *internal_cfg)
303 internal_cfg->memory = 0;
304 internal_cfg->force_nrank = 0;
305 internal_cfg->force_nchannel = 0;
306 internal_cfg->hugefile_prefix = NULL;
307 internal_cfg->hugepage_dir = NULL;
308 internal_cfg->force_sockets = 0;
309 /* zero out the NUMA config */
310 for (i = 0; i < RTE_MAX_NUMA_NODES; i++)
311 internal_cfg->socket_mem[i] = 0;
312 internal_cfg->force_socket_limits = 0;
313 /* zero out the NUMA limits config */
314 for (i = 0; i < RTE_MAX_NUMA_NODES; i++)
315 internal_cfg->socket_limit[i] = 0;
316 /* zero out hugedir descriptors */
317 for (i = 0; i < MAX_HUGEPAGE_SIZES; i++) {
318 memset(&internal_cfg->hugepage_info[i], 0,
319 sizeof(internal_cfg->hugepage_info[0]));
320 internal_cfg->hugepage_info[i].lock_descriptor = -1;
322 internal_cfg->base_virtaddr = 0;
325 internal_cfg->syslog_facility = LOG_DAEMON;
328 /* if set to NONE, interrupt mode is determined automatically */
329 internal_cfg->vfio_intr_mode = RTE_INTR_MODE_NONE;
331 #ifdef RTE_LIBEAL_USE_HPET
332 internal_cfg->no_hpet = 0;
334 internal_cfg->no_hpet = 1;
336 internal_cfg->vmware_tsc_map = 0;
337 internal_cfg->create_uio_dev = 0;
338 internal_cfg->iova_mode = RTE_IOVA_DC;
339 internal_cfg->user_mbuf_pool_ops_name = NULL;
340 CPU_ZERO(&internal_cfg->ctrl_cpuset);
341 internal_cfg->init_complete = 0;
345 eal_plugin_add(const char *path)
347 struct shared_driver *solib;
349 solib = malloc(sizeof(*solib));
351 RTE_LOG(ERR, EAL, "malloc(solib) failed\n");
354 memset(solib, 0, sizeof(*solib));
355 strlcpy(solib->name, path, PATH_MAX-1);
356 solib->name[PATH_MAX-1] = 0;
357 TAILQ_INSERT_TAIL(&solib_list, solib, next);
362 #ifndef RTE_EXEC_ENV_WINDOWS
364 eal_plugindir_init(const char *path)
367 struct dirent *dent = NULL;
368 char sopath[PATH_MAX];
370 if (path == NULL || *path == '\0')
375 RTE_LOG(ERR, EAL, "failed to open directory %s: %s\n",
376 path, strerror(errno));
380 while ((dent = readdir(d)) != NULL) {
383 snprintf(sopath, sizeof(sopath), "%s/%s", path, dent->d_name);
385 if (!(stat(sopath, &sb) == 0 && S_ISREG(sb.st_mode)))
388 if (eal_plugin_add(sopath) == -1)
393 /* XXX this ignores failures from readdir() itself */
394 return (dent == NULL) ? 0 : -1;
399 eal_plugins_init(void)
401 #ifndef RTE_EXEC_ENV_WINDOWS
402 struct shared_driver *solib = NULL;
405 if (*default_solib_dir != '\0' && stat(default_solib_dir, &sb) == 0 &&
407 eal_plugin_add(default_solib_dir);
409 TAILQ_FOREACH(solib, &solib_list, next) {
411 if (stat(solib->name, &sb) == 0 && S_ISDIR(sb.st_mode)) {
412 if (eal_plugindir_init(solib->name) == -1) {
414 "Cannot init plugin directory %s\n",
419 RTE_LOG(DEBUG, EAL, "open shared lib %s\n",
421 solib->lib_handle = dlopen(solib->name, RTLD_NOW);
422 if (solib->lib_handle == NULL) {
423 RTE_LOG(ERR, EAL, "%s\n", dlerror());
434 * Parse the coremask given as argument (hexadecimal string) and fill
435 * the global configuration (core role and core count) with the parsed
438 static int xdigit2val(unsigned char c)
452 eal_parse_service_coremask(const char *coremask)
454 struct rte_config *cfg = rte_eal_get_configuration();
456 unsigned int count = 0;
459 uint32_t taken_lcore_count = 0;
461 if (coremask == NULL)
463 /* Remove all blank characters ahead and after .
464 * Remove 0x/0X if exists.
466 while (isblank(*coremask))
468 if (coremask[0] == '0' && ((coremask[1] == 'x')
469 || (coremask[1] == 'X')))
471 i = strlen(coremask);
472 while ((i > 0) && isblank(coremask[i - 1]))
478 for (i = i - 1; i >= 0 && idx < RTE_MAX_LCORE; i--) {
480 if (isxdigit(c) == 0) {
481 /* invalid characters */
485 for (j = 0; j < BITS_PER_HEX && idx < RTE_MAX_LCORE;
487 if ((1 << j) & val) {
488 /* handle master lcore already parsed */
489 uint32_t lcore = idx;
490 if (master_lcore_parsed &&
491 cfg->master_lcore == lcore) {
493 "lcore %u is master lcore, cannot use as service core\n",
498 if (eal_cpu_detected(idx) == 0) {
500 "lcore %u unavailable\n", idx);
504 if (cfg->lcore_role[idx] == ROLE_RTE)
507 lcore_config[idx].core_role = ROLE_SERVICE;
514 if (coremask[i] != '0')
517 for (; idx < RTE_MAX_LCORE; idx++)
518 lcore_config[idx].core_index = -1;
523 if (core_parsed && taken_lcore_count != count) {
524 RTE_LOG(WARNING, EAL,
525 "Not all service cores are in the coremask. "
526 "Please ensure -c or -l includes service cores\n");
529 cfg->service_lcore_count = count;
534 eal_service_cores_parsed(void)
537 for (idx = 0; idx < RTE_MAX_LCORE; idx++) {
538 if (lcore_config[idx].core_role == ROLE_SERVICE)
545 update_lcore_config(int *cores)
547 struct rte_config *cfg = rte_eal_get_configuration();
548 unsigned int count = 0;
552 for (i = 0; i < RTE_MAX_LCORE; i++) {
553 if (cores[i] != -1) {
554 if (eal_cpu_detected(i) == 0) {
555 RTE_LOG(ERR, EAL, "lcore %u unavailable\n", i);
559 cfg->lcore_role[i] = ROLE_RTE;
562 cfg->lcore_role[i] = ROLE_OFF;
564 lcore_config[i].core_index = cores[i];
567 cfg->lcore_count = count;
572 eal_parse_coremask(const char *coremask, int *cores)
579 for (idx = 0; idx < RTE_MAX_LCORE; idx++)
583 /* Remove all blank characters ahead and after .
584 * Remove 0x/0X if exists.
586 while (isblank(*coremask))
588 if (coremask[0] == '0' && ((coremask[1] == 'x')
589 || (coremask[1] == 'X')))
591 i = strlen(coremask);
592 while ((i > 0) && isblank(coremask[i - 1]))
597 for (i = i - 1; i >= 0 && idx < RTE_MAX_LCORE; i--) {
599 if (isxdigit(c) == 0) {
600 /* invalid characters */
604 for (j = 0; j < BITS_PER_HEX && idx < RTE_MAX_LCORE; j++, idx++)
606 if ((1 << j) & val) {
613 if (coremask[i] != '0')
621 eal_parse_service_corelist(const char *corelist)
623 struct rte_config *cfg = rte_eal_get_configuration();
628 uint32_t taken_lcore_count = 0;
630 if (corelist == NULL)
633 /* Remove all blank characters ahead and after */
634 while (isblank(*corelist))
636 i = strlen(corelist);
637 while ((i > 0) && isblank(corelist[i - 1]))
640 /* Get list of cores */
643 while (isblank(*corelist))
645 if (*corelist == '\0')
648 idx = strtoul(corelist, &end, 10);
649 if (errno || end == NULL)
651 while (isblank(*end))
655 } else if ((*end == ',') || (*end == '\0')) {
657 if (min == RTE_MAX_LCORE)
659 for (idx = min; idx <= max; idx++) {
660 if (cfg->lcore_role[idx] != ROLE_SERVICE) {
661 /* handle master lcore already parsed */
662 uint32_t lcore = idx;
663 if (cfg->master_lcore == lcore &&
664 master_lcore_parsed) {
666 "Error: lcore %u is master lcore, cannot use as service core\n",
670 if (cfg->lcore_role[idx] == ROLE_RTE)
673 lcore_config[idx].core_role =
682 } while (*end != '\0');
687 if (core_parsed && taken_lcore_count != count) {
688 RTE_LOG(WARNING, EAL,
689 "Not all service cores were in the coremask. "
690 "Please ensure -c or -l includes service cores\n");
697 eal_parse_corelist(const char *corelist, int *cores)
704 for (idx = 0; idx < RTE_MAX_LCORE; idx++)
707 /* Remove all blank characters ahead */
708 while (isblank(*corelist))
711 /* Get list of cores */
714 while (isblank(*corelist))
716 if (*corelist == '\0')
719 idx = strtol(corelist, &end, 10);
720 if (errno || end == NULL)
722 if (idx < 0 || idx >= RTE_MAX_LCORE)
724 while (isblank(*end))
728 } else if ((*end == ',') || (*end == '\0')) {
730 if (min == RTE_MAX_LCORE)
732 for (idx = min; idx <= max; idx++) {
733 if (cores[idx] == -1) {
742 } while (*end != '\0');
749 /* Changes the lcore id of the master thread */
751 eal_parse_master_lcore(const char *arg)
754 struct rte_config *cfg = rte_eal_get_configuration();
757 cfg->master_lcore = (uint32_t) strtol(arg, &parsing_end, 0);
758 if (errno || parsing_end[0] != 0)
760 if (cfg->master_lcore >= RTE_MAX_LCORE)
762 master_lcore_parsed = 1;
764 /* ensure master core is not used as service core */
765 if (lcore_config[cfg->master_lcore].core_role == ROLE_SERVICE) {
767 "Error: Master lcore is used as a service core\n");
775 * Parse elem, the elem could be single number/range or '(' ')' group
776 * 1) A single number elem, it's just a simple digit. e.g. 9
777 * 2) A single range elem, two digits with a '-' between. e.g. 2-6
778 * 3) A group elem, combines multiple 1) or 2) with '( )'. e.g (0,2-4,6)
779 * Within group elem, '-' used for a range separator;
780 * ',' used for a single number.
783 eal_parse_set(const char *input, rte_cpuset_t *set)
786 const char *str = input;
792 while (isblank(*str))
795 /* only digit or left bracket is qualify for start point */
796 if ((!isdigit(*str) && *str != '(') || *str == '\0')
799 /* process single number or single range of number */
802 idx = strtoul(str, &end, 10);
803 if (errno || end == NULL || idx >= CPU_SETSIZE)
806 while (isblank(*end))
812 /* process single <number>-<number> */
814 while (isblank(*end))
820 idx = strtoul(end, &end, 10);
821 if (errno || end == NULL || idx >= CPU_SETSIZE)
824 while (isblank(*end))
826 if (*end != ',' && *end != '\0')
830 if (*end != ',' && *end != '\0' &&
834 for (idx = RTE_MIN(min, max);
835 idx <= RTE_MAX(min, max); idx++)
842 /* process set within bracket */
844 while (isblank(*str))
852 /* go ahead to the first digit */
853 while (isblank(*str))
858 /* get the digit value */
860 idx = strtoul(str, &end, 10);
861 if (errno || end == NULL || idx >= CPU_SETSIZE)
864 /* go ahead to separator '-',',' and ')' */
865 while (isblank(*end))
868 if (min == RTE_MAX_LCORE)
870 else /* avoid continuous '-' */
872 } else if ((*end == ',') || (*end == ')')) {
874 if (min == RTE_MAX_LCORE)
876 for (idx = RTE_MIN(min, max);
877 idx <= RTE_MAX(min, max); idx++)
885 } while (*end != '\0' && *end != ')');
888 * to avoid failure that tail blank makes end character check fail
889 * in eal_parse_lcores( )
891 while (isblank(*str))
898 check_cpuset(rte_cpuset_t *set)
902 for (idx = 0; idx < CPU_SETSIZE; idx++) {
903 if (!CPU_ISSET(idx, set))
906 if (eal_cpu_detected(idx) == 0) {
907 RTE_LOG(ERR, EAL, "core %u "
908 "unavailable\n", idx);
916 * The format pattern: --lcores='<lcores[@cpus]>[<,lcores[@cpus]>...]'
917 * lcores, cpus could be a single digit/range or a group.
918 * '(' and ')' are necessary if it's a group.
919 * If not supply '@cpus', the value of cpus uses the same as lcores.
920 * e.g. '1,2@(5-7),(3-5)@(0,2),(0,6),7-8' means start 9 EAL thread as below
921 * lcore 0 runs on cpuset 0x41 (cpu 0,6)
922 * lcore 1 runs on cpuset 0x2 (cpu 1)
923 * lcore 2 runs on cpuset 0xe0 (cpu 5,6,7)
924 * lcore 3,4,5 runs on cpuset 0x5 (cpu 0,2)
925 * lcore 6 runs on cpuset 0x41 (cpu 0,6)
926 * lcore 7 runs on cpuset 0x80 (cpu 7)
927 * lcore 8 runs on cpuset 0x100 (cpu 8)
930 eal_parse_lcores(const char *lcores)
932 struct rte_config *cfg = rte_eal_get_configuration();
933 rte_cpuset_t lcore_set;
934 unsigned int set_count;
937 const char *lcore_start = NULL;
938 const char *end = NULL;
947 /* Remove all blank characters ahead and after */
948 while (isblank(*lcores))
953 /* Reset lcore config */
954 for (idx = 0; idx < RTE_MAX_LCORE; idx++) {
955 cfg->lcore_role[idx] = ROLE_OFF;
956 lcore_config[idx].core_index = -1;
957 CPU_ZERO(&lcore_config[idx].cpuset);
960 /* Get list of cores */
962 while (isblank(*lcores))
969 /* record lcore_set start point */
970 lcore_start = lcores;
972 /* go across a complete bracket */
973 if (*lcore_start == '(') {
974 lcores += strcspn(lcores, ")");
975 if (*lcores++ == '\0')
979 /* scan the separator '@', ','(next) or '\0'(finish) */
980 lcores += strcspn(lcores, "@,");
982 if (*lcores == '@') {
983 /* explicit assign cpuset and update the end cursor */
984 offset = eal_parse_set(lcores + 1, &cpuset);
987 end = lcores + 1 + offset;
988 } else { /* ',' or '\0' */
989 /* haven't given cpuset, current loop done */
992 /* go back to check <number>-<number> */
993 offset = strcspn(lcore_start, "(-");
994 if (offset < (end - lcore_start) &&
995 *(lcore_start + offset) != '(')
999 if (*end != ',' && *end != '\0')
1002 /* parse lcore_set from start point */
1003 if (eal_parse_set(lcore_start, &lcore_set) < 0)
1006 /* without '@', by default using lcore_set as cpuset */
1008 rte_memcpy(&cpuset, &lcore_set, sizeof(cpuset));
1010 set_count = CPU_COUNT(&lcore_set);
1011 /* start to update lcore_set */
1012 for (idx = 0; idx < RTE_MAX_LCORE; idx++) {
1013 if (!CPU_ISSET(idx, &lcore_set))
1017 if (cfg->lcore_role[idx] != ROLE_RTE) {
1018 lcore_config[idx].core_index = count;
1019 cfg->lcore_role[idx] = ROLE_RTE;
1025 CPU_SET(idx, &cpuset);
1028 if (check_cpuset(&cpuset) < 0)
1030 rte_memcpy(&lcore_config[idx].cpuset, &cpuset,
1031 sizeof(rte_cpuset_t));
1034 /* some cores from the lcore_set can't be handled by EAL */
1039 } while (*end != '\0');
1044 cfg->lcore_count = count;
1052 #ifndef RTE_EXEC_ENV_WINDOWS
1054 eal_parse_syslog(const char *facility, struct internal_config *conf)
1057 static const struct {
1061 { "auth", LOG_AUTH },
1062 { "cron", LOG_CRON },
1063 { "daemon", LOG_DAEMON },
1065 { "kern", LOG_KERN },
1067 { "mail", LOG_MAIL },
1068 { "news", LOG_NEWS },
1069 { "syslog", LOG_SYSLOG },
1070 { "user", LOG_USER },
1071 { "uucp", LOG_UUCP },
1072 { "local0", LOG_LOCAL0 },
1073 { "local1", LOG_LOCAL1 },
1074 { "local2", LOG_LOCAL2 },
1075 { "local3", LOG_LOCAL3 },
1076 { "local4", LOG_LOCAL4 },
1077 { "local5", LOG_LOCAL5 },
1078 { "local6", LOG_LOCAL6 },
1079 { "local7", LOG_LOCAL7 },
1083 for (i = 0; map[i].name; i++) {
1084 if (!strcmp(facility, map[i].name)) {
1085 conf->syslog_facility = map[i].value;
1094 eal_parse_log_priority(const char *level)
1096 static const char * const levels[] = {
1097 [RTE_LOG_EMERG] = "emergency",
1098 [RTE_LOG_ALERT] = "alert",
1099 [RTE_LOG_CRIT] = "critical",
1100 [RTE_LOG_ERR] = "error",
1101 [RTE_LOG_WARNING] = "warning",
1102 [RTE_LOG_NOTICE] = "notice",
1103 [RTE_LOG_INFO] = "info",
1104 [RTE_LOG_DEBUG] = "debug",
1106 size_t len = strlen(level);
1114 /* look for named values, skip 0 which is not a valid level */
1115 for (i = 1; i < RTE_DIM(levels); i++) {
1116 if (strncmp(levels[i], level, len) == 0)
1120 /* not a string, maybe it is numeric */
1122 tmp = strtoul(level, &end, 0);
1124 /* check for errors */
1125 if (errno != 0 || end == NULL || *end != '\0' ||
1133 eal_parse_log_level(const char *arg)
1135 const char *pattern = NULL;
1136 const char *regex = NULL;
1144 if ((level = strchr(str, ','))) {
1147 } else if ((level = strchr(str, ':'))) {
1154 priority = eal_parse_log_priority(level);
1156 fprintf(stderr, "invalid log priority: %s\n", level);
1161 if (rte_log_set_level_regexp(regex, priority) < 0) {
1162 fprintf(stderr, "cannot set log level %s,%d\n",
1166 if (rte_log_save_regexp(regex, priority) < 0)
1168 } else if (pattern) {
1169 if (rte_log_set_level_pattern(pattern, priority) < 0) {
1170 fprintf(stderr, "cannot set log level %s:%d\n",
1174 if (rte_log_save_pattern(pattern, priority) < 0)
1177 rte_log_set_global_level(priority);
1188 static enum rte_proc_type_t
1189 eal_parse_proc_type(const char *arg)
1191 if (strncasecmp(arg, "primary", sizeof("primary")) == 0)
1192 return RTE_PROC_PRIMARY;
1193 if (strncasecmp(arg, "secondary", sizeof("secondary")) == 0)
1194 return RTE_PROC_SECONDARY;
1195 if (strncasecmp(arg, "auto", sizeof("auto")) == 0)
1196 return RTE_PROC_AUTO;
1198 return RTE_PROC_INVALID;
1202 eal_parse_iova_mode(const char *name)
1205 struct internal_config *internal_conf =
1206 eal_get_internal_configuration();
1211 if (!strcmp("pa", name))
1213 else if (!strcmp("va", name))
1218 internal_conf->iova_mode = mode;
1223 eal_parse_base_virtaddr(const char *arg)
1227 struct internal_config *internal_conf =
1228 eal_get_internal_configuration();
1231 addr = strtoull(arg, &end, 16);
1233 /* check for errors */
1234 if ((errno != 0) || (arg[0] == '\0') || end == NULL || (*end != '\0'))
1237 /* make sure we don't exceed 32-bit boundary on 32-bit target */
1239 if (addr >= UINTPTR_MAX)
1243 /* align the addr on 16M boundary, 16MB is the minimum huge page
1244 * size on IBM Power architecture. If the addr is aligned to 16MB,
1245 * it can align to 2MB for x86. So this alignment can also be used
1246 * on x86 and other architectures.
1248 internal_conf->base_virtaddr =
1249 RTE_PTR_ALIGN_CEIL((uintptr_t)addr, (size_t)RTE_PGSIZE_16M);
1254 /* caller is responsible for freeing the returned string */
1256 available_cores(void)
1264 /* find the first available cpu */
1265 for (idx = 0; idx < RTE_MAX_LCORE; idx++) {
1266 if (eal_cpu_detected(idx) == 0)
1270 if (idx >= RTE_MAX_LCORE)
1273 /* first sequence */
1274 if (asprintf(&str, "%d", idx) < 0)
1279 for (idx++ ; idx < RTE_MAX_LCORE; idx++) {
1280 if (eal_cpu_detected(idx) == 0)
1283 if (idx == previous + 1) {
1289 /* finish current sequence */
1291 if (asprintf(&tmp, "%s-%d", str, previous) < 0) {
1300 if (asprintf(&tmp, "%s,%d", str, idx) < 0) {
1310 /* finish last sequence */
1312 if (asprintf(&tmp, "%s-%d", str, previous) < 0) {
1324 eal_parse_common_option(int opt, const char *optarg,
1325 struct internal_config *conf)
1335 if (eal_option_device_add(RTE_DEVTYPE_BLACKLISTED_PCI,
1345 if (eal_option_device_add(RTE_DEVTYPE_WHITELISTED_PCI,
1353 int lcore_indexes[RTE_MAX_LCORE];
1355 if (eal_service_cores_parsed())
1356 RTE_LOG(WARNING, EAL,
1357 "Service cores parsed before dataplane cores. Please ensure -c is before -s or -S\n");
1358 if (eal_parse_coremask(optarg, lcore_indexes) < 0) {
1359 RTE_LOG(ERR, EAL, "invalid coremask syntax\n");
1362 if (update_lcore_config(lcore_indexes) < 0) {
1363 char *available = available_cores();
1366 "invalid coremask, please check specified cores are part of %s\n",
1373 RTE_LOG(ERR, EAL, "Option -c is ignored, because (%s) is set!\n",
1374 (core_parsed == LCORE_OPT_LST) ? "-l" :
1375 (core_parsed == LCORE_OPT_MAP) ? "--lcore" :
1380 core_parsed = LCORE_OPT_MSK;
1385 int lcore_indexes[RTE_MAX_LCORE];
1387 if (eal_service_cores_parsed())
1388 RTE_LOG(WARNING, EAL,
1389 "Service cores parsed before dataplane cores. Please ensure -l is before -s or -S\n");
1391 if (eal_parse_corelist(optarg, lcore_indexes) < 0) {
1392 RTE_LOG(ERR, EAL, "invalid core list syntax\n");
1395 if (update_lcore_config(lcore_indexes) < 0) {
1396 char *available = available_cores();
1399 "invalid core list, please check specified cores are part of %s\n",
1406 RTE_LOG(ERR, EAL, "Option -l is ignored, because (%s) is set!\n",
1407 (core_parsed == LCORE_OPT_MSK) ? "-c" :
1408 (core_parsed == LCORE_OPT_MAP) ? "--lcore" :
1413 core_parsed = LCORE_OPT_LST;
1416 /* service coremask */
1418 if (eal_parse_service_coremask(optarg) < 0) {
1419 RTE_LOG(ERR, EAL, "invalid service coremask\n");
1423 /* service corelist */
1425 if (eal_parse_service_corelist(optarg) < 0) {
1426 RTE_LOG(ERR, EAL, "invalid service core list\n");
1430 /* size of memory */
1432 conf->memory = atoi(optarg);
1433 conf->memory *= 1024ULL;
1434 conf->memory *= 1024ULL;
1437 /* force number of channels */
1439 conf->force_nchannel = atoi(optarg);
1440 if (conf->force_nchannel == 0) {
1441 RTE_LOG(ERR, EAL, "invalid channel number\n");
1445 /* force number of ranks */
1447 conf->force_nrank = atoi(optarg);
1448 if (conf->force_nrank == 0 ||
1449 conf->force_nrank > 16) {
1450 RTE_LOG(ERR, EAL, "invalid rank number\n");
1454 /* force loading of external driver */
1456 if (eal_plugin_add(optarg) == -1)
1460 /* since message is explicitly requested by user, we
1461 * write message at highest log level so it can always
1463 * even if info or warning messages are disabled */
1464 RTE_LOG(CRIT, EAL, "RTE Version: '%s'\n", rte_version());
1468 case OPT_HUGE_UNLINK_NUM:
1469 conf->hugepage_unlink = 1;
1472 case OPT_NO_HUGE_NUM:
1473 conf->no_hugetlbfs = 1;
1474 /* no-huge is legacy mem */
1475 conf->legacy_mem = 1;
1478 case OPT_NO_PCI_NUM:
1482 case OPT_NO_HPET_NUM:
1486 case OPT_VMWARE_TSC_MAP_NUM:
1487 conf->vmware_tsc_map = 1;
1490 case OPT_NO_SHCONF_NUM:
1491 conf->no_shconf = 1;
1494 case OPT_IN_MEMORY_NUM:
1495 conf->in_memory = 1;
1496 /* in-memory is a superset of noshconf and huge-unlink */
1497 conf->no_shconf = 1;
1498 conf->hugepage_unlink = 1;
1501 case OPT_PROC_TYPE_NUM:
1502 conf->process_type = eal_parse_proc_type(optarg);
1505 case OPT_MASTER_LCORE_NUM:
1506 if (eal_parse_master_lcore(optarg) < 0) {
1507 RTE_LOG(ERR, EAL, "invalid parameter for --"
1508 OPT_MASTER_LCORE "\n");
1514 if (eal_option_device_add(RTE_DEVTYPE_VIRTUAL,
1520 #ifndef RTE_EXEC_ENV_WINDOWS
1521 case OPT_SYSLOG_NUM:
1522 if (eal_parse_syslog(optarg, conf) < 0) {
1523 RTE_LOG(ERR, EAL, "invalid parameters for --"
1530 case OPT_LOG_LEVEL_NUM: {
1531 if (eal_parse_log_level(optarg) < 0) {
1533 "invalid parameters for --"
1534 OPT_LOG_LEVEL "\n");
1540 #ifndef RTE_EXEC_ENV_WINDOWS
1541 case OPT_TRACE_NUM: {
1542 if (eal_trace_args_save(optarg) < 0) {
1543 RTE_LOG(ERR, EAL, "invalid parameters for --"
1550 case OPT_TRACE_DIR_NUM: {
1551 if (eal_trace_dir_args_save(optarg) < 0) {
1552 RTE_LOG(ERR, EAL, "invalid parameters for --"
1553 OPT_TRACE_DIR "\n");
1559 case OPT_TRACE_BUF_SIZE_NUM: {
1560 if (eal_trace_bufsz_args_save(optarg) < 0) {
1561 RTE_LOG(ERR, EAL, "invalid parameters for --"
1562 OPT_TRACE_BUF_SIZE "\n");
1568 case OPT_TRACE_MODE_NUM: {
1569 if (eal_trace_mode_args_save(optarg) < 0) {
1570 RTE_LOG(ERR, EAL, "invalid parameters for --"
1571 OPT_TRACE_MODE "\n");
1576 #endif /* !RTE_EXEC_ENV_WINDOWS */
1578 case OPT_LCORES_NUM:
1579 if (eal_parse_lcores(optarg) < 0) {
1580 RTE_LOG(ERR, EAL, "invalid parameter for --"
1586 RTE_LOG(ERR, EAL, "Option --lcore is ignored, because (%s) is set!\n",
1587 (core_parsed == LCORE_OPT_LST) ? "-l" :
1588 (core_parsed == LCORE_OPT_MSK) ? "-c" :
1593 core_parsed = LCORE_OPT_MAP;
1595 case OPT_LEGACY_MEM_NUM:
1596 conf->legacy_mem = 1;
1598 case OPT_SINGLE_FILE_SEGMENTS_NUM:
1599 conf->single_file_segments = 1;
1601 case OPT_IOVA_MODE_NUM:
1602 if (eal_parse_iova_mode(optarg) < 0) {
1603 RTE_LOG(ERR, EAL, "invalid parameters for --"
1604 OPT_IOVA_MODE "\n");
1608 case OPT_BASE_VIRTADDR_NUM:
1609 if (eal_parse_base_virtaddr(optarg) < 0) {
1610 RTE_LOG(ERR, EAL, "invalid parameter for --"
1611 OPT_BASE_VIRTADDR "\n");
1615 case OPT_TELEMETRY_NUM:
1617 case OPT_NO_TELEMETRY_NUM:
1618 conf->no_telemetry = 1;
1621 /* don't know what to do, leave this to caller */
1629 RTE_LOG(ERR, EAL, "Options blacklist (-b) and whitelist (-w) "
1630 "cannot be used at the same time\n");
1635 eal_auto_detect_cores(struct rte_config *cfg)
1637 unsigned int lcore_id;
1638 unsigned int removed = 0;
1639 rte_cpuset_t affinity_set;
1641 if (pthread_getaffinity_np(pthread_self(), sizeof(rte_cpuset_t),
1643 CPU_ZERO(&affinity_set);
1645 for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
1646 if (cfg->lcore_role[lcore_id] == ROLE_RTE &&
1647 !CPU_ISSET(lcore_id, &affinity_set)) {
1648 cfg->lcore_role[lcore_id] = ROLE_OFF;
1653 cfg->lcore_count -= removed;
1657 compute_ctrl_threads_cpuset(struct internal_config *internal_cfg)
1659 rte_cpuset_t *cpuset = &internal_cfg->ctrl_cpuset;
1660 rte_cpuset_t default_set;
1661 unsigned int lcore_id;
1663 for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
1664 if (rte_lcore_has_role(lcore_id, ROLE_OFF))
1666 RTE_CPU_OR(cpuset, cpuset, &lcore_config[lcore_id].cpuset);
1668 RTE_CPU_NOT(cpuset, cpuset);
1670 if (pthread_getaffinity_np(pthread_self(), sizeof(rte_cpuset_t),
1672 CPU_ZERO(&default_set);
1674 RTE_CPU_AND(cpuset, cpuset, &default_set);
1676 /* if no remaining cpu, use master lcore cpu affinity */
1677 if (!CPU_COUNT(cpuset)) {
1678 memcpy(cpuset, &lcore_config[rte_get_master_lcore()].cpuset,
1684 eal_cleanup_config(struct internal_config *internal_cfg)
1686 if (internal_cfg->hugefile_prefix != NULL)
1687 free(internal_cfg->hugefile_prefix);
1688 if (internal_cfg->hugepage_dir != NULL)
1689 free(internal_cfg->hugepage_dir);
1690 if (internal_cfg->user_mbuf_pool_ops_name != NULL)
1691 free(internal_cfg->user_mbuf_pool_ops_name);
1697 eal_adjust_config(struct internal_config *internal_cfg)
1700 struct rte_config *cfg = rte_eal_get_configuration();
1701 struct internal_config *internal_conf =
1702 eal_get_internal_configuration();
1705 eal_auto_detect_cores(cfg);
1707 if (internal_conf->process_type == RTE_PROC_AUTO)
1708 internal_conf->process_type = eal_proc_type_detect();
1710 /* default master lcore is the first one */
1711 if (!master_lcore_parsed) {
1712 cfg->master_lcore = rte_get_next_lcore(-1, 0, 0);
1713 if (cfg->master_lcore >= RTE_MAX_LCORE)
1715 lcore_config[cfg->master_lcore].core_role = ROLE_RTE;
1718 compute_ctrl_threads_cpuset(internal_cfg);
1720 /* if no memory amounts were requested, this will result in 0 and
1721 * will be overridden later, right after eal_hugepage_info_init() */
1722 for (i = 0; i < RTE_MAX_NUMA_NODES; i++)
1723 internal_cfg->memory += internal_cfg->socket_mem[i];
1729 eal_check_common_options(struct internal_config *internal_cfg)
1731 struct rte_config *cfg = rte_eal_get_configuration();
1732 const struct internal_config *internal_conf =
1733 eal_get_internal_configuration();
1735 if (cfg->lcore_role[cfg->master_lcore] != ROLE_RTE) {
1736 RTE_LOG(ERR, EAL, "Master lcore is not enabled for DPDK\n");
1740 if (internal_cfg->process_type == RTE_PROC_INVALID) {
1741 RTE_LOG(ERR, EAL, "Invalid process type specified\n");
1744 if (internal_cfg->hugefile_prefix != NULL &&
1745 strlen(internal_cfg->hugefile_prefix) < 1) {
1746 RTE_LOG(ERR, EAL, "Invalid length of --" OPT_FILE_PREFIX " option\n");
1749 if (internal_cfg->hugepage_dir != NULL &&
1750 strlen(internal_cfg->hugepage_dir) < 1) {
1751 RTE_LOG(ERR, EAL, "Invalid length of --" OPT_HUGE_DIR" option\n");
1754 if (internal_cfg->user_mbuf_pool_ops_name != NULL &&
1755 strlen(internal_cfg->user_mbuf_pool_ops_name) < 1) {
1756 RTE_LOG(ERR, EAL, "Invalid length of --" OPT_MBUF_POOL_OPS_NAME" option\n");
1759 if (index(eal_get_hugefile_prefix(), '%') != NULL) {
1760 RTE_LOG(ERR, EAL, "Invalid char, '%%', in --"OPT_FILE_PREFIX" "
1764 if (mem_parsed && internal_cfg->force_sockets == 1) {
1765 RTE_LOG(ERR, EAL, "Options -m and --"OPT_SOCKET_MEM" cannot "
1766 "be specified at the same time\n");
1769 if (internal_cfg->no_hugetlbfs && internal_cfg->force_sockets == 1) {
1770 RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_MEM" cannot "
1771 "be specified together with --"OPT_NO_HUGE"\n");
1774 if (internal_cfg->no_hugetlbfs && internal_cfg->hugepage_unlink &&
1775 !internal_cfg->in_memory) {
1776 RTE_LOG(ERR, EAL, "Option --"OPT_HUGE_UNLINK" cannot "
1777 "be specified together with --"OPT_NO_HUGE"\n");
1780 if (internal_conf->force_socket_limits && internal_conf->legacy_mem) {
1781 RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_LIMIT
1782 " is only supported in non-legacy memory mode\n");
1784 if (internal_cfg->single_file_segments &&
1785 internal_cfg->hugepage_unlink &&
1786 !internal_cfg->in_memory) {
1787 RTE_LOG(ERR, EAL, "Option --"OPT_SINGLE_FILE_SEGMENTS" is "
1788 "not compatible with --"OPT_HUGE_UNLINK"\n");
1791 if (internal_cfg->legacy_mem &&
1792 internal_cfg->in_memory) {
1793 RTE_LOG(ERR, EAL, "Option --"OPT_LEGACY_MEM" is not compatible "
1794 "with --"OPT_IN_MEMORY"\n");
1797 if (internal_cfg->legacy_mem && internal_cfg->match_allocations) {
1798 RTE_LOG(ERR, EAL, "Option --"OPT_LEGACY_MEM" is not compatible "
1799 "with --"OPT_MATCH_ALLOCATIONS"\n");
1802 if (internal_cfg->no_hugetlbfs && internal_cfg->match_allocations) {
1803 RTE_LOG(ERR, EAL, "Option --"OPT_NO_HUGE" is not compatible "
1804 "with --"OPT_MATCH_ALLOCATIONS"\n");
1807 if (internal_cfg->legacy_mem && internal_cfg->memory == 0) {
1808 RTE_LOG(NOTICE, EAL, "Static memory layout is selected, "
1809 "amount of reserved memory can be adjusted with "
1810 "-m or --"OPT_SOCKET_MEM"\n");
1817 eal_common_usage(void)
1819 printf("[options]\n\n"
1820 "EAL common options:\n"
1821 " -c COREMASK Hexadecimal bitmask of cores to run on\n"
1822 " -l CORELIST List of cores to run on\n"
1823 " The argument format is <c1>[-c2][,c3[-c4],...]\n"
1824 " where c1, c2, etc are core indexes between 0 and %d\n"
1825 " --"OPT_LCORES" COREMAP Map lcore set to physical cpu set\n"
1826 " The argument format is\n"
1827 " '<lcores[@cpus]>[<,lcores[@cpus]>...]'\n"
1828 " lcores and cpus list are grouped by '(' and ')'\n"
1829 " Within the group, '-' is used for range separator,\n"
1830 " ',' is used for single number separator.\n"
1831 " '( )' can be omitted for single element group,\n"
1832 " '@' can be omitted if cpus and lcores have the same value\n"
1833 " -s SERVICE COREMASK Hexadecimal bitmask of cores to be used as service cores\n"
1834 " --"OPT_MASTER_LCORE" ID Core ID that is used as master\n"
1835 " --"OPT_MBUF_POOL_OPS_NAME" Pool ops name for mbuf to use\n"
1836 " -n CHANNELS Number of memory channels\n"
1837 " -m MB Memory to allocate (see also --"OPT_SOCKET_MEM")\n"
1838 " -r RANKS Force number of memory ranks (don't detect)\n"
1839 " -b, --"OPT_PCI_BLACKLIST" Add a PCI device in black list.\n"
1840 " Prevent EAL from using this PCI device. The argument\n"
1841 " format is <domain:bus:devid.func>.\n"
1842 " -w, --"OPT_PCI_WHITELIST" Add a PCI device in white list.\n"
1843 " Only use the specified PCI devices. The argument format\n"
1844 " is <[domain:]bus:devid.func>. This option can be present\n"
1845 " several times (once per device).\n"
1846 " [NOTE: PCI whitelist cannot be used with -b option]\n"
1847 " --"OPT_VDEV" Add a virtual device.\n"
1848 " The argument format is <driver><id>[,key=val,...]\n"
1849 " (ex: --vdev=net_pcap0,iface=eth2).\n"
1850 " --"OPT_IOVA_MODE" Set IOVA mode. 'pa' for IOVA_PA\n"
1851 " 'va' for IOVA_VA\n"
1852 " -d LIB.so|DIR Add a driver or driver directory\n"
1853 " (can be used multiple times)\n"
1854 " --"OPT_VMWARE_TSC_MAP" Use VMware TSC map instead of native RDTSC\n"
1855 " --"OPT_PROC_TYPE" Type of this process (primary|secondary|auto)\n"
1856 #ifndef RTE_EXEC_ENV_WINDOWS
1857 " --"OPT_SYSLOG" Set syslog facility\n"
1859 " --"OPT_LOG_LEVEL"=<int> Set global log level\n"
1860 " --"OPT_LOG_LEVEL"=<type-match>:<int>\n"
1861 " Set specific log level\n"
1862 #ifndef RTE_EXEC_ENV_WINDOWS
1863 " --"OPT_TRACE"=<regex-match>\n"
1864 " Enable trace based on regular expression trace name.\n"
1865 " By default, the trace is disabled.\n"
1866 " User must specify this option to enable trace.\n"
1867 " --"OPT_TRACE_DIR"=<directory path>\n"
1868 " Specify trace directory for trace output.\n"
1869 " By default, trace output will created at\n"
1870 " $HOME directory and parameter must be\n"
1871 " specified once only.\n"
1872 " --"OPT_TRACE_BUF_SIZE"=<int>\n"
1873 " Specify maximum size of allocated memory\n"
1874 " for trace output for each thread. Valid\n"
1875 " unit can be either 'B|K|M' for 'Bytes',\n"
1876 " 'KBytes' and 'MBytes' respectively.\n"
1877 " Default is 1MB and parameter must be\n"
1878 " specified once only.\n"
1879 " --"OPT_TRACE_MODE"=<o[verwrite] | d[iscard]>\n"
1880 " Specify the mode of update of trace\n"
1881 " output file. Either update on a file can\n"
1882 " be wrapped or discarded when file size\n"
1883 " reaches its maximum limit.\n"
1884 " Default mode is 'overwrite' and parameter\n"
1885 " must be specified once only.\n"
1886 #endif /* !RTE_EXEC_ENV_WINDOWS */
1887 " -v Display version information on startup\n"
1888 " -h, --help This help\n"
1889 " --"OPT_IN_MEMORY" Operate entirely in memory. This will\n"
1890 " disable secondary process support\n"
1891 " --"OPT_BASE_VIRTADDR" Base virtual address\n"
1892 " --"OPT_TELEMETRY" Enable telemetry support (on by default)\n"
1893 " --"OPT_NO_TELEMETRY" Disable telemetry support\n"
1894 "\nEAL options for DEBUG use only:\n"
1895 " --"OPT_HUGE_UNLINK" Unlink hugepage files after init\n"
1896 " --"OPT_NO_HUGE" Use malloc instead of hugetlbfs\n"
1897 " --"OPT_NO_PCI" Disable PCI\n"
1898 " --"OPT_NO_HPET" Disable HPET\n"
1899 " --"OPT_NO_SHCONF" No shared config (mmap'd files)\n"
1900 "\n", RTE_MAX_LCORE);