app/testpmd: fix invalid Rx queue number setting
authorWei Dai <wei.dai@intel.com>
Fri, 12 Jan 2018 11:31:21 +0000 (19:31 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 17 Jan 2018 17:49:38 +0000 (18:49 +0100)
commit3f7311ba0beee75068c52fe521fff021ff506a14
tree347b3d7ae94ab53e65276760640fb107f8c8a8df
parent2969258cb41064d2295ac823f385ad41ef405f15
app/testpmd: fix invalid Rx queue number setting

If an invalid number of RX queues is configured from testpmd run-time
command like "port config all rxq number" or from --rxq in the command
to start testpmd, the global variable nb_rxq is updated by this invalid
value without this patch. It may cause testpmd crash. This patch refuses
invalid rxq setting and keeps its last correct value.

Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")
Cc: stable@dpdk.org
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
app/test-pmd/cmdline.c
app/test-pmd/parameters.c
app/test-pmd/testpmd.c
app/test-pmd/testpmd.h