Skip to content

Commit

Permalink
app/testpmd: fix --stats-period option check
Browse files Browse the repository at this point in the history
[ upstream commit 2ae06c579ea4e1cd234c5b14bef2957ee154ec74 ]

Rather than silently ignore an invalid value, raise an error for
stats-period user input.

Fixes: cfea1f3 ("app/testpmd: print statistics periodically")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
  • Loading branch information
david-marchand authored and bluca committed Mar 18, 2024
1 parent 75b8660 commit d6cee7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/test-pmd/parameters.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,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;
Expand Down

0 comments on commit d6cee7f

Please sign in to comment.