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

Message ID 20191112005056.30805-3-shougangx.wang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: xiaolong ye
Headers
Series [v3,1/4] net/ice: fix memzone reserve and 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, 12:50 a.m. UTC
  The removal of FDIR profile should start from ICE_FLTR_PTYPE_NONF_IPV4_UDP.

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

Qi Zhang Nov. 12, 2019, 7:50 a.m. UTC | #1
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Wang ShougangX
> Sent: Tuesday, November 12, 2019 8:51 AM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Wang, ShougangX <shougangx.wang@intel.com>
> Subject: [dpdk-dev] [PATCH v3 2/4] net/ice: fix removal of FDIR profile
> 
> The removal of FDIR profile should start from
> ICE_FLTR_PTYPE_NONF_IPV4_UDP.
> 
> 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..f728b9062 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_IPV4_UDP;

Is "ptype = ICE_FLTR_PTYPE_NONF_NONE + 1" better?, so we don't need to worry profile be re-ordered or new one be inserted in future.


>  	     ptype < ICE_FLTR_PTYPE_MAX;
>  	     ptype++) {
>  		ice_fdir_prof_rm(pf, ptype, false);
> --
> 2.17.1
  
Shougang Wang Nov. 12, 2019, 8:03 a.m. UTC | #2
Hi, Qi

> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Tuesday, November 12, 2019 3:51 PM
> To: Wang, ShougangX <shougangx.wang@intel.com>; dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Wang, ShougangX <shougangx.wang@intel.com>
> Subject: RE: [dpdk-dev] [PATCH v3 2/4] net/ice: fix removal of FDIR profile
> 
> 
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Wang ShougangX
> > Sent: Tuesday, November 12, 2019 8:51 AM
> > To: dev@dpdk.org
> > Cc: Yang, Qiming <qiming.yang@intel.com>; Xing, Beilei
> > <beilei.xing@intel.com>; Wang, ShougangX <shougangx.wang@intel.com>
> > Subject: [dpdk-dev] [PATCH v3 2/4] net/ice: fix removal of FDIR
> > profile
> >
> > The removal of FDIR profile should start from
> > ICE_FLTR_PTYPE_NONF_IPV4_UDP.
> >
> > 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..f728b9062 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_IPV4_UDP;
> 
> Is "ptype = ICE_FLTR_PTYPE_NONF_NONE + 1" better?, so we don't need to
> worry profile be re-ordered or new one be inserted in future.
yes, it is better. I will change it in next version. Thank you very much.

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

Thanks.
Shougang
  

Patch

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index a89c506c0..f728b9062 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_IPV4_UDP;
 	     ptype < ICE_FLTR_PTYPE_MAX;
 	     ptype++) {
 		ice_fdir_prof_rm(pf, ptype, false);