[PATCH v2 2/6] app/testpmd: fix burst option parsing
    David Marchand 
    david.marchand at redhat.com
       
    Thu Mar 14 10:17:03 CET 2024
    
    
  
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 at dpdk.org
Signed-off-by: David Marchand <david.marchand at redhat.com>
---
Changes since v1:
- switched to a dedicated error message,
---
 app/test-pmd/parameters.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index d715750bb8..3414a0d38c 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -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;
-- 
2.44.0
    
    
More information about the stable
mailing list