[v2,2/6] app/testpmd: fix burst option parsing
Checks
Commit Message
rte_eth_dev_info_get() is not supposed to fail for a valid port_id, but
for the theoretical case when it would fail, raise an error rather than
skip subsequent options.
Fixes: 6f51deb903b2 ("app/testpmd: check status of getting ethdev info")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since v1:
- switched to a dedicated error message,
---
app/test-pmd/parameters.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On 3/14/2024 9:17 AM, David Marchand wrote:
> rte_eth_dev_info_get() is not supposed to fail for a valid port_id, but
> for the theoretical case when it would fail, raise an error rather than
> skip subsequent options.
>
> Fixes: 6f51deb903b2 ("app/testpmd: check status of getting ethdev info")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
@@ -1128,7 +1128,9 @@ launch_args_parse(int argc, char** argv)
0,
&dev_info);
if (ret != 0)
- return;
+ rte_exit(EXIT_FAILURE, "Failed to get driver "
+ "recommended burst size, please provide a "
+ "value between 1 and %d\n", MAX_PKT_BURST);
rec_nb_pkts = dev_info
.default_rxportconf.burst_size;