net/i40e: clear FDIR SW input set when destroy rules
PATCH 1/1 net/i40e: clear FDIR SW input set when destroy rules
When a FDIR rule is destroyed, the corresponding input set needs to be cleared.
--- drivers/net/i40e/i40e_fdir.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/i40e/i40e_fdir.c +4 -0
@@ -1845,6 +1845,10 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,return -EINVAL ; } +/* clear input_set flag */ + pf->fdir.input_set[pctype] =0 ; + pf->fdir.inset_flag[pctype] =0 ; + pf->fdir.flex_mask_flag[pctype] =0 ;if (fdir_info->fdir_invalprio ==1 )
Signature · 1 line
2.25.1
Quoted 10 lines
-----Original Message-----
From: Liu, Lingyu <[email protected]>
Sent: Tuesday, June 15, 2021 10:53 PM
To: [email protected]; Zhang, Qi Z <[email protected]>; Xing, Beilei <[email protected]>
Cc: Liu, Lingyu <[email protected]>
Subject: [PATCH v1] net/i40e: clear FDIR SW input set when destroy rules
Quoted 3 lines
When a FDIR rule is destroyed, the corresponding input set needs to be cleared.
The fix should be if deleting all the rules of some PCTYPE, then the input set need to reset.
Missed fix line.
Quoted 10 lines
Signed-off-by Lingyu Liu <[email protected]>--- drivers/net/i40e/i40e_fdir.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/i40e/i40e_fdir.c index renamed from drivers/net/i40e/i40e_fdir.c +0
-0
ac0e09bfdd..e679324c20100644
drivers/net/i40e/i40e_fdir.c i40e_flow_add_del_fdir_filter(struct rte_eth_dev · line 1852
Quoted 8 lines
drivers/net/i40e/i40e_fdir.c +4
-0@@ -1845,6 +1845,10 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev, return -EINVAL ; } +/* clear input_set flag */ + pf->fdir.input_set[pctype] =0 ; + pf->fdir.inset_flag[pctype] =0 ; +
So should check if it's the last rule of the pctype.
Quoted 5 lines
drivers/net/i40e/i40e_fdir.c +0
-0pf->fdir.flex_mask_flag[pctype] =0 ;if (
fdir_info->fdir_invalprio== 1)
--
2.25.1