[v2,1/3] net/i40e: fix FDIR issue for ARP packets

Message ID 20200428054815.3551-2-wei.zhao1@intel.com (mailing list archive)
State Superseded, archived
Delegated to: xiaolong ye
Headers
Series fix i40e bug for flow filter |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Zhao1, Wei April 28, 2020, 5:48 a.m. UTC
  This patch can enable FDIR awith ethertype as input set for ARP
packet, it will associate this rule, "flow create 0 ingress pattern
eth type is 0x0806 / end actions mark id 0x86 / rss / end", with
pctype I40E_FILTER_PCTYPE_L2_PAYLOAD for ARP packet rule.
I have tried to enable ARP ethertype for FDIR filter,
it work well for ARP for FDIR filter, so delete the check.

Bugzilla ID: 402
Fixes: 42044b69c67d ("net/i40e: support input set selection for FDIR")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 2 --
 1 file changed, 2 deletions(-)
  

Comments

Xing, Beilei April 28, 2020, 7:38 a.m. UTC | #1
> -----Original Message-----
> From: Zhao1, Wei <wei.zhao1@intel.com>
> Sent: Tuesday, April 28, 2020 1:48 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Xing, Beilei <beilei.xing@intel.com>;
> maxime.leroy@6wind.com; Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [PATCH v2 1/3] net/i40e: fix FDIR issue for ARP packets
> 
> This patch can enable FDIR awith ethertype as input set for ARP packet, it will
> associate this rule, "flow create 0 ingress pattern eth type is 0x0806 / end
> actions mark id 0x86 / rss / end", with pctype
> I40E_FILTER_PCTYPE_L2_PAYLOAD for ARP packet rule.
> I have tried to enable ARP ethertype for FDIR filter, it work well for ARP for
> FDIR filter, so delete the check.

How about 
'Currently, flow "pattern eth type is 0x0806 / end actions mark id 0x86 / rss / end" can't be created successfully. FDIR parser shouldn't deny RTE_ETHER_TYPE_ARP since ARP packets will be parsed as PCTYPE_L2_PAYLOAD.
This patch fixes the issue.' ?

