- /* blacklist */
- case 'b':
- if (rte_eal_devargs_add(RTE_DEVTYPE_BLACKLISTED_PCI,
- optarg) < 0) {
- eal_usage(prgname);
- return (-1);
- }
- break;
- /* whitelist */
- case 'w':
- if (rte_eal_devargs_add(RTE_DEVTYPE_WHITELISTED_PCI,
- optarg) < 0) {
- eal_usage(prgname);
- return -1;
- }
- break;
- /* coremask */
- case 'c':
- if (eal_parse_coremask(optarg) < 0) {
- RTE_LOG(ERR, EAL, "invalid coremask\n");
- eal_usage(prgname);
- return -1;
- }
- coremask_ok = 1;
- break;
- /* size of memory */
- case 'm':
- internal_config.memory = atoi(optarg);
- internal_config.memory *= 1024ULL;
- internal_config.memory *= 1024ULL;
- break;
- /* force number of channels */
- case 'n':
- internal_config.force_nchannel = atoi(optarg);
- if (internal_config.force_nchannel == 0 ||
- internal_config.force_nchannel > 4) {
- RTE_LOG(ERR, EAL, "invalid channel number\n");
- eal_usage(prgname);
- return -1;
- }
- break;
- /* force number of ranks */
- case 'r':
- internal_config.force_nrank = atoi(optarg);
- if (internal_config.force_nrank == 0 ||
- internal_config.force_nrank > 16) {
- RTE_LOG(ERR, EAL, "invalid rank number\n");
- eal_usage(prgname);
- return -1;
- }
- break;
- case 'v':
- /* since message is explicitly requested by user, we
- * write message at highest log level so it can always be seen
- * even if info or warning messages are disabled */
- RTE_LOG(CRIT, EAL, "RTE Version: '%s'\n", rte_version());
- break;
-
- /* long options */
- case 0:
- if (!strcmp(lgopts[option_index].name, OPT_NO_HUGE)) {
- internal_config.no_hugetlbfs = 1;
- }
- else if (!strcmp(lgopts[option_index].name, OPT_NO_PCI)) {
- internal_config.no_pci = 1;
- }
- else if (!strcmp(lgopts[option_index].name, OPT_NO_HPET)) {
- internal_config.no_hpet = 1;
- }
- else if (!strcmp(lgopts[option_index].name, OPT_VMWARE_TSC_MAP)) {
- internal_config.vmware_tsc_map = 1;
- }
- else if (!strcmp(lgopts[option_index].name, OPT_NO_SHCONF)) {
- internal_config.no_shconf = 1;
- }
- else if (!strcmp(lgopts[option_index].name, OPT_PROC_TYPE)) {
- internal_config.process_type = eal_parse_proc_type(optarg);
- }
- else if (!strcmp(lgopts[option_index].name, OPT_PCI_BLACKLIST)) {
- if (rte_eal_devargs_add(RTE_DEVTYPE_BLACKLISTED_PCI,
- optarg) < 0) {
- eal_usage(prgname);
- return -1;
- }
- }
- else if (!strcmp(lgopts[option_index].name, OPT_PCI_WHITELIST)) {
- if (rte_eal_devargs_add(RTE_DEVTYPE_WHITELISTED_PCI,
- optarg) < 0) {
- eal_usage(prgname);
- return -1;
- }
- }
- else if (!strcmp(lgopts[option_index].name, OPT_VDEV)) {
- if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL,
- optarg) < 0) {
- eal_usage(prgname);
- return -1;
- }
- }
- else if (!strcmp(lgopts[option_index].name, OPT_SYSLOG)) {
- if (eal_parse_syslog(optarg) < 0) {
- RTE_LOG(ERR, EAL, "invalid parameters for --"
- OPT_SYSLOG "\n");
- eal_usage(prgname);
- return -1;
- }
- } else if (!strcmp(lgopts[option_index].name,
- OPT_LOG_LEVEL)) {
- uint32_t log;
-
- if (eal_parse_log_level(optarg, &log) < 0) {
- RTE_LOG(ERR, EAL,
- "invalid parameters for --"
- OPT_LOG_LEVEL "\n");
- eal_usage(prgname);
- return -1;
- }
- internal_config.log_level = log;
- } else {