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 4F73EA04DB; Fri, 16 Oct 2020 00:14:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BFFDC1D9DD; Fri, 16 Oct 2020 00:14:18 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id D76591D9CF; Fri, 16 Oct 2020 00:14:15 +0200 (CEST) IronPort-SDR: z7rAnYbq56s7AoC7pxa83GAQiQwqzO+UQvL0kOhg5q4e5Rob0NV2z1TtdqMgcD/oj9V8Wz45Y0 Dow9BlIuTKBQ== X-IronPort-AV: E=McAfee;i="6000,8403,9775"; a="163847314" X-IronPort-AV: E=Sophos;i="5.77,380,1596524400"; d="scan'208";a="163847314" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2020 15:14:13 -0700 IronPort-SDR: fzB5zL4Ci7pn/bHd1J2GT5Es4VZcvEWit6Ne/4pwpYEBh+LBMgF+VHONwCsJVmET8bb+Y/wUkf WmtBjD1u2FWQ== X-IronPort-AV: E=Sophos;i="5.77,380,1596524400"; d="scan'208";a="464456178" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.251.84.112]) ([10.251.84.112]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2020 15:14:10 -0700 To: Suanming Mou , Junyu Jiang , "dev@dpdk.org" Cc: Beilei Xing , Wenzhuo Lu , "stable@dpdk.org" References: <20201014083005.64428-1-junyux.jiang@intel.com> From: Ferruh Yigit Message-ID: <6cb6e895-199f-383f-ed33-d66eabf02e74@intel.com> Date: Thu, 15 Oct 2020 23:14:04 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix flow flush with invalid port 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 10/14/2020 11:16 AM, Suanming Mou wrote: > Hi, > >> -----Original Message----- >> From: dev On Behalf Of Junyu Jiang >> Sent: Wednesday, October 14, 2020 4:30 PM >> To: dev@dpdk.org >> Cc: Beilei Xing ; Wenzhuo Lu ; >> Junyu Jiang ; stable@dpdk.org >> Subject: [dpdk-dev] [PATCH] app/testpmd: fix flow flush with invalid port >> >> There is no error info displayed when running flow flush command with invalid >> port. This patch fixed the issue. >> >> Fixes: 2a449871a12d ("app/testpmd: align behaviour of multi-port detach") >> Cc: stable@dpdk.org >> >> Signed-off-by: Junyu Jiang >> --- >> app/test-pmd/config.c | 9 +++++---- >> 1 file changed, 5 insertions(+), 4 deletions(-) >> >> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index >> fe31a9d52..cc4527386 100644 >> --- a/app/test-pmd/config.c >> +++ b/app/test-pmd/config.c >> @@ -1775,16 +1775,17 @@ port_flow_flush(portid_t port_id) >> struct rte_port *port = &ports[port_id]; >> int ret = 0; >> >> + if (port_id_is_invalid(port_id, ENABLED_WARN) || >> + port_id == (portid_t)RTE_PORT_ALL) >> + return -EINVAL; >> + > > Also better to move the port initialize after this check to make the code clean? > +1