X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=app%2Ftest-pmd%2Fparameters.c;h=8fbb5150b4fe626a91e55587c56f2b8702728e88;hb=refs%2Ftags%2Fupstream%2F17.11.1;hp=84e7a63ef69b592e4be47a597bb47af4518b0a19;hpb=169a9de21e263aa6599cdc2d87a45ae158d9f509;p=deb_dpdk.git diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 84e7a63e..8fbb5150 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -565,6 +565,7 @@ launch_args_parse(int argc, char** argv) int n, opt; char **argvopt; int opt_idx; + portid_t pid; enum { TX, RX }; static struct option lgopts[] = { @@ -951,21 +952,21 @@ launch_args_parse(int argc, char** argv) rss_hf = ETH_RSS_UDP; if (!strcmp(lgopts[opt_idx].name, "rxq")) { n = atoi(optarg); - if (n >= 0 && n <= (int) MAX_QUEUE_ID) + if (n >= 0 && check_nb_rxq((queueid_t)n) == 0) nb_rxq = (queueid_t) n; else rte_exit(EXIT_FAILURE, "rxq %d invalid - must be" - " >= 0 && <= %d\n", n, - (int) MAX_QUEUE_ID); + " >= 0 && <= %u\n", n, + get_allowed_max_nb_rxq(&pid)); } if (!strcmp(lgopts[opt_idx].name, "txq")) { n = atoi(optarg); - if (n >= 0 && n <= (int) MAX_QUEUE_ID) + if (n >= 0 && check_nb_txq((queueid_t)n) == 0) nb_txq = (queueid_t) n; else rte_exit(EXIT_FAILURE, "txq %d invalid - must be" - " >= 0 && <= %d\n", n, - (int) MAX_QUEUE_ID); + " >= 0 && <= %u\n", n, + get_allowed_max_nb_txq(&pid)); } if (!nb_rxq && !nb_txq) { rte_exit(EXIT_FAILURE, "Either rx or tx queues should "