* [dpdk-dev] [PATCH] net/iavf: support outer IP hash for GTPU
@ 2020-08-28 8:03 alvinx.zhang
2020-08-31 6:43 ` [dpdk-dev] [PATCH v2] " alvinx.zhang
0 siblings, 1 reply; 2+ messages in thread
From: alvinx.zhang @ 2020-08-28 8:03 UTC (permalink / raw)
To: jia.guo, qi.z.zhang; +Cc: dev, Alvin Zhang
From: Alvin Zhang <alvinx.zhang@intel.com>
Add patterns for GTPU, now outer IP hash can be configured as input set for
GTPU packet.
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
drivers/net/iavf/iavf_generic_flow.c | 18 ++++++
drivers/net/iavf/iavf_generic_flow.h | 2 +
drivers/net/iavf/iavf_hash.c | 110 +++++++++++++++++++++++++++++++++++
3 files changed, 130 insertions(+)
diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c
index 44fab4d..463f2c1 100644
--- a/drivers/net/iavf/iavf_generic_flow.c
+++ b/drivers/net/iavf/iavf_generic_flow.c
@@ -342,6 +342,15 @@ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu[] = {
RTE_FLOW_ITEM_TYPE_END,
};
+enum rte_flow_item_type iavf_pattern_eth_vlan_ipv4_gtpu[] = {
+ RTE_FLOW_ITEM_TYPE_ETH,
+ RTE_FLOW_ITEM_TYPE_VLAN,
+ RTE_FLOW_ITEM_TYPE_IPV4,
+ RTE_FLOW_ITEM_TYPE_UDP,
+ RTE_FLOW_ITEM_TYPE_GTPU,
+ RTE_FLOW_ITEM_TYPE_END,
+};
+
enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
@@ -378,6 +387,15 @@ enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu[] = {
RTE_FLOW_ITEM_TYPE_END,
};
+enum rte_flow_item_type iavf_pattern_eth_vlan_ipv6_gtpu[] = {
+ RTE_FLOW_ITEM_TYPE_ETH,
+ RTE_FLOW_ITEM_TYPE_VLAN,
+ RTE_FLOW_ITEM_TYPE_IPV6,
+ RTE_FLOW_ITEM_TYPE_UDP,
+ RTE_FLOW_ITEM_TYPE_GTPU,
+ RTE_FLOW_ITEM_TYPE_END,
+};
+
enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu_eh[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
diff --git a/drivers/net/iavf/iavf_generic_flow.h b/drivers/net/iavf/iavf_generic_flow.h
index eb466f9..507bf61 100644
--- a/drivers/net/iavf/iavf_generic_flow.h
+++ b/drivers/net/iavf/iavf_generic_flow.h
@@ -188,6 +188,7 @@
/* IPv4 GTPU (EH) */
extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu[];
+extern enum rte_flow_item_type iavf_pattern_eth_vlan_ipv4_gtpu[];
extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh[];
/* IPV4 GTPC */
@@ -196,6 +197,7 @@
/* IPv6 GTPU (EH) */
extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu[];
+extern enum rte_flow_item_type iavf_pattern_eth_vlan_ipv6_gtpu[];
extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu_eh[];
/* IPv4 GTPU IPv4 */
diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 7bc32b0..f80831a 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -195,6 +195,10 @@ struct iavf_hash_flow_cfg {
IAVF_PHINT_IPV4_GTPC };
static struct iavf_pattern_match_type phint_eth_ipv6_gtpc = {
IAVF_PHINT_IPV6_GTPC };
+static struct iavf_pattern_match_type phint_eth_ipv4_gtpu = {
+ IAVF_PHINT_IPV4_GTPU_IP };
+static struct iavf_pattern_match_type phint_eth_ipv6_gtpu = {
+ IAVF_PHINT_IPV6_GTPU_IP };
/**
* Supported pattern for hash.
@@ -293,6 +297,12 @@ struct iavf_hash_flow_cfg {
&phint_eth_ipv4_gtpc},
{iavf_pattern_eth_vlan_ipv6_gtpc, IAVF_INSET_NONE,
&phint_eth_ipv6_gtpc},
+ {iavf_pattern_eth_ipv4_gtpu, IAVF_INSET_NONE, &phint_eth_ipv4_gtpu},
+ {iavf_pattern_eth_ipv6_gtpu, IAVF_INSET_NONE, &phint_eth_ipv6_gtpu},
+ {iavf_pattern_eth_vlan_ipv4_gtpu, IAVF_INSET_NONE,
+ &phint_eth_ipv4_gtpu},
+ {iavf_pattern_eth_vlan_ipv6_gtpu, IAVF_INSET_NONE,
+ &phint_eth_ipv6_gtpu},
{iavf_pattern_empty, IAVF_INSET_NONE, &phint_empty},
};
@@ -818,6 +828,37 @@ struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv4_src_gtpc = {
proto_hint_ipv4_src, proto_hint_udp_only, proto_hint_gtpc_only}
};
+/* IPv4 GTPU */
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv4,
+ proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv4_dst,
+ proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv4_src,
+ proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv4_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_FOUR, {proto_hint_cvlan,
+ proto_hint_ipv4, proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv4_dst_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_FOUR, {proto_hint_cvlan,
+ proto_hint_ipv4_dst, proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv4_src_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_FOUR, {proto_hint_cvlan,
+ proto_hint_ipv4_src, proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
/* IPv4 GTPU IP */
struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_ip = {
@@ -970,6 +1011,37 @@ struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv6_src_gtpc = {
proto_hint_ipv6_src, proto_hint_udp_only, proto_hint_gtpc_only}
};
+/* IPv6 GTPU */
+struct virtchnl_proto_hdrs hdrs_hint_ipv6_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv6,
+ proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv6_dst,
+ proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv6_src,
+ proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv6_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_FOUR, {proto_hint_cvlan,
+ proto_hint_ipv6, proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv6_dst_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_FOUR, {proto_hint_cvlan,
+ proto_hint_ipv6_dst, proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv6_src_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_FOUR, {proto_hint_cvlan,
+ proto_hint_ipv6_src, proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
/* IPv6 GTPU IP */
struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_gtpu_ip = {
@@ -2384,6 +2456,44 @@ struct iavf_hash_match_type iavf_gtpu_hash_map_list[] = {
ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY,
&hdrs_hint_cvlan_ipv6_src_gtpc, IAVF_PHINT_IPV6_GTPC},
+ /* IPv4 GTPU */
+ {ETH_RSS_IPV4,
+ &hdrs_hint_ipv4_gtpu, IAVF_PHINT_IPV4_GTPU_IP},
+ {ETH_RSS_IPV4 |
+ ETH_RSS_L3_DST_ONLY,
+ &hdrs_hint_ipv4_dst_gtpu, IAVF_PHINT_IPV4_GTPU_IP},
+ {ETH_RSS_IPV4 |
+ ETH_RSS_L3_SRC_ONLY,
+ &hdrs_hint_ipv4_src_gtpu, IAVF_PHINT_IPV4_GTPU_IP},
+ {ETH_RSS_C_VLAN |
+ ETH_RSS_IPV4,
+ &hdrs_hint_cvlan_ipv4_gtpu, IAVF_PHINT_IPV4_GTPU_IP},
+ {ETH_RSS_C_VLAN |
+ ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY,
+ &hdrs_hint_cvlan_ipv4_dst_gtpu, IAVF_PHINT_IPV4_GTPU_IP},
+ {ETH_RSS_C_VLAN |
+ ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY,
+ &hdrs_hint_cvlan_ipv4_src_gtpu, IAVF_PHINT_IPV4_GTPU_IP},
+
+ /* IPv6 GTPU */
+ {ETH_RSS_IPV6,
+ &hdrs_hint_ipv6_gtpu, IAVF_PHINT_IPV6_GTPU_IP},
+ {ETH_RSS_IPV6 |
+ ETH_RSS_L3_DST_ONLY,
+ &hdrs_hint_ipv6_dst_gtpu, IAVF_PHINT_IPV6_GTPU_IP},
+ {ETH_RSS_IPV6 |
+ ETH_RSS_L3_SRC_ONLY,
+ &hdrs_hint_ipv6_src_gtpu, IAVF_PHINT_IPV6_GTPU_IP},
+ {ETH_RSS_C_VLAN |
+ ETH_RSS_IPV6,
+ &hdrs_hint_cvlan_ipv6_gtpu, IAVF_PHINT_IPV6_GTPU_IP},
+ {ETH_RSS_C_VLAN |
+ ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY,
+ &hdrs_hint_cvlan_ipv6_dst_gtpu, IAVF_PHINT_IPV6_GTPU_IP},
+ {ETH_RSS_C_VLAN |
+ ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY,
+ &hdrs_hint_cvlan_ipv6_src_gtpu, IAVF_PHINT_IPV6_GTPU_IP},
+
/* GTPU IP */
/* IPv4 GTPU IP IPv4*/
{ETH_RSS_IPV4 |
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dpdk-dev] [PATCH v2] net/iavf: support outer IP hash for GTPU
2020-08-28 8:03 [dpdk-dev] [PATCH] net/iavf: support outer IP hash for GTPU alvinx.zhang
@ 2020-08-31 6:43 ` alvinx.zhang
0 siblings, 0 replies; 2+ messages in thread
From: alvinx.zhang @ 2020-08-31 6:43 UTC (permalink / raw)
To: jia.guo, qi.z.zhang; +Cc: dev, Alvin Zhang
From: Alvin Zhang <alvinx.zhang@intel.com>
Add patterns for GTPU, now outer IP hash can be configured as input set for
GTPU packet.
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
v2:
- Remove VLAN as input sets.
drivers/net/iavf/iavf_hash.c | 66 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 3658895..29b76f9 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -195,6 +195,10 @@ struct iavf_hash_flow_cfg {
IAVF_PHINT_IPV4_GTPC };
static struct iavf_pattern_match_type phint_eth_ipv6_gtpc = {
IAVF_PHINT_IPV6_GTPC };
+static struct iavf_pattern_match_type phint_eth_ipv4_gtpu = {
+ IAVF_PHINT_IPV4_GTPU_IP };
+static struct iavf_pattern_match_type phint_eth_ipv6_gtpu = {
+ IAVF_PHINT_IPV6_GTPU_IP };
/**
* Supported pattern for hash.
@@ -289,6 +293,8 @@ struct iavf_hash_flow_cfg {
&phint_eth_vlan_ipv6_sctp},
{iavf_pattern_eth_ipv4_gtpc, IAVF_INSET_NONE, &phint_eth_ipv4_gtpc},
{iavf_pattern_eth_ipv6_gtpc, IAVF_INSET_NONE, &phint_eth_ipv6_gtpc},
+ {iavf_pattern_eth_ipv4_gtpu, IAVF_INSET_NONE, &phint_eth_ipv4_gtpu},
+ {iavf_pattern_eth_ipv6_gtpu, IAVF_INSET_NONE, &phint_eth_ipv6_gtpu},
{iavf_pattern_empty, IAVF_INSET_NONE, &phint_empty},
};
@@ -798,6 +804,22 @@ struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpc = {
proto_hint_udp_only, proto_hint_gtpc_only}
};
+/* IPv4 GTPU */
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv4,
+ proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv4_dst,
+ proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv4_src,
+ proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
/* IPv4 GTPU IP */
struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_ip = {
@@ -935,6 +957,22 @@ struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_gtpc = {
proto_hint_udp_only, proto_hint_gtpc_only}
};
+/* IPv6 GTPU */
+struct virtchnl_proto_hdrs hdrs_hint_ipv6_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv6,
+ proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv6_dst,
+ proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_gtpu = {
+ TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv6_src,
+ proto_hint_udp_only, proto_hint_gtpu_ip_only}
+};
+
/* IPv6 GTPU IP */
struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_gtpu_ip = {
@@ -2443,6 +2481,34 @@ struct iavf_hash_match_type iavf_gtpu_hash_map_list[] = {
{ETH_RSS_L3_SRC_ONLY,
&hdrs_hint_ipv6_src_gtpc, IAVF_PHINT_IPV6_GTPC},
+ /* IPv4 GTPU */
+ {ETH_RSS_IPV4,
+ &hdrs_hint_ipv4_gtpu, IAVF_PHINT_IPV4_GTPU_IP},
+ {ETH_RSS_IPV4 |
+ ETH_RSS_L3_DST_ONLY,
+ &hdrs_hint_ipv4_dst_gtpu, IAVF_PHINT_IPV4_GTPU_IP},
+ {ETH_RSS_L3_DST_ONLY,
+ &hdrs_hint_ipv4_dst_gtpu, IAVF_PHINT_IPV4_GTPU_IP},
+ {ETH_RSS_IPV4 |
+ ETH_RSS_L3_SRC_ONLY,
+ &hdrs_hint_ipv4_src_gtpu, IAVF_PHINT_IPV4_GTPU_IP},
+ {ETH_RSS_L3_SRC_ONLY,
+ &hdrs_hint_ipv4_src_gtpu, IAVF_PHINT_IPV4_GTPU_IP},
+
+ /* IPv6 GTPU */
+ {ETH_RSS_IPV6,
+ &hdrs_hint_ipv6_gtpu, IAVF_PHINT_IPV6_GTPU_IP},
+ {ETH_RSS_IPV6 |
+ ETH_RSS_L3_DST_ONLY,
+ &hdrs_hint_ipv6_dst_gtpu, IAVF_PHINT_IPV6_GTPU_IP},
+ {ETH_RSS_L3_DST_ONLY,
+ &hdrs_hint_ipv6_dst_gtpu, IAVF_PHINT_IPV6_GTPU_IP},
+ {ETH_RSS_IPV6 |
+ ETH_RSS_L3_SRC_ONLY,
+ &hdrs_hint_ipv6_src_gtpu, IAVF_PHINT_IPV6_GTPU_IP},
+ {ETH_RSS_L3_SRC_ONLY,
+ &hdrs_hint_ipv6_src_gtpu, IAVF_PHINT_IPV6_GTPU_IP},
+
/* GTPU IP */
/* IPv4 GTPU IP IPv4*/
{ETH_RSS_L3_SRC_ONLY,
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-31 6:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 8:03 [dpdk-dev] [PATCH] net/iavf: support outer IP hash for GTPU alvinx.zhang
2020-08-31 6:43 ` [dpdk-dev] [PATCH v2] " alvinx.zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).