36db4f6c70
If an invalid number of TX queues is configured from testpmd run-time command like "port config all txq number" or from --txq in the command to start testpmd, the global variable nb_txq is updated by this invalid value without this patch. It may cause testpmd crash. This patch refuses invalid txq 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>