[dpdk-dev,2/2] net/ixgbe: fix a error type check for flow type

Message ID 1492658865-30077-2-git-send-email-wei.zhao1@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

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

Commit Message

Zhao1, Wei April 20, 2017, 3:27 a.m. UTC
  The type check for flow_type should be IXGBE_ATR_FLOW_TYPE_IPV4
in special card not RTE_ETH_FLOW_NONFRAG_IPV4_OTHER.

Fixes: dc0c16105d2 ("ixgbe: fix X550 flow director check")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_fdir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Wenzhuo Lu April 21, 2017, 2:48 a.m. UTC | #1
Hi Wei,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao
> Sent: Thursday, April 20, 2017 11:28 AM
> To: dev@dpdk.org
> Cc: Zhao1, Wei
> Subject: [dpdk-dev] [PATCH 2/2] net/ixgbe: fix a error type check for flow
> type
> 
> The type check for flow_type should be IXGBE_ATR_FLOW_TYPE_IPV4 in
> special card not RTE_ETH_FLOW_NONFRAG_IPV4_OTHER.
> 
> Fixes: dc0c16105d2 ("ixgbe: fix X550 flow director check")
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> ---
>  drivers/net/ixgbe/ixgbe_fdir.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c
> index 3b9d60c..6f19b91 100644
> --- a/drivers/net/ixgbe/ixgbe_fdir.c
> +++ b/drivers/net/ixgbe/ixgbe_fdir.c
> @@ -1241,7 +1241,7 @@ ixgbe_fdir_filter_program(struct rte_eth_dev *dev,
>  	     hw->mac.type == ixgbe_mac_X550EM_x ||
>  	     hw->mac.type == ixgbe_mac_X550EM_a) &&
>  	    (rule->ixgbe_fdir.formatted.flow_type ==
> -	     RTE_ETH_FLOW_NONFRAG_IPV4_OTHER) &&
> +	     IXGBE_ATR_FLOW_TYPE_IPV4) &&
>  	    (info->mask.src_port_mask != 0 ||
>  	     info->mask.dst_port_mask != 0)) {
>  		PMD_DRV_LOG(ERR, "By this device,"
> --
> 2.9.3
It's a good fix. But please change the comments and error log accordingly.
  
Zhao1, Wei April 27, 2017, 6:01 a.m. UTC | #2
Hi, Wenzhuo

> -----Original Message-----

> From: Lu, Wenzhuo

> Sent: Friday, April 21, 2017 10:49 AM

> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org

> Cc: Zhao1, Wei <wei.zhao1@intel.com>

> Subject: RE: [dpdk-dev] [PATCH 2/2] net/ixgbe: fix a error type check for flow

> type

> 

> Hi Wei,

> 

> > -----Original Message-----

> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao

> > Sent: Thursday, April 20, 2017 11:28 AM

> > To: dev@dpdk.org

> > Cc: Zhao1, Wei

> > Subject: [dpdk-dev] [PATCH 2/2] net/ixgbe: fix a error type check for

> > flow type

> >

> > The type check for flow_type should be IXGBE_ATR_FLOW_TYPE_IPV4 in

> > special card not RTE_ETH_FLOW_NONFRAG_IPV4_OTHER.

> >

> > Fixes: dc0c16105d2 ("ixgbe: fix X550 flow director check")

> >

> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

> > ---

> >  drivers/net/ixgbe/ixgbe_fdir.c | 2 +-

> >  1 file changed, 1 insertion(+), 1 deletion(-)

> >

> > diff --git a/drivers/net/ixgbe/ixgbe_fdir.c

> > b/drivers/net/ixgbe/ixgbe_fdir.c index 3b9d60c..6f19b91 100644

> > --- a/drivers/net/ixgbe/ixgbe_fdir.c

> > +++ b/drivers/net/ixgbe/ixgbe_fdir.c

> > @@ -1241,7 +1241,7 @@ ixgbe_fdir_filter_program(struct rte_eth_dev

> *dev,

> >  	     hw->mac.type == ixgbe_mac_X550EM_x ||

> >  	     hw->mac.type == ixgbe_mac_X550EM_a) &&

> >  	    (rule->ixgbe_fdir.formatted.flow_type ==

> > -	     RTE_ETH_FLOW_NONFRAG_IPV4_OTHER) &&

> > +	     IXGBE_ATR_FLOW_TYPE_IPV4) &&

> >  	    (info->mask.src_port_mask != 0 ||

> >  	     info->mask.dst_port_mask != 0)) {

> >  		PMD_DRV_LOG(ERR, "By this device,"

> > --

> > 2.9.3

> It’s a good fix. But please change the comments and error log accordingly.


I will commit a new v2 for this patch as your suggestion.
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c
index 3b9d60c..6f19b91 100644
--- a/drivers/net/ixgbe/ixgbe_fdir.c
+++ b/drivers/net/ixgbe/ixgbe_fdir.c
@@ -1241,7 +1241,7 @@  ixgbe_fdir_filter_program(struct rte_eth_dev *dev,
 	     hw->mac.type == ixgbe_mac_X550EM_x ||
 	     hw->mac.type == ixgbe_mac_X550EM_a) &&
 	    (rule->ixgbe_fdir.formatted.flow_type ==
-	     RTE_ETH_FLOW_NONFRAG_IPV4_OTHER) &&
+	     IXGBE_ATR_FLOW_TYPE_IPV4) &&
 	    (info->mask.src_port_mask != 0 ||
 	     info->mask.dst_port_mask != 0)) {
 		PMD_DRV_LOG(ERR, "By this device,"