diff options
author | David Marchand <david.marchand@redhat.com> | 2024-03-14 10:17:02 +0100 |
---|---|---|
committer | Ferruh Yigit <ferruh.yigit@amd.com> | 2024-03-14 12:40:42 +0100 |
commit | 2ae06c579ea4e1cd234c5b14bef2957ee154ec74 (patch) | |
tree | 941985bbd8f1af47545f87cd9517945f698596cb | |
parent | 0df689aa2ac29b49a2601f227ee7655802fe3111 (diff) |
app/testpmd: fix --stats-period option check
Rather than silently ignore an invalid value, raise an error for
stats-period user input.
Fixes: cfea1f3048d1 ("app/testpmd: print statistics periodically")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
-rw-r--r-- | app/test-pmd/parameters.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 11b0cce577..d715750bb8 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -776,7 +776,7 @@ launch_args_parse(int argc, char** argv) n = strtoul(optarg, &end, 10); if ((optarg[0] == '\0') || (end == NULL) || (*end != '\0')) - break; + rte_exit(EXIT_FAILURE, "Invalid stats-period value\n"); stats_period = n; break; |