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 B8E7FA0093 for ; Tue, 19 May 2020 11:37:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 873461D16B; Tue, 19 May 2020 11:37:04 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id EC2E51D16B; Tue, 19 May 2020 11:37:01 +0200 (CEST) IronPort-SDR: jgFsY49d6FwhixXFhH7L0qhtOOBYYSNAfuJo+VJZzPUOcZE8mYOHu0Lcc6JdBDKCtPOzVSlCVz 5SUzk3E8dRUQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2020 02:36:34 -0700 IronPort-SDR: qfKAUaE6PYUXKueYFaV52da26Xopc0vD2sADhS31Ba5syEk3ombKv5jxor5Uz2+snuGMiLJ0S1 l5ozW75+YggQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,409,1583222400"; d="scan'208";a="411577076" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 19 May 2020 02:36:34 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 02:36:34 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 02:36:33 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.178]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.13]) with mapi id 14.03.0439.000; Tue, 19 May 2020 17:36:32 +0800 From: "Cui, LunyuanX" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "stable@dpdk.org" , "Xing, Beilei" , "Guo, Jia" , "Zhao1, Wei" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: fix flow FDIR enable issue Thread-Index: AQHWLbDKPLXMbpwJeEyBkjziBKVG8qivJiTA Date: Tue, 19 May 2020 09:36:31 +0000 Message-ID: References: <20200519071652.26537-1-wei.zhao1@intel.com> In-Reply-To: <20200519071652.26537-1-wei.zhao1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] [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" Tested-by: Cui, Lunyuan > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao > Sent: Tuesday, May 19, 2020 3:17 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Xing, Beilei ; Guo, Jia > ; Zhao1, Wei > Subject: [dpdk-dev] [PATCH] net/i40e: fix flow FDIR enable issue >=20 > 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 qu= eues. > And also, disable FDIR for queues should be done in function > i40e_flow_flush_fdir_filter(). >=20 > 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") >=20 > Signed-off-by: Wei Zhao > --- > drivers/net/i40e/i40e_flow.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) >=20 > 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, > } > } >=20 > + /* If the flow list is empty, it is the first time to create > + * rule after flush fdir filter, so enable fdir. > + */ > + 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; > } >=20 > - /* Disable FDIR processing as all FDIR rules are now flushed */ > - i40e_fdir_rx_proc_enable(dev, 0); > - > return ret; > } >=20 > @@ -5368,6 +5371,9 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf) > for (pctype =3D I40E_FILTER_PCTYPE_NONF_IPV4_UDP; > pctype <=3D I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) > pf->fdir.inset_flag[pctype] =3D 0; > + > + /* Disable FDIR processing as all FDIR rules are now flushed > */ > + i40e_fdir_rx_proc_enable(dev, 0); > } >=20 > return ret; > -- > 2.19.1