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);
356 TAILQ_INSERT_TAIL(&solib_list, solib, next);
361 #ifndef RTE_EXEC_ENV_WINDOWS
363 eal_plugindir_init(const char *path)
366 struct dirent *dent = NULL;
367 char sopath[PATH_MAX];
369 if (path == NULL || *path == '\0')
374 RTE_LOG(ERR, EAL, "failed to open directory %s: %s\n",
375 path, strerror(errno));
379 while ((dent = readdir(d)) != NULL) {
381 int nlen = strnlen(dent->d_name, sizeof(dent->d_name));
383 /* check if name ends in .so */
384 if (strcmp(&dent->d_name[nlen - 3], ".so") != 0)
387 snprintf(sopath, sizeof(sopath), "%s/%s", path, dent->d_name);
389 /* if a regular file, add to list to load */
390 if (!(stat(sopath, &sb) == 0 && S_ISREG(sb.st_mode)))
393 if (eal_plugin_add(sopath) == -1)
398 /* XXX this ignores failures from readdir() itself */
399 return (dent == NULL) ? 0 : -1;
404 eal_plugins_init(void)
406 #ifndef RTE_EXEC_ENV_WINDOWS
407 struct shared_driver *solib = NULL;
410 if (*default_solib_dir != '\0' && stat(default_solib_dir, &sb) == 0 &&
412 eal_plugin_add(default_solib_dir);
414 TAILQ_FOREACH(solib, &solib_list, next) {
416 if (stat(solib->name, &sb) == 0 && S_ISDIR(sb.st_mode)) {
417 if (eal_plugindir_init(solib->name) == -1) {
419 "Cannot init plugin directory %s\n",
424 RTE_LOG(DEBUG, EAL, "open shared lib %s\n",
426 solib->lib_handle = dlopen(solib->name, RTLD_NOW);
427 if (solib->lib_handle == NULL) {
428 RTE_LOG(ERR, EAL, "%s\n", dlerror());
439 * Parse the coremask given as argument (hexadecimal string) and fill
440 * the global configuration (core role and core count) with the parsed
443 static int xdigit2val(unsigned char c)
457 eal_parse_service_coremask(const char *coremask)
459 struct rte_config *cfg = rte_eal_get_configuration();
461 unsigned int count = 0;
464 uint32_t taken_lcore_count = 0;
466 if (coremask == NULL)
468 /* Remove all blank characters ahead and after .
469 * Remove 0x/0X if exists.
471 while (isblank(*coremask))
473 if (coremask[0] == '0' && ((coremask[1] == 'x')
474 || (coremask[1] == 'X')))
476 i = strlen(coremask);
477 while ((i > 0) && isblank(coremask[i - 1]))
483 for (i = i - 1; i >= 0 && idx < RTE_MAX_LCORE; i--) {
485 if (isxdigit(c) == 0) {
486 /* invalid characters */
490 for (j = 0; j < BITS_PER_HEX && idx < RTE_MAX_LCORE;
492 if ((1 << j) & val) {
493 /* handle master lcore already parsed */
494 uint32_t lcore = idx;
495 if (master_lcore_parsed &&
496 cfg->master_lcore == lcore) {
498 "lcore %u is master lcore, cannot use as service core\n",
503 if (eal_cpu_detected(idx) == 0) {
505 "lcore %u unavailable\n", idx);
509 if (cfg->lcore_role[idx] == ROLE_RTE)
512 lcore_config[idx].core_role = ROLE_SERVICE;
519 if (coremask[i] != '0')
522 for (; idx < RTE_MAX_LCORE; idx++)
523 lcore_config[idx].core_index = -1;
528 if (core_parsed && taken_lcore_count != count) {
529 RTE_LOG(WARNING, EAL,
530 "Not all service cores are in the coremask. "
531 "Please ensure -c or -l includes service cores\n");
534 cfg->service_lcore_count = count;
539 eal_service_cores_parsed(void)
542 for (idx = 0; idx < RTE_MAX_LCORE; idx++) {
543 if (lcore_config[idx].core_role == ROLE_SERVICE)
550 update_lcore_config(int *cores)
552 struct rte_config *cfg = rte_eal_get_configuration();
553 unsigned int count = 0;
557 for (i = 0; i < RTE_MAX_LCORE; i++) {
558 if (cores[i] != -1) {
559 if (eal_cpu_detected(i) == 0) {
560 RTE_LOG(ERR, EAL, "lcore %u unavailable\n", i);
564 cfg->lcore_role[i] = ROLE_RTE;
567 cfg->lcore_role[i] = ROLE_OFF;
569 lcore_config[i].core_index = cores[i];
572 cfg->lcore_count = count;
577 eal_parse_coremask(const char *coremask, int *cores)
584 for (idx = 0; idx < RTE_MAX_LCORE; idx++)
588 /* Remove all blank characters ahead and after .
589 * Remove 0x/0X if exists.
591 while (isblank(*coremask))
593 if (coremask[0] == '0' && ((coremask[1] == 'x')
594 || (coremask[1] == 'X')))
596 i = strlen(coremask);
597 while ((i > 0) && isblank(coremask[i - 1]))
602 for (i = i - 1; i >= 0 && idx < RTE_MAX_LCORE; i--) {
604 if (isxdigit(c) == 0) {
605 /* invalid characters */
609 for (j = 0; j < BITS_PER_HEX && idx < RTE_MAX_LCORE; j++, idx++)
611 if ((1 << j) & val) {
618 if (coremask[i] != '0')
626 eal_parse_service_corelist(const char *corelist)
628 struct rte_config *cfg = rte_eal_get_configuration();
633 uint32_t taken_lcore_count = 0;
635 if (corelist == NULL)
638 /* Remove all blank characters ahead and after */
639 while (isblank(*corelist))
641 i = strlen(corelist);
642 while ((i > 0) && isblank(corelist[i - 1]))
645 /* Get list of cores */
648 while (isblank(*corelist))
650 if (*corelist == '\0')
653 idx = strtoul(corelist, &end, 10);
654 if (errno || end == NULL)
656 while (isblank(*end))
660 } else if ((*end == ',') || (*end == '\0')) {
662 if (min == RTE_MAX_LCORE)
664 for (idx = min; idx <= max; idx++) {
665 if (cfg->lcore_role[idx] != ROLE_SERVICE) {
666 /* handle master lcore already parsed */
667 uint32_t lcore = idx;
668 if (cfg->master_lcore == lcore &&
669 master_lcore_parsed) {
671 "Error: lcore %u is master lcore, cannot use as service core\n",
675 if (cfg->lcore_role[idx] == ROLE_RTE)
678 lcore_config[idx].core_role =
687 } while (*end != '\0');
692 if (core_parsed && taken_lcore_count != count) {
693 RTE_LOG(WARNING, EAL,
694 "Not all service cores were in the coremask. "
695 "Please ensure -c or -l includes service cores\n");
702 eal_parse_corelist(const char *corelist, int *cores)
709 for (idx = 0; idx < RTE_MAX_LCORE; idx++)
712 /* Remove all blank characters ahead */
713 while (isblank(*corelist))
716 /* Get list of cores */
719 while (isblank(*corelist))
721 if (*corelist == '\0')
724 idx = strtol(corelist, &end, 10);
725 if (errno || end == NULL)
727 if (idx < 0 || idx >= RTE_MAX_LCORE)
729 while (isblank(*end))
733 } else if ((*end == ',') || (*end == '\0')) {
735 if (min == RTE_MAX_LCORE)
737 for (idx = min; idx <= max; idx++) {
738 if (cores[idx] == -1) {
747 } while (*end != '\0');
754 /* Changes the lcore id of the master thread */
756 eal_parse_master_lcore(const char *arg)
759 struct rte_config *cfg = rte_eal_get_configuration();
762 cfg->master_lcore = (uint32_t) strtol(arg, &parsing_end, 0);
763 if (errno || parsing_end[0] != 0)
765 if (cfg->master_lcore >= RTE_MAX_LCORE)
767 master_lcore_parsed = 1;
769 /* ensure master core is not used as service core */
770 if (lcore_config[cfg->master_lcore].core_role == ROLE_SERVICE) {
772 "Error: Master lcore is used as a service core\n");
780 * Parse elem, the elem could be single number/range or '(' ')' group
781 * 1) A single number elem, it's just a simple digit. e.g. 9
782 * 2) A single range elem, two digits with a '-' between. e.g. 2-6
783 * 3) A group elem, combines multiple 1) or 2) with '( )'. e.g (0,2-4,6)
784 * Within group elem, '-' used for a range separator;
785 * ',' used for a single number.
788 eal_parse_set(const char *input, rte_cpuset_t *set)
791 const char *str = input;
797 while (isblank(*str))
800 /* only digit or left bracket is qualify for start point */
801 if ((!isdigit(*str) && *str != '(') || *str == '\0')
804 /* process single number or single range of number */
807 idx = strtoul(str, &end, 10);
808 if (errno || end == NULL || idx >= CPU_SETSIZE)
811 while (isblank(*end))
817 /* process single <number>-<number> */
819 while (isblank(*end))
825 idx = strtoul(end, &end, 10);
826 if (errno || end == NULL || idx >= CPU_SETSIZE)
829 while (isblank(*end))
831 if (*end != ',' && *end != '\0')
835 if (*end != ',' && *end != '\0' &&
839 for (idx = RTE_MIN(min, max);
840 idx <= RTE_MAX(min, max); idx++)
847 /* process set within bracket */
849 while (isblank(*str))
857 /* go ahead to the first digit */
858 while (isblank(*str))
863 /* get the digit value */
865 idx = strtoul(str, &end, 10);
866 if (errno || end == NULL || idx >= CPU_SETSIZE)
869 /* go ahead to separator '-',',' and ')' */
870 while (isblank(*end))
873 if (min == RTE_MAX_LCORE)
875 else /* avoid continuous '-' */
877 } else if ((*end == ',') || (*end == ')')) {
879 if (min == RTE_MAX_LCORE)
881 for (idx = RTE_MIN(min, max);
882 idx <= RTE_MAX(min, max); idx++)
890 } while (*end != '\0' && *end != ')');
893 * to avoid failure that tail blank makes end character check fail
894 * in eal_parse_lcores( )
896 while (isblank(*str))
903 check_cpuset(rte_cpuset_t *set)
907 for (idx = 0; idx < CPU_SETSIZE; idx++) {
908 if (!CPU_ISSET(idx, set))
911 if (eal_cpu_detected(idx) == 0) {
912 RTE_LOG(ERR, EAL, "core %u "
913 "unavailable\n", idx);
921 * The format pattern: --lcores='<lcores[@cpus]>[<,lcores[@cpus]>...]'
922 * lcores, cpus could be a single digit/range or a group.
923 * '(' and ')' are necessary if it's a group.
924 * If not supply '@cpus', the value of cpus uses the same as lcores.
925 * e.g. '1,2@(5-7),(3-5)@(0,2),(0,6),7-8' means start 9 EAL thread as below
926 * lcore 0 runs on cpuset 0x41 (cpu 0,6)
927 * lcore 1 runs on cpuset 0x2 (cpu 1)
928 * lcore 2 runs on cpuset 0xe0 (cpu 5,6,7)
929 * lcore 3,4,5 runs on cpuset 0x5 (cpu 0,2)
930 * lcore 6 runs on cpuset 0x41 (cpu 0,6)
931 * lcore 7 runs on cpuset 0x80 (cpu 7)
932 * lcore 8 runs on cpuset 0x100 (cpu 8)
935 eal_parse_lcores(const char *lcores)
937 struct rte_config *cfg = rte_eal_get_configuration();
938 rte_cpuset_t lcore_set;
939 unsigned int set_count;
942 const char *lcore_start = NULL;
943 const char *end = NULL;
952 /* Remove all blank characters ahead and after */
953 while (isblank(*lcores))
958 /* Reset lcore config */
959 for (idx = 0; idx < RTE_MAX_LCORE; idx++) {
960 cfg->lcore_role[idx] = ROLE_OFF;
961 lcore_config[idx].core_index = -1;
962 CPU_ZERO(&lcore_config[idx].cpuset);
965 /* Get list of cores */
967 while (isblank(*lcores))
974 /* record lcore_set start point */
975 lcore_start = lcores;
977 /* go across a complete bracket */
978 if (*lcore_start == '(') {
979 lcores += strcspn(lcores, ")");
980 if (*lcores++ == '\0')
984 /* scan the separator '@', ','(next) or '\0'(finish) */
985 lcores += strcspn(lcores, "@,");
987 if (*lcores == '@') {
988 /* explicit assign cpuset and update the end cursor */
989 offset = eal_parse_set(lcores + 1, &cpuset);
992 end = lcores + 1 + offset;
993 } else { /* ',' or '\0' */
994 /* haven't given cpuset, current loop done */
997 /* go back to check <number>-<number> */
998 offset = strcspn(lcore_start, "(-");
999 if (offset < (end - lcore_start) &&
1000 *(lcore_start + offset) != '(')
1004 if (*end != ',' && *end != '\0')
1007 /* parse lcore_set from start point */
1008 if (eal_parse_set(lcore_start, &lcore_set) < 0)
1011 /* without '@', by default using lcore_set as cpuset */
1013 rte_memcpy(&cpuset, &lcore_set, sizeof(cpuset));
1015 set_count = CPU_COUNT(&lcore_set);
1016 /* start to update lcore_set */
1017 for (idx = 0; idx < RTE_MAX_LCORE; idx++) {
1018 if (!CPU_ISSET(idx, &lcore_set))
1022 if (cfg->lcore_role[idx] != ROLE_RTE) {
1023 lcore_config[idx].core_index = count;
1024 cfg->lcore_role[idx] = ROLE_RTE;
1030 CPU_SET(idx, &cpuset);
1033 if (check_cpuset(&cpuset) < 0)
1035 rte_memcpy(&lcore_config[idx].cpuset, &cpuset,
1036 sizeof(rte_cpuset_t));
1039 /* some cores from the lcore_set can't be handled by EAL */
1044 } while (*end != '\0');
1049 cfg->lcore_count = count;
1057 #ifndef RTE_EXEC_ENV_WINDOWS
1059 eal_parse_syslog(const char *facility, struct internal_config *conf)
1062 static const struct {
1066 { "auth", LOG_AUTH },
1067 { "cron", LOG_CRON },
1068 { "daemon", LOG_DAEMON },
1070 { "kern", LOG_KERN },
1072 { "mail", LOG_MAIL },
1073 { "news", LOG_NEWS },
1074 { "syslog", LOG_SYSLOG },
1075 { "user", LOG_USER },
1076 { "uucp", LOG_UUCP },
1077 { "local0", LOG_LOCAL0 },
1078 { "local1", LOG_LOCAL1 },
1079 { "local2", LOG_LOCAL2 },
1080 { "local3", LOG_LOCAL3 },
1081 { "local4", LOG_LOCAL4 },
1082 { "local5", LOG_LOCAL5 },
1083 { "local6", LOG_LOCAL6 },
1084 { "local7", LOG_LOCAL7 },
1088 for (i = 0; map[i].name; i++) {
1089 if (!strcmp(facility, map[i].name)) {
1090 conf->syslog_facility = map[i].value;
1099 eal_parse_log_priority(const char *level)
1101 static const char * const levels[] = {
1102 [RTE_LOG_EMERG] = "emergency",
1103 [RTE_LOG_ALERT] = "alert",
1104 [RTE_LOG_CRIT] = "critical",
1105 [RTE_LOG_ERR] = "error",
1106 [RTE_LOG_WARNING] = "warning",
1107 [RTE_LOG_NOTICE] = "notice",
1108 [RTE_LOG_INFO] = "info",
1109 [RTE_LOG_DEBUG] = "debug",
1111 size_t len = strlen(level);
1119 /* look for named values, skip 0 which is not a valid level */
1120 for (i = 1; i < RTE_DIM(levels); i++) {
1121 if (strncmp(levels[i], level, len) == 0)
1125 /* not a string, maybe it is numeric */
1127 tmp = strtoul(level, &end, 0);
1129 /* check for errors */
1130 if (errno != 0 || end == NULL || *end != '\0' ||
1138 eal_parse_log_level(const char *arg)
1140 const char *pattern = NULL;
1141 const char *regex = NULL;
1149 if ((level = strchr(str, ','))) {
1152 } else if ((level = strchr(str, ':'))) {
1159 priority = eal_parse_log_priority(level);
1161 fprintf(stderr, "invalid log priority: %s\n", level);
1166 if (rte_log_set_level_regexp(regex, priority) < 0) {
1167 fprintf(stderr, "cannot set log level %s,%d\n",
1171 if (rte_log_save_regexp(regex, priority) < 0)
1173 } else if (pattern) {
1174 if (rte_log_set_level_pattern(pattern, priority) < 0) {
1175 fprintf(stderr, "cannot set log level %s:%d\n",
1179 if (rte_log_save_pattern(pattern, priority) < 0)
1182 rte_log_set_global_level(priority);
1193 static enum rte_proc_type_t
1194 eal_parse_proc_type(const char *arg)
1196 if (strncasecmp(arg, "primary", sizeof("primary")) == 0)
1197 return RTE_PROC_PRIMARY;
1198 if (strncasecmp(arg, "secondary", sizeof("secondary")) == 0)
1199 return RTE_PROC_SECONDARY;
1200 if (strncasecmp(arg, "auto", sizeof("auto")) == 0)
1201 return RTE_PROC_AUTO;
1203 return RTE_PROC_INVALID;
1207 eal_parse_iova_mode(const char *name)
1210 struct internal_config *internal_conf =
1211 eal_get_internal_configuration();
1216 if (!strcmp("pa", name))
1218 else if (!strcmp("va", name))
1223 internal_conf->iova_mode = mode;
1228 eal_parse_base_virtaddr(const char *arg)
1232 struct internal_config *internal_conf =
1233 eal_get_internal_configuration();
1236 addr = strtoull(arg, &end, 16);
1238 /* check for errors */
1239 if ((errno != 0) || (arg[0] == '\0') || end == NULL || (*end != '\0'))
1242 /* make sure we don't exceed 32-bit boundary on 32-bit target */
1244 if (addr >= UINTPTR_MAX)
1248 /* align the addr on 16M boundary, 16MB is the minimum huge page
1249 * size on IBM Power architecture. If the addr is aligned to 16MB,
1250 * it can align to 2MB for x86. So this alignment can also be used
1251 * on x86 and other architectures.
1253 internal_conf->base_virtaddr =
1254 RTE_PTR_ALIGN_CEIL((uintptr_t)addr, (size_t)RTE_PGSIZE_16M);
1259 /* caller is responsible for freeing the returned string */
1261 available_cores(void)
1269 /* find the first available cpu */
1270 for (idx = 0; idx < RTE_MAX_LCORE; idx++) {
1271 if (eal_cpu_detected(idx) == 0)
1275 if (idx >= RTE_MAX_LCORE)
1278 /* first sequence */
1279 if (asprintf(&str, "%d", idx) < 0)
1284 for (idx++ ; idx < RTE_MAX_LCORE; idx++) {
1285 if (eal_cpu_detected(idx) == 0)
1288 if (idx == previous + 1) {
1294 /* finish current sequence */
1296 if (asprintf(&tmp, "%s-%d", str, previous) < 0) {
1305 if (asprintf(&tmp, "%s,%d", str, idx) < 0) {
1315 /* finish last sequence */
1317 if (asprintf(&tmp, "%s-%d", str, previous) < 0) {
1329 eal_parse_common_option(int opt, const char *optarg,
1330 struct internal_config *conf)
1340 if (eal_option_device_add(RTE_DEVTYPE_BLACKLISTED_PCI,
1350 if (eal_option_device_add(RTE_DEVTYPE_WHITELISTED_PCI,
1358 int lcore_indexes[RTE_MAX_LCORE];
1360 if (eal_service_cores_parsed())
1361 RTE_LOG(WARNING, EAL,
1362 "Service cores parsed before dataplane cores. Please ensure -c is before -s or -S\n");
1363 if (eal_parse_coremask(optarg, lcore_indexes) < 0) {
1364 RTE_LOG(ERR, EAL, "invalid coremask syntax\n");
1367 if (update_lcore_config(lcore_indexes) < 0) {
1368 char *available = available_cores();
1371 "invalid coremask, please check specified cores are part of %s\n",
1378 RTE_LOG(ERR, EAL, "Option -c is ignored, because (%s) is set!\n",
1379 (core_parsed == LCORE_OPT_LST) ? "-l" :
1380 (core_parsed == LCORE_OPT_MAP) ? "--lcore" :
1385 core_parsed = LCORE_OPT_MSK;
1390 int lcore_indexes[RTE_MAX_LCORE];
1392 if (eal_service_cores_parsed())
1393 RTE_LOG(WARNING, EAL,
1394 "Service cores parsed before dataplane cores. Please ensure -l is before -s or -S\n");
1396 if (eal_parse_corelist(optarg, lcore_indexes) < 0) {
1397 RTE_LOG(ERR, EAL, "invalid core list syntax\n");
1400 if (update_lcore_config(lcore_indexes) < 0) {
1401 char *available = available_cores();
1404 "invalid core list, please check specified cores are part of %s\n",
1411 RTE_LOG(ERR, EAL, "Option -l is ignored, because (%s) is set!\n",
1412 (core_parsed == LCORE_OPT_MSK) ? "-c" :
1413 (core_parsed == LCORE_OPT_MAP) ? "--lcore" :
1418 core_parsed = LCORE_OPT_LST;
1421 /* service coremask */
1423 if (eal_parse_service_coremask(optarg) < 0) {
1424 RTE_LOG(ERR, EAL, "invalid service coremask\n");
1428 /* service corelist */
1430 if (eal_parse_service_corelist(optarg) < 0) {
1431 RTE_LOG(ERR, EAL, "invalid service core list\n");
1435 /* size of memory */
1437 conf->memory = atoi(optarg);
1438 conf->memory *= 1024ULL;
1439 conf->memory *= 1024ULL;
1442 /* force number of channels */
1444 conf->force_nchannel = atoi(optarg);
1445 if (conf->force_nchannel == 0) {
1446 RTE_LOG(ERR, EAL, "invalid channel number\n");
1450 /* force number of ranks */
1452 conf->force_nrank = atoi(optarg);
1453 if (conf->force_nrank == 0 ||
1454 conf->force_nrank > 16) {
1455 RTE_LOG(ERR, EAL, "invalid rank number\n");
1459 /* force loading of external driver */
1461 if (eal_plugin_add(optarg) == -1)
1465 /* since message is explicitly requested by user, we
1466 * write message at highest log level so it can always
1468 * even if info or warning messages are disabled */
1469 RTE_LOG(CRIT, EAL, "RTE Version: '%s'\n", rte_version());
1473 case OPT_HUGE_UNLINK_NUM:
1474 conf->hugepage_unlink = 1;
1477 case OPT_NO_HUGE_NUM:
1478 conf->no_hugetlbfs = 1;
1479 /* no-huge is legacy mem */
1480 conf->legacy_mem = 1;
1483 case OPT_NO_PCI_NUM:
1487 case OPT_NO_HPET_NUM:
1491 case OPT_VMWARE_TSC_MAP_NUM:
1492 conf->vmware_tsc_map = 1;
1495 case OPT_NO_SHCONF_NUM:
1496 conf->no_shconf = 1;
1499 case OPT_IN_MEMORY_NUM:
1500 conf->in_memory = 1;
1501 /* in-memory is a superset of noshconf and huge-unlink */
1502 conf->no_shconf = 1;
1503 conf->hugepage_unlink = 1;
1506 case OPT_PROC_TYPE_NUM:
1507 conf->process_type = eal_parse_proc_type(optarg);
1510 case OPT_MASTER_LCORE_NUM:
1511 if (eal_parse_master_lcore(optarg) < 0) {
1512 RTE_LOG(ERR, EAL, "invalid parameter for --"
1513 OPT_MASTER_LCORE "\n");
1519 if (eal_option_device_add(RTE_DEVTYPE_VIRTUAL,
1525 #ifndef RTE_EXEC_ENV_WINDOWS
1526 case OPT_SYSLOG_NUM:
1527 if (eal_parse_syslog(optarg, conf) < 0) {
1528 RTE_LOG(ERR, EAL, "invalid parameters for --"
1535 case OPT_LOG_LEVEL_NUM: {
1536 if (eal_parse_log_level(optarg) < 0) {
1538 "invalid parameters for --"
1539 OPT_LOG_LEVEL "\n");
1545 #ifndef RTE_EXEC_ENV_WINDOWS
1546 case OPT_TRACE_NUM: {
1547 if (eal_trace_args_save(optarg) < 0) {
1548 RTE_LOG(ERR, EAL, "invalid parameters for --"
1555 case OPT_TRACE_DIR_NUM: {
1556 if (eal_trace_dir_args_save(optarg) < 0) {
1557 RTE_LOG(ERR, EAL, "invalid parameters for --"
1558 OPT_TRACE_DIR "\n");
1564 case OPT_TRACE_BUF_SIZE_NUM: {
1565 if (eal_trace_bufsz_args_save(optarg) < 0) {
1566 RTE_LOG(ERR, EAL, "invalid parameters for --"
1567 OPT_TRACE_BUF_SIZE "\n");
1573 case OPT_TRACE_MODE_NUM: {
1574 if (eal_trace_mode_args_save(optarg) < 0) {
1575 RTE_LOG(ERR, EAL, "invalid parameters for --"
1576 OPT_TRACE_MODE "\n");
1581 #endif /* !RTE_EXEC_ENV_WINDOWS */
1583 case OPT_LCORES_NUM:
1584 if (eal_parse_lcores(optarg) < 0) {
1585 RTE_LOG(ERR, EAL, "invalid parameter for --"
1591 RTE_LOG(ERR, EAL, "Option --lcore is ignored, because (%s) is set!\n",
1592 (core_parsed == LCORE_OPT_LST) ? "-l" :
1593 (core_parsed == LCORE_OPT_MSK) ? "-c" :
1598 core_parsed = LCORE_OPT_MAP;
1600 case OPT_LEGACY_MEM_NUM:
1601 conf->legacy_mem = 1;
1603 case OPT_SINGLE_FILE_SEGMENTS_NUM:
1604 conf->single_file_segments = 1;
1606 case OPT_IOVA_MODE_NUM:
1607 if (eal_parse_iova_mode(optarg) < 0) {
1608 RTE_LOG(ERR, EAL, "invalid parameters for --"
1609 OPT_IOVA_MODE "\n");
1613 case OPT_BASE_VIRTADDR_NUM:
1614 if (eal_parse_base_virtaddr(optarg) < 0) {
1615 RTE_LOG(ERR, EAL, "invalid parameter for --"
1616 OPT_BASE_VIRTADDR "\n");
1620 case OPT_TELEMETRY_NUM:
1622 case OPT_NO_TELEMETRY_NUM:
1623 conf->no_telemetry = 1;
1626 /* don't know what to do, leave this to caller */
1634 RTE_LOG(ERR, EAL, "Options blacklist (-b) and whitelist (-w) "
1635 "cannot be used at the same time\n");
1640 eal_auto_detect_cores(struct rte_config *cfg)
1642 unsigned int lcore_id;
1643 unsigned int removed = 0;
1644 rte_cpuset_t affinity_set;
1646 if (pthread_getaffinity_np(pthread_self(), sizeof(rte_cpuset_t),
1648 CPU_ZERO(&affinity_set);
1650 for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
1651 if (cfg->lcore_role[lcore_id] == ROLE_RTE &&
1652 !CPU_ISSET(lcore_id, &affinity_set)) {
1653 cfg->lcore_role[lcore_id] = ROLE_OFF;
1658 cfg->lcore_count -= removed;
1662 compute_ctrl_threads_cpuset(struct internal_config *internal_cfg)
1664 rte_cpuset_t *cpuset = &internal_cfg->ctrl_cpuset;
1665 rte_cpuset_t default_set;
1666 unsigned int lcore_id;
1668 for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
1669 if (rte_lcore_has_role(lcore_id, ROLE_OFF))
1671 RTE_CPU_OR(cpuset, cpuset, &lcore_config[lcore_id].cpuset);
1673 RTE_CPU_NOT(cpuset, cpuset);
1675 if (pthread_getaffinity_np(pthread_self(), sizeof(rte_cpuset_t),
1677 CPU_ZERO(&default_set);
1679 RTE_CPU_AND(cpuset, cpuset, &default_set);
1681 /* if no remaining cpu, use master lcore cpu affinity */
1682 if (!CPU_COUNT(cpuset)) {
1683 memcpy(cpuset, &lcore_config[rte_get_master_lcore()].cpuset,
1689 eal_cleanup_config(struct internal_config *internal_cfg)
1691 if (internal_cfg->hugefile_prefix != NULL)
1692 free(internal_cfg->hugefile_prefix);
1693 if (internal_cfg->hugepage_dir != NULL)
1694 free(internal_cfg->hugepage_dir);
1695 if (internal_cfg->user_mbuf_pool_ops_name != NULL)
1696 free(internal_cfg->user_mbuf_pool_ops_name);
1702 eal_adjust_config(struct internal_config *internal_cfg)
1705 struct rte_config *cfg = rte_eal_get_configuration();
1706 struct internal_config *internal_conf =
1707 eal_get_internal_configuration();
1710 eal_auto_detect_cores(cfg);
1712 if (internal_conf->process_type == RTE_PROC_AUTO)
1713 internal_conf->process_type = eal_proc_type_detect();
1715 /* default master lcore is the first one */
1716 if (!master_lcore_parsed) {
1717 cfg->master_lcore = rte_get_next_lcore(-1, 0, 0);
1718 if (cfg->master_lcore >= RTE_MAX_LCORE)
1720 lcore_config[cfg->master_lcore].core_role = ROLE_RTE;
1723 compute_ctrl_threads_cpuset(internal_cfg);
1725 /* if no memory amounts were requested, this will result in 0 and
1726 * will be overridden later, right after eal_hugepage_info_init() */
1727 for (i = 0; i < RTE_MAX_NUMA_NODES; i++)
1728 internal_cfg->memory += internal_cfg->socket_mem[i];
1734 eal_check_common_options(struct internal_config *internal_cfg)
1736 struct rte_config *cfg = rte_eal_get_configuration();
1737 const struct internal_config *internal_conf =
1738 eal_get_internal_configuration();
1740 if (cfg->lcore_role[cfg->master_lcore] != ROLE_RTE) {
1741 RTE_LOG(ERR, EAL, "Master lcore is not enabled for DPDK\n");
1745 if (internal_cfg->process_type == RTE_PROC_INVALID) {
1746 RTE_LOG(ERR, EAL, "Invalid process type specified\n");
1749 if (internal_cfg->hugefile_prefix != NULL &&
1750 strlen(internal_cfg->hugefile_prefix) < 1) {
1751 RTE_LOG(ERR, EAL, "Invalid length of --" OPT_FILE_PREFIX " option\n");
1754 if (internal_cfg->hugepage_dir != NULL &&
1755 strlen(internal_cfg->hugepage_dir) < 1) {
1756 RTE_LOG(ERR, EAL, "Invalid length of --" OPT_HUGE_DIR" option\n");
1759 if (internal_cfg->user_mbuf_pool_ops_name != NULL &&
1760 strlen(internal_cfg->user_mbuf_pool_ops_name) < 1) {
1761 RTE_LOG(ERR, EAL, "Invalid length of --" OPT_MBUF_POOL_OPS_NAME" option\n");
1764 if (index(eal_get_hugefile_prefix(), '%') != NULL) {
1765 RTE_LOG(ERR, EAL, "Invalid char, '%%', in --"OPT_FILE_PREFIX" "
1769 if (mem_parsed && internal_cfg->force_sockets == 1) {
1770 RTE_LOG(ERR, EAL, "Options -m and --"OPT_SOCKET_MEM" cannot "
1771 "be specified at the same time\n");
1774 if (internal_cfg->no_hugetlbfs && internal_cfg->force_sockets == 1) {
1775 RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_MEM" cannot "
1776 "be specified together with --"OPT_NO_HUGE"\n");
1779 if (internal_cfg->no_hugetlbfs && internal_cfg->hugepage_unlink &&
1780 !internal_cfg->in_memory) {
1781 RTE_LOG(ERR, EAL, "Option --"OPT_HUGE_UNLINK" cannot "
1782 "be specified together with --"OPT_NO_HUGE"\n");
1785 if (internal_conf->force_socket_limits && internal_conf->legacy_mem) {
1786 RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_LIMIT
1787 " is only supported in non-legacy memory mode\n");
1789 if (internal_cfg->single_file_segments &&
1790 internal_cfg->hugepage_unlink &&
1791 !internal_cfg->in_memory) {
1792 RTE_LOG(ERR, EAL, "Option --"OPT_SINGLE_FILE_SEGMENTS" is "
1793 "not compatible with --"OPT_HUGE_UNLINK"\n");
1796 if (internal_cfg->legacy_mem &&
1797 internal_cfg->in_memory) {
1798 RTE_LOG(ERR, EAL, "Option --"OPT_LEGACY_MEM" is not compatible "
1799 "with --"OPT_IN_MEMORY"\n");
1802 if (internal_cfg->legacy_mem && internal_cfg->match_allocations) {
1803 RTE_LOG(ERR, EAL, "Option --"OPT_LEGACY_MEM" is not compatible "
1804 "with --"OPT_MATCH_ALLOCATIONS"\n");
1807 if (internal_cfg->no_hugetlbfs && internal_cfg->match_allocations) {
1808 RTE_LOG(ERR, EAL, "Option --"OPT_NO_HUGE" is not compatible "
1809 "with --"OPT_MATCH_ALLOCATIONS"\n");
1812 if (internal_cfg->legacy_mem && internal_cfg->memory == 0) {
1813 RTE_LOG(NOTICE, EAL, "Static memory layout is selected, "
1814 "amount of reserved memory can be adjusted with "
1815 "-m or --"OPT_SOCKET_MEM"\n");
1822 eal_common_usage(void)
1824 printf("[options]\n\n"
1825 "EAL common options:\n"
1826 " -c COREMASK Hexadecimal bitmask of cores to run on\n"
1827 " -l CORELIST List of cores to run on\n"
1828 " The argument format is <c1>[-c2][,c3[-c4],...]\n"
1829 " where c1, c2, etc are core indexes between 0 and %d\n"
1830 " --"OPT_LCORES" COREMAP Map lcore set to physical cpu set\n"
1831 " The argument format is\n"
1832 " '<lcores[@cpus]>[<,lcores[@cpus]>...]'\n"
1833 " lcores and cpus list are grouped by '(' and ')'\n"
1834 " Within the group, '-' is used for range separator,\n"
1835 " ',' is used for single number separator.\n"
1836 " '( )' can be omitted for single element group,\n"
1837 " '@' can be omitted if cpus and lcores have the same value\n"
1838 " -s SERVICE COREMASK Hexadecimal bitmask of cores to be used as service cores\n"
1839 " --"OPT_MASTER_LCORE" ID Core ID that is used as master\n"
1840 " --"OPT_MBUF_POOL_OPS_NAME" Pool ops name for mbuf to use\n"
1841 " -n CHANNELS Number of memory channels\n"
1842 " -m MB Memory to allocate (see also --"OPT_SOCKET_MEM")\n"
1843 " -r RANKS Force number of memory ranks (don't detect)\n"
1844 " -b, --"OPT_PCI_BLACKLIST" Add a PCI device in black list.\n"
1845 " Prevent EAL from using this PCI device. The argument\n"
1846 " format is <domain:bus:devid.func>.\n"
1847 " -w, --"OPT_PCI_WHITELIST" Add a PCI device in white list.\n"
1848 " Only use the specified PCI devices. The argument format\n"
1849 " is <[domain:]bus:devid.func>. This option can be present\n"
1850 " several times (once per device).\n"
1851 " [NOTE: PCI whitelist cannot be used with -b option]\n"
1852 " --"OPT_VDEV" Add a virtual device.\n"
1853 " The argument format is <driver><id>[,key=val,...]\n"
1854 " (ex: --vdev=net_pcap0,iface=eth2).\n"
1855 " --"OPT_IOVA_MODE" Set IOVA mode. 'pa' for IOVA_PA\n"
1856 " 'va' for IOVA_VA\n"
1857 " -d LIB.so|DIR Add a driver or driver directory\n"
1858 " (can be used multiple times)\n"
1859 " --"OPT_VMWARE_TSC_MAP" Use VMware TSC map instead of native RDTSC\n"
1860 " --"OPT_PROC_TYPE" Type of this process (primary|secondary|auto)\n"
1861 #ifndef RTE_EXEC_ENV_WINDOWS
1862 " --"OPT_SYSLOG" Set syslog facility\n"
1864 " --"OPT_LOG_LEVEL"=<int> Set global log level\n"
1865 " --"OPT_LOG_LEVEL"=<type-match>:<int>\n"
1866 " Set specific log level\n"
1867 #ifndef RTE_EXEC_ENV_WINDOWS
1868 " --"OPT_TRACE"=<regex-match>\n"
1869 " Enable trace based on regular expression trace name.\n"
1870 " By default, the trace is disabled.\n"
1871 " User must specify this option to enable trace.\n"
1872 " --"OPT_TRACE_DIR"=<directory path>\n"
1873 " Specify trace directory for trace output.\n"
1874 " By default, trace output will created at\n"
1875 " $HOME directory and parameter must be\n"
1876 " specified once only.\n"
1877 " --"OPT_TRACE_BUF_SIZE"=<int>\n"
1878 " Specify maximum size of allocated memory\n"
1879 " for trace output for each thread. Valid\n"
1880 " unit can be either 'B|K|M' for 'Bytes',\n"
1881 " 'KBytes' and 'MBytes' respectively.\n"
1882 " Default is 1MB and parameter must be\n"
1883 " specified once only.\n"
1884 " --"OPT_TRACE_MODE"=<o[verwrite] | d[iscard]>\n"
1885 " Specify the mode of update of trace\n"
1886 " output file. Either update on a file can\n"
1887 " be wrapped or discarded when file size\n"
1888 " reaches its maximum limit.\n"
1889 " Default mode is 'overwrite' and parameter\n"
1890 " must be specified once only.\n"
1891 #endif /* !RTE_EXEC_ENV_WINDOWS */
1892 " -v Display version information on startup\n"
1893 " -h, --help This help\n"
1894 " --"OPT_IN_MEMORY" Operate entirely in memory. This will\n"
1895 " disable secondary process support\n"
1896 " --"OPT_BASE_VIRTADDR" Base virtual address\n"
1897 " --"OPT_TELEMETRY" Enable telemetry support (on by default)\n"
1898 " --"OPT_NO_TELEMETRY" Disable telemetry support\n"
1899 "\nEAL options for DEBUG use only:\n"
1900 " --"OPT_HUGE_UNLINK" Unlink hugepage files after init\n"
1901 " --"OPT_NO_HUGE" Use malloc instead of hugetlbfs\n"
1902 " --"OPT_NO_PCI" Disable PCI\n"
1903 " --"OPT_NO_HPET" Disable HPET\n"
1904 " --"OPT_NO_SHCONF" No shared config (mmap'd files)\n"
1905 "\n", RTE_MAX_LCORE);