From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 2A01B1B16C; Wed, 10 Jan 2018 05:30:28 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2018 20:30:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,338,1511856000"; d="scan'208";a="10053081" Received: from dpdk6.bj.intel.com ([172.16.182.87]) by orsmga006.jf.intel.com with ESMTP; 09 Jan 2018 20:30:25 -0800 From: Wei Dai To: wenzhuo.lu@intel.com, jingjing.wu@intel.com, yuan.peng@intel.com, konstantin.ananyev@intel.com Cc: dev@dpdk.org, stable@dpdk.org, Wei Dai Date: Wed, 10 Jan 2018 12:14:18 +0800 Message-Id: <1515557660-36763-1-git-send-email-wei.dai@intel.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1515416551-28636-1-git-send-email-wei.dai@intel.com> References: <1515416551-28636-1-git-send-email-wei.dai@intel.com> Subject: [dpdk-stable] [PATCH v2 0/2] app/testpmd: fix invalid rxq and txq nubmer setting X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jan 2018 04:30:29 -0000 If an invlaid number of RX or TX queues is configured from testpmd command like "port config all rxq number" or "port config all txq number". The global variable rxq or txq is updated by the invalid input. This can cause testpmd crash. For example, if the maximum number of RX or TX queues is 4, testpmd will crash after running commands "port config all rxq 5", "port config all txq 5" and "start" in sequence. These 2 patches reserve the last correct rxq and txq, if an invalid input is detected, it is restored to the backup value to avoid crash. Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings") Cc: stable@dpdk.org Signed-off-by: Wei Dai --- v2: fix a bug in v1 Wei Dai (2): app/testpmd: fix invalid rxq number setting app/testpmd: fix invalid txq number setting app/test-pmd/cmdline.c | 4 ++++ app/test-pmd/testpmd.c | 23 +++++++++++++++++++---- app/test-pmd/testpmd.h | 3 +++ 3 files changed, 26 insertions(+), 4 deletions(-) -- 2.7.5