[v2,4/6] app/testpmd: enhance queue count check
Checks
Commit Message
Checking the number of rxq/txq in the middle of option parsing is
confusing.
Besides, a check on nb_rxq / nb_txq check already exists after
option parsing.
Only keep this latter check and make testpmd quit in this case.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since v1:
- moved the check and termination out of argument parsing,
---
app/test-pmd/parameters.c | 4 ----
app/test-pmd/testpmd.c | 3 +--
2 files changed, 1 insertion(+), 6 deletions(-)
Comments
On 3/14/2024 9:17 AM, David Marchand wrote:
> Checking the number of rxq/txq in the middle of option parsing is
> confusing.
> Besides, a check on nb_rxq / nb_txq check already exists after
> option parsing.
> Only keep this latter check and make testpmd quit in this case.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
@@ -1098,10 +1098,6 @@ launch_args_parse(int argc, char** argv)
n + nb_rxq,
get_allowed_max_nb_rxq(&pid));
}
- if (!nb_rxq && !nb_txq) {
- rte_exit(EXIT_FAILURE, "Either rx or tx queues should "
- "be non-zero\n");
- }
if (!strcmp(lgopts[opt_idx].name, "hairpin-mode")) {
char *end = NULL;
unsigned int n;
@@ -4619,8 +4619,7 @@ main(int argc, char** argv)
}
if (!nb_rxq && !nb_txq)
- fprintf(stderr,
- "Warning: Either rx or tx queues should be non-zero\n");
+ rte_exit(EXIT_FAILURE, "Either rx or tx queues should be non-zero\n");
if (nb_rxq > 1 && nb_rxq > nb_txq)
fprintf(stderr,