net/ice: add vni/tni support for flow inputset match
PATCH 1/1 net/ice: add vni/tni support for flow inputset match
For VXLAN/NVGRE packet, vni/tni should be included in the matching keys. This patch fixes this issue.
--- drivers/net/ice/ice_generic_flow.c | 8 ++++++++ drivers/net/ice/ice_generic_flow.h | 18 ++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-)
drivers/net/ice/ice_generic_flow.c +8 -0
@@ -464,6 +464,10 @@ static uint64_t ice_get_flow_field(const struct rte_flow_item pattern[], "Invalid VXLAN item");return 0 ; } +if (vxlan_mask->vni[0 ] ==UINT8_MAX && + vxlan_mask->vni[1 ] ==UINT8_MAX && + vxlan_mask->vni[2 ] ==UINT8_MAX ) + input_set |=ICE_INSET_TUN_ID ; is_tunnel =1 ;break ;
@@ -482,6 +486,10 @@ static uint64_t ice_get_flow_field(const struct rte_flow_item pattern[], "Invalid NVGRE item");return 0 ; } +if (nvgre_mask->tni[0 ] ==UINT8_MAX && + nvgre_mask->tni[1 ] ==UINT8_MAX && + nvgre_mask->tni[2 ] ==UINT8_MAX ) + input_set |=ICE_INSET_TUN_ID ; is_tunnel =1 ;break ;
drivers/net/ice/ice_generic_flow.h +12 -6
@@ -83,24 +83,30 @@ struct ice_flow_pattern { ICE_INSET_IPV6_HOP_LIMIT | ICE_INSET_IPV6_TOS | ICE_INSET_ICMP6)#define INSET_TUNNEL_IPV4_TYPE1 ( \ ICE_INSET_TUN_IPV4_SRC | ICE_INSET_TUN_IPV4_DST | \ - ICE_INSET_TUN_IPV4_TTL | ICE_INSET_TUN_IPV4_PROTO) + ICE_INSET_TUN_IPV4_TTL | ICE_INSET_TUN_IPV4_PROTO | \ + ICE_INSET_TUN_ID)#define INSET_TUNNEL_IPV4_TYPE2 ( \ ICE_INSET_TUN_IPV4_SRC | ICE_INSET_TUN_IPV4_DST | \ ICE_INSET_TUN_IPV4_TTL | ICE_INSET_TUN_IPV4_PROTO | \ - ICE_INSET_TUN_SRC_PORT | ICE_INSET_TUN_DST_PORT) + ICE_INSET_TUN_SRC_PORT | ICE_INSET_TUN_DST_PORT | \ + ICE_INSET_TUN_ID)#define INSET_TUNNEL_IPV4_TYPE3 ( \ ICE_INSET_TUN_IPV4_SRC | ICE_INSET_TUN_IPV4_DST | \ - ICE_INSET_TUN_IPV4_TTL | ICE_INSET_ICMP) + ICE_INSET_TUN_IPV4_TTL | ICE_INSET_ICMP | \ + ICE_INSET_TUN_ID)#define INSET_TUNNEL_IPV6_TYPE1 ( \ ICE_INSET_TUN_IPV6_SRC | ICE_INSET_TUN_IPV6_DST | \ - ICE_INSET_TUN_IPV6_TTL | ICE_INSET_TUN_IPV6_PROTO) + ICE_INSET_TUN_IPV6_TTL | ICE_INSET_TUN_IPV6_PROTO | \ + ICE_INSET_TUN_ID)#define INSET_TUNNEL_IPV6_TYPE2 ( \ ICE_INSET_TUN_IPV6_SRC | ICE_INSET_TUN_IPV6_DST | \ ICE_INSET_TUN_IPV6_TTL | ICE_INSET_TUN_IPV6_PROTO | \ - ICE_INSET_TUN_SRC_PORT | ICE_INSET_TUN_DST_PORT) + ICE_INSET_TUN_SRC_PORT | ICE_INSET_TUN_DST_PORT | \ + ICE_INSET_TUN_ID)#define INSET_TUNNEL_IPV6_TYPE3 ( \ ICE_INSET_TUN_IPV6_SRC | ICE_INSET_TUN_IPV6_DST | \ - ICE_INSET_TUN_IPV6_TTL | ICE_INSET_ICMP6) + ICE_INSET_TUN_IPV6_TTL | ICE_INSET_ICMP6 | \ + ICE_INSET_TUN_ID)/* L2 */ static enum rte_flow_item_type pattern_ethertype[] = {
Signature · 1 line
1.8.3.1
Quoted 10 lines
-----Original Message-----
From: Wang, Ying A
Sent: Wednesday, July 24, 2019 7:21 AM
To: Zhang, Qi Z <[email protected]>
Cc: Yang, Qiming <[email protected]>; [email protected]; Wang, Ying A <[email protected]>; [email protected]
Subject: [PATCH] net/ice: add vni/tni support for flow inputset match
Quoted 5 lines
For VXLAN/NVGRE packet, vni/tni should be included in the matching keys. This patch fixes this issue.
Fixes d76116a4678f ("net/ice: add generic flow API")
No need to cc stable since fix for current release.
Quoted 3 lines
Signed-off-by Wang Ying A <[email protected]>---
Thanks
Qi
Zhang, Qi Z
AppliedQuoted 26 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Zhang, Qi Z
Sent: Wednesday, July 24, 2019 9:07 PM
To: Wang, Ying A <[email protected]>
Cc: Yang, Qiming <[email protected]>; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH] net/ice: add vni/tni support for flow inputset matchQuoted 8 lines
-----Original Message-----
From: Wang, Ying A
Sent: Wednesday, July 24, 2019 7:21 AM
To: Zhang, Qi Z <[email protected]>
Cc: Yang, Qiming <[email protected]>; [email protected]; Wang, Ying A <[email protected]>; [email protected]
Subject: [PATCH] net/ice: add vni/tni support for flow inputset matchQuoted 5 lines
For VXLAN/NVGRE packet, vni/tni should be included in the matching keys. This patch fixes this issue.
Fixes d76116a4678f ("net/ice: add generic flow API")
Quoted 7 lines
No need to cc stable since fix for current release.
Quoted 3 lines
Signed-off-by Wang Ying A <[email protected]>---
Acked-by Qi Zhang <[email protected]>
Applied to dpdk-next-net-intel.
Quoted 3 lines
Thanks
Qi