1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2014 6WIND S.A.
13 /* long options mapped to a short option */
14 #define OPT_HELP "help"
16 #define OPT_DEV_ALLOW "allow"
17 OPT_DEV_ALLOW_NUM = 'a',
18 #define OPT_DEV_BLOCK "block"
19 OPT_DEV_BLOCK_NUM = 'b',
21 /* legacy option that will be removed in future */
22 #define OPT_PCI_WHITELIST "pci-whitelist"
23 OPT_PCI_WHITELIST_NUM = 'w',
25 /* first long only option value must be >= 256, so that we won't
26 * conflict with short options */
27 OPT_LONG_MIN_NUM = 256,
28 #define OPT_BASE_VIRTADDR "base-virtaddr"
29 OPT_BASE_VIRTADDR_NUM,
30 #define OPT_CREATE_UIO_DEV "create-uio-dev"
31 OPT_CREATE_UIO_DEV_NUM,
32 #define OPT_FILE_PREFIX "file-prefix"
34 #define OPT_HUGE_DIR "huge-dir"
36 #define OPT_HUGE_UNLINK "huge-unlink"
38 #define OPT_LCORES "lcores"
40 #define OPT_LOG_LEVEL "log-level"
42 #define OPT_TRACE "trace"
44 #define OPT_TRACE_DIR "trace-dir"
46 #define OPT_TRACE_BUF_SIZE "trace-bufsz"
47 OPT_TRACE_BUF_SIZE_NUM,
48 #define OPT_TRACE_MODE "trace-mode"
50 #define OPT_MAIN_LCORE "main-lcore"
52 #define OPT_MASTER_LCORE "master-lcore"
54 #define OPT_MBUF_POOL_OPS_NAME "mbuf-pool-ops-name"
55 OPT_MBUF_POOL_OPS_NAME_NUM,
56 #define OPT_PROC_TYPE "proc-type"
58 #define OPT_NO_HPET "no-hpet"
60 #define OPT_NO_HUGE "no-huge"
62 #define OPT_NO_PCI "no-pci"
64 #define OPT_NO_SHCONF "no-shconf"
66 #define OPT_IN_MEMORY "in-memory"
68 #define OPT_SOCKET_MEM "socket-mem"
70 #define OPT_SOCKET_LIMIT "socket-limit"
72 #define OPT_SYSLOG "syslog"
74 #define OPT_VDEV "vdev"
76 #define OPT_VFIO_INTR "vfio-intr"
78 #define OPT_VFIO_VF_TOKEN "vfio-vf-token"
79 OPT_VFIO_VF_TOKEN_NUM,
80 #define OPT_VMWARE_TSC_MAP "vmware-tsc-map"
81 OPT_VMWARE_TSC_MAP_NUM,
82 #define OPT_LEGACY_MEM "legacy-mem"
84 #define OPT_SINGLE_FILE_SEGMENTS "single-file-segments"
85 OPT_SINGLE_FILE_SEGMENTS_NUM,
86 #define OPT_IOVA_MODE "iova-mode"
88 #define OPT_MATCH_ALLOCATIONS "match-allocations"
89 OPT_MATCH_ALLOCATIONS_NUM,
90 #define OPT_TELEMETRY "telemetry"
92 #define OPT_NO_TELEMETRY "no-telemetry"
94 #define OPT_FORCE_MAX_SIMD_BITWIDTH "force-max-simd-bitwidth"
95 OPT_FORCE_MAX_SIMD_BITWIDTH_NUM,
97 /* legacy option that will be removed in future */
98 #define OPT_PCI_BLACKLIST "pci-blacklist"
99 OPT_PCI_BLACKLIST_NUM,
104 extern const char eal_short_options[];
105 extern const struct option eal_long_options[];
107 int eal_parse_common_option(int opt, const char *argv,
108 struct internal_config *conf);
109 int eal_option_device_parse(void);
110 int eal_adjust_config(struct internal_config *internal_cfg);
111 int eal_cleanup_config(struct internal_config *internal_cfg);
112 int eal_check_common_options(struct internal_config *internal_cfg);
113 void eal_common_usage(void);
114 enum rte_proc_type_t eal_proc_type_detect(void);
115 int eal_plugins_init(void);
116 int eal_save_args(int argc, char **argv);
117 int handle_eal_info_request(const char *cmd, const char *params __rte_unused,
118 struct rte_tel_data *d);
120 #endif /* EAL_OPTIONS_H */