From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 95C5FA04AF; Tue, 22 Sep 2020 16:49:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6D2E41DABC; Tue, 22 Sep 2020 16:49:45 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 789A51DAB8 for ; Tue, 22 Sep 2020 16:49:43 +0200 (CEST) IronPort-SDR: NeitkvWw2xMnR9qYPNDy+0ZMU7CX9XPeqKBM2jp/SluZsSQ1lEi29I0Q7iwhhkAAiSQWPxVYs+ ECWF/1m7oULg== X-IronPort-AV: E=McAfee;i="6000,8403,9752"; a="224763368" X-IronPort-AV: E=Sophos;i="5.77,291,1596524400"; d="scan'208";a="224763368" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 07:49:41 -0700 IronPort-SDR: ffkLYTryt7aLcqQBdJ9G4vXbVXAnG6oVUujp+pTs7WfcU35Eq9sQec8Yt1rGRUdi1so6YxvHmi 4yPDR5IXanoQ== X-IronPort-AV: E=Sophos;i="5.77,291,1596524400"; d="scan'208";a="454514426" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.227.201]) ([10.213.227.201]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 07:49:40 -0700 To: "Wei Hu (Xavier)" , dev@dpdk.org Cc: xavier.huwei@huawei.com References: <20200818120254.72792-1-huwei013@chinasoftinc.com> <20200919104708.58451-1-xavier_huwei@163.com> <20200919104708.58451-2-xavier_huwei@163.com> From: Ferruh Yigit Message-ID: <831d7d94-ce37-9ce4-16d1-e2de6f1162c3@intel.com> Date: Tue, 22 Sep 2020 15:49:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200919104708.58451-2-xavier_huwei@163.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 1/6] app/testpmd: fix missing verification of port id X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 9/19/2020 11:47 AM, Wei Hu (Xavier) wrote: > From: Chengchang Tang > > To set Tx vlan offloads, it is required to stop port firstly. But before > checking whether the port is stopped, the port id entered by the user > is not checked for validity. When the port id is illegal, it would lead > to a segmentation fault since it attempts to access a member of > non-existent port. > > This patch adds verification of port id in tx vlan offloads and remove > duplicated check. > > Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API") > Cc: stable@dpdk.org > > Signed-off-by: Chengchang Tang > Signed-off-by: Wei Hu (Xavier) Reviewed-by: Ferruh Yigit