[v4,2/4] net/ice: fix removal of FDIR profile

Message ID 20191112035011.67537-3-shougangx.wang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: xiaolong ye
Headers
Series net/ice: fix memory release in FDIR |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Shougang Wang Nov. 12, 2019, 3:50 a.m. UTC
  The removal of FDIR profile should start from the next
of ICE_FLTR_PTYPE_NONF_NONE.

Fixes: 109e8e06249e ("net/ice: configure HW flow director rule")

Signed-off-by: Wang ShougangX <shougangx.wang@intel.com>
---
 drivers/net/ice/ice_fdir_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Qiming Yang Nov. 12, 2019, 10:36 a.m. UTC | #1
Hi,

> -----Original Message-----
> From: Wang, ShougangX
> Sent: Tuesday, November 12, 2019 11:50 AM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Wang, ShougangX <shougangx.wang@intel.com>
> Subject: [PATCH v4 2/4] net/ice: fix removal of FDIR profile
> 
> The removal of FDIR profile should start from the next of
> ICE_FLTR_PTYPE_NONF_NONE.
> 
> Fixes: 109e8e06249e ("net/ice: configure HW flow director rule")
> 
> Signed-off-by: Wang ShougangX <shougangx.wang@intel.com>
> ---
>  drivers/net/ice/ice_fdir_filter.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
> index a89c506c0..039e00a28 100644
> --- a/drivers/net/ice/ice_fdir_filter.c
> +++ b/drivers/net/ice/ice_fdir_filter.c
> @@ -571,7 +571,7 @@ ice_fdir_prof_rm_all(struct ice_pf *pf)  {
>  	enum ice_fltr_ptype ptype;
> 
> -	for (ptype = ICE_FLTR_PTYPE_NONF_NONE;
> +	for (ptype = ICE_FLTR_PTYPE_NONF_NONE + 1;

I think we should also use ICE_FLTR_PTYPE_NONF_NONE + 1 instead of ICE_FLTR_PTYPE_TCP_IPV4 in prof_add,
To make sure it is symmetric. And it should be contained in this patch.

>  	     ptype < ICE_FLTR_PTYPE_MAX;
>  	     ptype++) {
>  		ice_fdir_prof_rm(pf, ptype, false);
> --
> 2.17.1
  
Shougang Wang Nov. 13, 2019, 6:21 a.m. UTC | #2
Hi, Qiming

> -----Original Message-----
> From: Yang, Qiming
> Sent: Tuesday, November 12, 2019 6:37 PM
> To: Wang, ShougangX <shougangx.wang@intel.com>; dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: RE: [PATCH v4 2/4] net/ice: fix removal of FDIR profile
> 
> Hi,
> 
> > -----Original Message-----
> > From: Wang, ShougangX
> > Sent: Tuesday, November 12, 2019 11:50 AM
> > To: dev@dpdk.org
> > Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> > <qi.z.zhang@intel.com>; Wang, ShougangX <shougangx.wang@intel.com>
> > Subject: [PATCH v4 2/4] net/ice: fix removal of FDIR profile
> >
> > The removal of FDIR profile should start from the next of
> > ICE_FLTR_PTYPE_NONF_NONE.
> >
> > Fixes: 109e8e06249e ("net/ice: configure HW flow director rule")
> >
> > Signed-off-by: Wang ShougangX <shougangx.wang@intel.com>
> > ---
> >  drivers/net/ice/ice_fdir_filter.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ice/ice_fdir_filter.c
> > b/drivers/net/ice/ice_fdir_filter.c
> > index a89c506c0..039e00a28 100644
> > --- a/drivers/net/ice/ice_fdir_filter.c
> > +++ b/drivers/net/ice/ice_fdir_filter.c
> > @@ -571,7 +571,7 @@ ice_fdir_prof_rm_all(struct ice_pf *pf)  {
> >  	enum ice_fltr_ptype ptype;
> >
> > -	for (ptype = ICE_FLTR_PTYPE_NONF_NONE;
> > +	for (ptype = ICE_FLTR_PTYPE_NONF_NONE + 1;
> 
> I think we should also use ICE_FLTR_PTYPE_NONF_NONE + 1 instead of
> ICE_FLTR_PTYPE_TCP_IPV4 in prof_add, To make sure it is symmetric. And it
> should be contained in this patch.
OK, I will replace them.

> 
> >  	     ptype < ICE_FLTR_PTYPE_MAX;
> >  	     ptype++) {
> >  		ice_fdir_prof_rm(pf, ptype, false);
> > --
> > 2.17.1
  

Patch

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index a89c506c0..039e00a28 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -571,7 +571,7 @@  ice_fdir_prof_rm_all(struct ice_pf *pf)
 {
 	enum ice_fltr_ptype ptype;
 
-	for (ptype = ICE_FLTR_PTYPE_NONF_NONE;
+	for (ptype = ICE_FLTR_PTYPE_NONF_NONE + 1;
 	     ptype < ICE_FLTR_PTYPE_MAX;
 	     ptype++) {
 		ice_fdir_prof_rm(pf, ptype, false);