path: root/drivers
diff options
authorDavid Marchand <>2019-11-18 16:37:14 +0100
committerFerruh Yigit <>2019-11-20 17:36:06 +0100
commit8fad2e5ab2c54ae12db0c3255b69d0c4f44a5194 (patch)
tree609685bd8e5d337914ef6bbd314d7fc6f9809adb /drivers
parent36e5527573a52d7e762d7ee0829541475f382e08 (diff)
app/testpmd: report invalid command line parameter
We currently do not check that a non option string has been passed to testpmd. Example: $ ./master/app/testpmd --no-huge -m 512 --vdev net_null0 \ --vdev net_null1 -- -i nb-cores=2 --total-num-mbuf 2048 [...] testpmd> show config fwd io packet forwarding - ports=2 - cores=1 - streams=2 - NUMA support enabled, MP allocation mode: native Logical Core 1 (socket 0) forwards packets on 2 streams: RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01 RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00 Here nb-cores=2 is just ignored, while the (probably sleepy) user did not notice this. Validate that all strings passed to testpmd are part of a known option. After this patch: $ ./master/app/testpmd --no-huge -m 512 --vdev net_null0 \ --vdev net_null1 -- -i nb-cores=2 --total-num-mbuf 2048 [...] Invalid parameter: nb-cores=2 EAL: Error - exiting with code: 1 Cause: Command line incorrect While at it, when passing an unknown option, print the string that gets refused by getopt_long to help the user. Fixes: af75078fece3 ("first public release") Cc: Signed-off-by: David Marchand <> Reviewed-by: Ferruh Yigit <>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions