Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
New upstream version 17.11.1
[deb_dpdk.git]
/
app
/
test-pmd
/
parameters.c
diff --git
a/app/test-pmd/parameters.c
b/app/test-pmd/parameters.c
index
84e7a63
..
8fbb515
100644
(file)
--- 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;
int n, opt;
char **argvopt;
int opt_idx;
+ portid_t pid;
enum { TX, RX };
static struct option lgopts[] = {
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);
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"
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 (!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"
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 "
}
if (!nb_rxq && !nb_txq) {
rte_exit(EXIT_FAILURE, "Either rx or tx queues should "