+ if (!strcmp(lgopts[opt_idx].name, "hairpinq")) {
+ n = atoi(optarg);
+ if (n >= 0 &&
+ check_nb_hairpinq((queueid_t)n) == 0)
+ nb_hairpinq = (queueid_t) n;
+ else
+ rte_exit(EXIT_FAILURE, "txq %d invalid - must be"
+ " >= 0 && <= %u\n", n,
+ get_allowed_max_nb_hairpinq
+ (&pid));
+ if ((n + nb_txq) < 0 ||
+ check_nb_txq((queueid_t)(n + nb_txq)) != 0)
+ rte_exit(EXIT_FAILURE, "txq + hairpinq "
+ "%d invalid - must be"
+ " >= 0 && <= %u\n",
+ n + nb_txq,
+ get_allowed_max_nb_txq(&pid));
+ if ((n + nb_rxq) < 0 ||
+ check_nb_rxq((queueid_t)(n + nb_rxq)) != 0)
+ rte_exit(EXIT_FAILURE, "rxq + hairpinq "
+ "%d invalid - must be"
+ " >= 0 && <= %u\n",
+ n + nb_rxq,
+ get_allowed_max_nb_rxq(&pid));
+ }