app/testpmd: remove duplicated parameter parsing
Several parameters were being parsed twice in testpmd, so this patch gets rid of the second parsing. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
This commit is contained in:
parent
3e0d91bf42
commit
44fa5307b0
@ -819,20 +819,6 @@ launch_args_parse(int argc, char** argv)
|
||||
" >= 1 && <= %d\n", n,
|
||||
(int) MAX_QUEUE_ID);
|
||||
}
|
||||
if (!strcmp(lgopts[opt_idx].name, "rxd")) {
|
||||
n = atoi(optarg);
|
||||
if (n > 0)
|
||||
nb_rxd = (uint16_t) n;
|
||||
else
|
||||
rte_exit(EXIT_FAILURE, "rxd must be > 0\n");
|
||||
}
|
||||
if (!strcmp(lgopts[opt_idx].name, "txd")) {
|
||||
n = atoi(optarg);
|
||||
if (n > 0)
|
||||
nb_txd = (uint16_t) n;
|
||||
else
|
||||
rte_exit(EXIT_FAILURE, "txd must be in > 0\n");
|
||||
}
|
||||
if (!strcmp(lgopts[opt_idx].name, "burst")) {
|
||||
n = atoi(optarg);
|
||||
if ((n >= 1) && (n <= MAX_PKT_BURST))
|
||||
@ -852,27 +838,6 @@ launch_args_parse(int argc, char** argv)
|
||||
"mbcache must be >= 0 and <= %d\n",
|
||||
RTE_MEMPOOL_CACHE_MAX_SIZE);
|
||||
}
|
||||
if (!strcmp(lgopts[opt_idx].name, "txpt")) {
|
||||
n = atoi(optarg);
|
||||
if (n >= 0)
|
||||
tx_thresh.pthresh = (uint8_t)n;
|
||||
else
|
||||
rte_exit(EXIT_FAILURE, "txpt must be >= 0\n");
|
||||
}
|
||||
if (!strcmp(lgopts[opt_idx].name, "txht")) {
|
||||
n = atoi(optarg);
|
||||
if (n >= 0)
|
||||
tx_thresh.hthresh = (uint8_t)n;
|
||||
else
|
||||
rte_exit(EXIT_FAILURE, "txht must be >= 0\n");
|
||||
}
|
||||
if (!strcmp(lgopts[opt_idx].name, "txwt")) {
|
||||
n = atoi(optarg);
|
||||
if (n >= 0)
|
||||
tx_thresh.wthresh = (uint8_t)n;
|
||||
else
|
||||
rte_exit(EXIT_FAILURE, "txwt must be >= 0\n");
|
||||
}
|
||||
if (!strcmp(lgopts[opt_idx].name, "txfreet")) {
|
||||
n = atoi(optarg);
|
||||
if (n >= 0)
|
||||
@ -896,27 +861,6 @@ launch_args_parse(int argc, char** argv)
|
||||
rte_exit(EXIT_FAILURE,
|
||||
"txqflags must be >= 0\n");
|
||||
}
|
||||
if (!strcmp(lgopts[opt_idx].name, "rxpt")) {
|
||||
n = atoi(optarg);
|
||||
if (n >= 0)
|
||||
rx_thresh.pthresh = (uint8_t)n;
|
||||
else
|
||||
rte_exit(EXIT_FAILURE, "rxpt must be >= 0\n");
|
||||
}
|
||||
if (!strcmp(lgopts[opt_idx].name, "rxht")) {
|
||||
n = atoi(optarg);
|
||||
if (n >= 0)
|
||||
rx_thresh.hthresh = (uint8_t)n;
|
||||
else
|
||||
rte_exit(EXIT_FAILURE, "rxht must be >= 0\n");
|
||||
}
|
||||
if (!strcmp(lgopts[opt_idx].name, "rxwt")) {
|
||||
n = atoi(optarg);
|
||||
if (n >= 0)
|
||||
rx_thresh.wthresh = (uint8_t)n;
|
||||
else
|
||||
rte_exit(EXIT_FAILURE, "rxwt must be >= 0\n");
|
||||
}
|
||||
if (!strcmp(lgopts[opt_idx].name, "rxd")) {
|
||||
n = atoi(optarg);
|
||||
if (n > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user