-static enum rte_proc_type_t
-eal_parse_proc_type(const char *arg)
-{
- if (strncasecmp(arg, "primary", sizeof("primary")) == 0)
- return RTE_PROC_PRIMARY;
- if (strncasecmp(arg, "secondary", sizeof("secondary")) == 0)
- return RTE_PROC_SECONDARY;
- if (strncasecmp(arg, "auto", sizeof("auto")) == 0)
- return RTE_PROC_AUTO;
-
- return RTE_PROC_INVALID;
-}
-
-static int
-eal_parse_blacklist(const char *input, struct rte_pci_addr *dev2bl)
-{
- GET_BLACKLIST_FIELD(input, dev2bl->domain, UINT16_MAX, ':');
- GET_BLACKLIST_FIELD(input, dev2bl->bus, UINT8_MAX, ':');
- GET_BLACKLIST_FIELD(input, dev2bl->devid, UINT8_MAX, '.');
- GET_BLACKLIST_FIELD(input, dev2bl->function, UINT8_MAX, 0);
- return (0);
-}
-
-static ssize_t
-eal_parse_blacklist_opt(const char *optarg, size_t idx)
-{
- if (idx >= sizeof (eal_dev_blacklist) / sizeof (eal_dev_blacklist[0])) {
- RTE_LOG(ERR, EAL,
- "%s - too many devices to blacklist...\n",
- optarg);
- return (-EINVAL);
- } else if (eal_parse_blacklist(optarg, eal_dev_blacklist + idx) != 0) {
- RTE_LOG(ERR, EAL,
- "%s - invalid device to blacklist...\n",
- optarg);
- return (-EINVAL);
- }
-
- idx += 1;
- return (idx);
-}
-
-