From: alvinx.zhang@intel.com
To: jia.guo@intel.com, qi.z.zhang@intel.com
Cc: dev@dpdk.org, Alvin Zhang <alvinx.zhang@intel.com>
Subject: [dpdk-dev] [PATCH v2] net/iavf: support outer IP hash for GTPU
Date: Mon, 31 Aug 2020 14:43:28 +0800 [thread overview]
Message-ID: <20200831064328.44412-1-alvinx.zhang@intel.com> (raw)
In-Reply-To: <20200828080306.48916-1-alvinx.zhang@intel.com>
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
prev parent reply other threads:[~2020-08-31 6:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-28 8:03 [dpdk-dev] [PATCH] " alvinx.zhang
2020-08-31 6:43 ` alvinx.zhang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200831064328.44412-1-alvinx.zhang@intel.com \
--to=alvinx.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=jia.guo@intel.com \
--cc=qi.z.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).