- /* 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_HUGE_DIR)) {
- RTE_LOG(ERR, EAL, "Option "OPT_HUGE_DIR" is not supported on"
- "FreeBSD\n");
- return -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_FILE_PREFIX)) {
- RTE_LOG(ERR, EAL, "Option "OPT_FILE_PREFIX" is not supported on"
- "FreeBSD\n");
- return -1;
- }
- else if (!strcmp(lgopts[option_index].name, OPT_SOCKET_MEM)) {
- RTE_LOG(ERR, EAL, "Option "OPT_SOCKET_MEM" is not supported on"
- "FreeBSD\n");
- return -1;
- }
- else if (!strcmp(lgopts[option_index].name, OPT_USE_DEVICE)) {
- printf("The --use-device option is deprecated, please use\n"
- "--whitelist or --vdev instead.\n");
- eal_usage(prgname);
- return -1;
- }
- 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;
- }
- }
- break;
-