> 
> Bugzilla ID: 402
> Fixes: 42044b69c67d ("net/i40e: support input set selection for FDIR")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> ---
>  drivers/net/i40e/i40e_flow.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index
> 7e64ae53a..1533d5abb 100644
> --- a/drivers/net/i40e/i40e_flow.c
> +++ b/drivers/net/i40e/i40e_flow.c
> @@ -2666,7 +2666,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev
> *dev,
>  				if (next_type ==
> RTE_FLOW_ITEM_TYPE_VLAN ||
>  				    ether_type == RTE_ETHER_TYPE_IPV4 ||
>  				    ether_type == RTE_ETHER_TYPE_IPV6 ||
> -				    ether_type == RTE_ETHER_TYPE_ARP ||
>  				    ether_type == outer_tpid) {
>  					rte_flow_error_set(error, EINVAL,
> 
> RTE_FLOW_ERROR_TYPE_ITEM,
> @@ -2711,7 +2710,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev
> *dev,
> 
>  				if (ether_type == RTE_ETHER_TYPE_IPV4 ||
>  				    ether_type == RTE_ETHER_TYPE_IPV6 ||
> -				    ether_type == RTE_ETHER_TYPE_ARP ||
>  				    ether_type == outer_tpid) {
>  					rte_flow_error_set(error, EINVAL,
> 
> RTE_FLOW_ERROR_TYPE_ITEM,
> --
> 2.19.1
  
Zhao1, Wei April 28, 2020, 7:46 a.m. UTC | #2
> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Tuesday, April 28, 2020 3:38 PM
> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org; maxime.leroy@6wind.com
> Subject: RE: [PATCH v2 1/3] net/i40e: fix FDIR issue for ARP packets
> 
> 
> 
> > -----Original Message-----
> > From: Zhao1, Wei <wei.zhao1@intel.com>
> > Sent: Tuesday, April 28, 2020 1:48 PM
> > To: dev@dpdk.org
> > Cc: stable@dpdk.org; Xing, Beilei <beilei.xing@intel.com>;
> > maxime.leroy@6wind.com; Zhao1, Wei <wei.zhao1@intel.com>
> > Subject: [PATCH v2 1/3] net/i40e: fix FDIR issue for ARP packets
> >
> > This patch can enable FDIR awith ethertype as input set for ARP
> > packet, it will associate this rule, "flow create 0 ingress pattern
> > eth type is 0x0806 / end actions mark id 0x86 / rss / end", with
> > pctype I40E_FILTER_PCTYPE_L2_PAYLOAD for ARP packet rule.
> > I have tried to enable ARP ethertype for FDIR filter, it work well for
> > ARP for FDIR filter, so delete the check.
> 
> How about
> 'Currently, flow "pattern eth type is 0x0806 / end actions mark id 0x86 / rss /
> end" can't be created successfully. FDIR parser shouldn't deny
> RTE_ETHER_TYPE_ARP since ARP packets will be parsed as
> PCTYPE_L2_PAYLOAD.
> This patch fixes the issue.' ?

Ok 

> 
> >
> > Bugzilla ID: 402
> > Fixes: 42044b69c67d ("net/i40e: support input set selection for FDIR")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> > ---
> >  drivers/net/i40e/i40e_flow.c | 2 --
> >  1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/net/i40e/i40e_flow.c
> > b/drivers/net/i40e/i40e_flow.c index 7e64ae53a..1533d5abb 100644
> > --- a/drivers/net/i40e/i40e_flow.c
> > +++ b/drivers/net/i40e/i40e_flow.c
> > @@ -2666,7 +2666,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev
> > *dev,
> >  				if (next_type ==
> > RTE_FLOW_ITEM_TYPE_VLAN ||
> >  				    ether_type == RTE_ETHER_TYPE_IPV4 ||
> >  				    ether_type == RTE_ETHER_TYPE_IPV6 ||
> > -				    ether_type == RTE_ETHER_TYPE_ARP ||
> >  				    ether_type == outer_tpid) {
> >  					rte_flow_error_set(error, EINVAL,
> >
> > RTE_FLOW_ERROR_TYPE_ITEM,
> > @@ -2711,7 +2710,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev
> > *dev,
> >
> >  				if (ether_type == RTE_ETHER_TYPE_IPV4 ||
> >  				    ether_type == RTE_ETHER_TYPE_IPV6 ||
> > -				    ether_type == RTE_ETHER_TYPE_ARP ||
> >  				    ether_type == outer_tpid) {
> >  					rte_flow_error_set(error, EINVAL,
> >
> > RTE_FLOW_ERROR_TYPE_ITEM,
> > --
> > 2.19.1
  

Patch

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 7e64ae53a..1533d5abb 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2666,7 +2666,6 @@  i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 				if (next_type == RTE_FLOW_ITEM_TYPE_VLAN ||
 				    ether_type == RTE_ETHER_TYPE_IPV4 ||
 				    ether_type == RTE_ETHER_TYPE_IPV6 ||
-				    ether_type == RTE_ETHER_TYPE_ARP ||
 				    ether_type == outer_tpid) {
 					rte_flow_error_set(error, EINVAL,
 						     RTE_FLOW_ERROR_TYPE_ITEM,
@@ -2711,7 +2710,6 @@  i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 
 				if (ether_type == RTE_ETHER_TYPE_IPV4 ||
 				    ether_type == RTE_ETHER_TYPE_IPV6 ||
-				    ether_type == RTE_ETHER_TYPE_ARP ||
 				    ether_type == outer_tpid) {
 					rte_flow_error_set(error, EINVAL,
 						     RTE_FLOW_ERROR_TYPE_ITEM,