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 2789AA0093; Fri, 22 May 2020 04:16:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A773A1D8CD; Fri, 22 May 2020 04:16:14 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 66A291D8CC; Fri, 22 May 2020 04:16:13 +0200 (CEST) IronPort-SDR: y3VznQRvHEX4BF0odA4MsLEfyeNYsxYI6DU9RS/8WZ586ziLFojPeAaDErY2E3N+ipQ/yAB56w pcZcssMJUKfA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2020 19:16:12 -0700 IronPort-SDR: YNy2LhDvxLuT3qrdmRDPuSBNbxT0eSHX81Ik8tKWb+Aob89h6pqHyw5vLLWXrRHz8c4P1L8mW3 q07FlijIjQ0Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,420,1583222400"; d="scan'208";a="268857783" Received: from unknown (HELO [10.67.68.61]) ([10.67.68.61]) by orsmga006.jf.intel.com with ESMTP; 21 May 2020 19:16:10 -0700 To: "Zhao1, Wei" , "dev@dpdk.org" Cc: "stable@dpdk.org" , "Xing, Beilei" , "Ye, Xiaolong" References: <20200519071652.26537-1-wei.zhao1@intel.com> <20200521080306.17404-1-wei.zhao1@intel.com> From: Jeff Guo Message-ID: <73d177ff-76e6-757e-47d5-9e4f8939f014@intel.com> Date: Fri, 22 May 2020 10:16:09 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: fix flow FDIR enable issue 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" hi, zhaowei On 5/22/2020 8:59 AM, Zhao1, Wei wrote: > Hi, jia > >> -----Original Message----- >> From: Guo, Jia >> Sent: Thursday, May 21, 2020 10:27 PM >> To: Zhao1, Wei ; dev@dpdk.org >> Cc: stable@dpdk.org; Xing, Beilei ; Ye, Xiaolong >> >> Subject: Re: [PATCH v2] net/i40e: fix flow FDIR enable issue >> >> hi, zhaowei >> >> On 5/21/2020 4:03 PM, Wei Zhao wrote: >>> When we flush flow FDIR, all queues are disabled for FDIR. >>> If FDIR rule is created again, then the flow list is empty, as it is >>> the first time to create rule after flush fdir filter, so we need to >>> enable FDIR for all queues. And also, disable FDIR for queues should >>> be done in function i40e_flow_flush_fdir_filter(). >>> >>> Fixes: 1491f63c7559 ("net/i40e: fix flush of flow director filter") >>> Fixes: 6ae9b2b5e8c2 ("net/i40e: cache flow director enable value in Rx >>> queue") >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Wei Zhao >>> >>> --- >>> >>> v2: >>> update log info >>> --- >>> drivers/net/i40e/i40e_flow.c | 10 +++++++--- >>> 1 file changed, 7 insertions(+), 3 deletions(-) >>> >>> diff --git a/drivers/net/i40e/i40e_flow.c >>> b/drivers/net/i40e/i40e_flow.c index 25c77e7aa..8f8df6fae 100644 >>> --- a/drivers/net/i40e/i40e_flow.c >>> +++ b/drivers/net/i40e/i40e_flow.c >>> @@ -3462,6 +3462,10 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev >> *dev, >>> } >>> } >>> >>> +/* If create the first fdir rule, enable fdir check for rx queues */ >>> +if (TAILQ_EMPTY(&pf->fdir.fdir_list)) >>> +i40e_fdir_rx_proc_enable(dev, 1); >>> + >> >> Do you think it is make sense that move the configure out of the priors >> condition? If so the list empty check is no need here. >> >> if (pf->fdir.fdir_vsi == NULL) { >> ..... >> } >> >> ret = i40e_fdir_configure(dev); >> > That seems more reasonable, but I do not know what will happen for this , because > That will cause i40e_fdir_configure() be called every time when download rule. > I dare not make this change for fear of introducing more problems. make sense. >>> return 0; >>> err: >>> i40e_fdir_teardown(pf); >>> @@ -5330,9 +5334,6 @@ i40e_flow_flush(struct rte_eth_dev *dev, struct >> rte_flow_error *error) >>> return -rte_errno; >>> } >>> >>> -/* Disable FDIR processing as all FDIR rules are now flushed */ >>> -i40e_fdir_rx_proc_enable(dev, 0); >>> - >>> return ret; >>> } >>> >>> @@ -5368,6 +5369,9 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf) >>> for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP; >>> pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) >>> pf->fdir.inset_flag[pctype] = 0; >>> + >>> +/* Disable FDIR processing as all FDIR rules are now flushed */ >>> +i40e_fdir_rx_proc_enable(dev, 0); >>> } >>> >>> return ret; Reviewed-by: Jeff Guo