DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix recreate a flexible FDIR rule failed
@ 2020-09-15  6:52 Guinan Sun
  2020-09-16 10:49 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Guinan Sun @ 2020-09-15  6:52 UTC (permalink / raw)
  To: dev; +Cc: Jeff Guo, Beilei Xing, Guinan Sun, stable

This patch fixes the failure of recreate flexible fdir rule.
The root cause is that the flex_mask_flag is not reset during
flow destroy and flow flush.

Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FDIR")
Cc: stable@dpdk.org

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
 drivers/net/i40e/i40e_fdir.c | 2 ++
 drivers/net/i40e/i40e_flow.c | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 8e87b4a00..aa8e72949 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1882,6 +1882,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
 			return -EINVAL;
 		}
 
+		pf->fdir.flex_mask_flag[pctype] = 0;
+
 		if (fdir_info->fdir_invalprio == 1)
 			wait_status = false;
 	}
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 51d8fdd79..adc5da1c5 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -5679,8 +5679,10 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
 			I40E_MAX_FDIR_FILTER_NUM);
 
 		for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
-		     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++)
+		     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) {
 			pf->fdir.inset_flag[pctype] = 0;
+			pf->fdir.flex_mask_flag[pctype] = 0;
+		}
 
 		/* Disable FDIR processing as all FDIR rules are now flushed */
 		i40e_fdir_rx_proc_enable(dev, 0);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/i40e: fix recreate a flexible FDIR rule failed
  2020-09-15  6:52 [dpdk-dev] [PATCH] net/i40e: fix recreate a flexible FDIR rule failed Guinan Sun
@ 2020-09-16 10:49 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2020-09-16 10:49 UTC (permalink / raw)
  To: Sun, GuinanX, dev; +Cc: Guo, Jia, Xing, Beilei, Sun, GuinanX, stable



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Guinan Sun
> Sent: Tuesday, September 15, 2020 2:52 PM
> To: dev@dpdk.org
> Cc: Guo, Jia <jia.guo@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Sun,
> GuinanX <guinanx.sun@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/i40e: fix recreate a flexible FDIR rule failed
> 
> This patch fixes the failure of recreate flexible fdir rule.
> The root cause is that the flex_mask_flag is not reset during flow destroy and
> flow flush.
> 
> Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FDIR")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Guinan Sun <guinanx.sun@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com.

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15  6:52 [dpdk-dev] [PATCH] net/i40e: fix recreate a flexible FDIR rule failed Guinan Sun
2020-09-16 10:49 ` Zhang, Qi Z

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox