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 25062A0093 for ; Wed, 20 May 2020 05:19:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 00D8E1D5DE; Wed, 20 May 2020 05:19:01 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id E99981D14F; Wed, 20 May 2020 05:18:57 +0200 (CEST) IronPort-SDR: nh8qUA8WRrT1GLR2DYxAv12tsK6/LIVMklKhNvyrcfMyouBXIg8tsg6B6tYzADYNYR5cPsVwtg 7oIRKac/3bCA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2020 20:18:57 -0700 IronPort-SDR: cg5tXtDcrrVyR2jZxrGDzq+MZDIhi0Fus7Xnwub9WTOV67PwyDlfevurG6gjLzS1emwc5G+K8L GzZCumFdHeYQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,412,1583222400"; d="scan'208";a="264535283" Received: from jguo15x-mobl.ccr.corp.intel.com (HELO [10.67.68.174]) ([10.67.68.174]) by orsmga003.jf.intel.com with ESMTP; 19 May 2020 20:18:55 -0700 To: Wei Zhao , dev@dpdk.org Cc: stable@dpdk.org, beilei.xing@intel.com References: <20200519071652.26537-1-wei.zhao1@intel.com> From: Jeff Guo Message-ID: Date: Wed, 20 May 2020 11:18:54 +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: <20200519071652.26537-1-wei.zhao1@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-stable] [PATCH] net/i40e: fix flow FDIR enable issue 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" hi, zhaowei On 5/19/2020 3:16 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 FDRI for all queues. And also, disable FDIR typo: FDRI -> FDIR, and could you modify something commit if you agree on below inline comment. Thanks. > for queues should be done in function i40e_flow_flush_fdir_filter(). > > Cc: stable@dpdk.org > Fixes: 1491f63c7559 ("net/i40e: fix flush of flow director filter") > Fixes: 6ae9b2b5e8c2 ("net/i40e: cache flow director enable value in Rx queue") > > Signed-off-by: Wei Zhao > --- > drivers/net/i40e/i40e_flow.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c > index 25c77e7aa..94fc73092 100644 > --- a/drivers/net/i40e/i40e_flow.c > +++ b/drivers/net/i40e/i40e_flow.c > @@ -3462,6 +3462,12 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev, > } > } > > + /* If the flow list is empty, it is the first time to create > + * rule after flush fdir filter, so enable fdir. > + */ So either flush fdir filter or destroy the last fdir, it will result the flow list to be empty, could it simply as "If create the first fdir rule, enable fdir" or? > + if (TAILQ_EMPTY(&pf->fdir.fdir_list)) > + i40e_fdir_rx_proc_enable(dev, 1); > + > return 0; > err: > i40e_fdir_teardown(pf); > @@ -5330,9 +5336,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 +5371,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;