[v1] net/i40e: clear FDIR SW input set when destroy rules

Message ID 20210615145259.51859-1-lingyu.liu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series [v1] net/i40e: clear FDIR SW input set when destroy rules |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-testing success Testing PASS
ci/github-robot success github build: passed
ci/iol-mellanox-Functional fail Functional Testing issues
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

Liu, Lingyu June 15, 2021, 2:52 p.m. UTC
  When a FDIR rule is destroyed, the corresponding input set needs
to be cleared.

Signed-off-by: Lingyu Liu <lingyu.liu@intel.com>
---
 drivers/net/i40e/i40e_fdir.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Xing, Beilei June 15, 2021, 8:36 a.m. UTC | #1
> -----Original Message-----
> From: Liu, Lingyu <lingyu.liu@intel.com>
> Sent: Tuesday, June 15, 2021 10:53 PM
> To: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>
> Cc: Liu, Lingyu <lingyu.liu@intel.com>
> Subject: [PATCH v1] net/i40e: clear FDIR SW input set when destroy rules
> 
> 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.

> Signed-off-by: Lingyu Liu <lingyu.liu@intel.com>
> ---
>  drivers/net/i40e/i40e_fdir.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index
> ac0e09bfdd..e679324c20 100644
> --- a/drivers/net/i40e/i40e_fdir.c
> +++ b/drivers/net/i40e/i40e_fdir.c
> @@ -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.

>  		pf->fdir.flex_mask_flag[pctype] = 0;
> 
>  		if (fdir_info->fdir_invalprio == 1)
> --
> 2.25.1
  

Patch

diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index ac0e09bfdd..e679324c20 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -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)