Skip to contentSkip to conversation

net/i40e: fix recreate a flexible FDIR rule failed

PATCH Applied Guinan Sun 2 participants 2 messages Sep 15, 2020 – Sep 16, 2020 Network drivers

lore
Share & tools
lore

Guinan Sun

author
#0 lore raw

PATCH 1/1 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")
---
 drivers/net/i40e/i40e_fdir.c | 2 ++
 drivers/net/i40e/i40e_flow.c | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/net/i40e/i40e_fdir.c +2 -0
index 8e87b4a00..aa8e72949 100644
@@ -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;
 	}
drivers/net/i40e/i40e_flow.c +3 -1
index 51d8fdd79..adc5da1c5 100644
@@ -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);
Signature · 1 line
2.17.1
Acked-by Qi Zhang on v1 1/1 Applied
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Guinan Sun
Sent: Tuesday, September 15, 2020 2:52 PM
To: [email protected]
Cc: Guo, Jia <[email protected]>; Xing, Beilei <[email protected]>; Sun, GuinanX <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] net/i40e: fix recreate a flexible FDIR rule failed

Quoted 8 lines

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")

Applied to dpdk-next-net-intel.

Thanks
Qi