[RFC,8/8] net/iavf: fix gtpu ip udp issue
diff mbox series

Message ID 20200703111644.73351-9-gordon.noonan@intel.com
State Deferred
Delegated to: Qi Zhang
Headers show
Series
  • net/iavf: Enable 256 queues
Related show

Checks

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

Commit Message

From: Jeff Guo <jia.guo@intel.com>

Signed-off-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 136 ++++++++++++++++++++++++++---------
 1 file changed, 103 insertions(+), 33 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 62dd29889..f17b119e2 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -565,6 +565,76 @@  struct virtchnl_proto_hdrs hdrs_hint_ipv4_gtpu_ip = {
 	proto_hint_ipv4 }
 };
 
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_src_gtpu_ip = {
+	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only,
+	proto_hint_ipv4_only_prot, proto_hint_udp_src_port}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_dst_gtpu_ip = {
+	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only,
+	proto_hint_ipv4_only_prot, proto_hint_udp_dst_port}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_src_gtpu_ip = {
+	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only,
+	proto_hint_ipv4_only_prot, proto_hint_tcp_src_port}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_dst_gtpu_ip = {
+	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only,
+	proto_hint_ipv4_only_prot, proto_hint_tcp_dst_port}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_src_gtpu_ip = {
+	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only,
+	proto_hint_ipv4_src_prot, proto_hint_udp_src_port}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_dst_gtpu_ip = {
+	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only,
+	proto_hint_ipv4_src_prot, proto_hint_udp_dst_port}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_src_gtpu_ip = {
+	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only,
+	proto_hint_ipv4_src_prot, proto_hint_tcp_src_port}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_dst_gtpu_ip = {
+	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only,
+	proto_hint_ipv4_src_prot, proto_hint_tcp_dst_port}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_src_gtpu_ip = {
+	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only,
+	proto_hint_ipv4_dst_prot, proto_hint_udp_src_port}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_dst_gtpu_ip = {
+	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only,
+	proto_hint_ipv4_dst_prot, proto_hint_udp_dst_port}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_src_gtpu_ip = {
+	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only,
+	proto_hint_ipv4_dst_prot, proto_hint_tcp_src_port}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_dst_gtpu_ip = {
+	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only,
+	proto_hint_ipv4_dst_prot, proto_hint_tcp_dst_port}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_gtpu_ip = {
+	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only,
+	proto_hint_ipv4_prot, proto_hint_udp}
+};
+
+struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_gtpu_ip = {
+	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only,
+	proto_hint_ipv4_prot, proto_hint_tcp}
+};
+
 struct virtchnl_proto_hdrs hdrs_hint_teid_gtpu_ip = {
 	TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_ip_teid}
 };
@@ -1309,43 +1379,43 @@  struct iavf_hash_match_type iavf_gtpu_hash_map_list[] = {
 	/* IPv4 GTPU IP IPv4 UDP */
 	{ETH_RSS_L3_SRC_ONLY |
 		ETH_RSS_L4_SRC_ONLY,
-		&hdrs_hint_ipv4_src_udp_src_gtpu_eh,
+		&hdrs_hint_ipv4_src_udp_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_L3_SRC_ONLY |
 		ETH_RSS_L4_DST_ONLY,
-		&hdrs_hint_ipv4_src_udp_dst_gtpu_eh,
+		&hdrs_hint_ipv4_src_udp_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_L3_SRC_ONLY,
-		&hdrs_hint_ipv4_src_gtpu_eh,
+		&hdrs_hint_ipv4_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_L4_SRC_ONLY,
-		&hdrs_hint_ipv4_udp_src_gtpu_eh,
+		&hdrs_hint_ipv4_udp_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_L3_DST_ONLY |
 		ETH_RSS_L4_SRC_ONLY,
-		&hdrs_hint_ipv4_dst_udp_src_gtpu_eh,
+		&hdrs_hint_ipv4_dst_udp_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_L3_DST_ONLY |
 		ETH_RSS_L4_DST_ONLY,
-		&hdrs_hint_ipv4_dst_udp_dst_gtpu_eh,
+		&hdrs_hint_ipv4_dst_udp_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_L3_DST_ONLY,
-		&hdrs_hint_ipv4_dst_gtpu_eh,
+		&hdrs_hint_ipv4_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_L4_DST_ONLY,
-		&hdrs_hint_ipv4_udp_dst_gtpu_eh,
+		&hdrs_hint_ipv4_udp_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_NONFRAG_IPV4_UDP |
 		ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
-		&hdrs_hint_ipv4_src_udp_src_gtpu_eh,
+		&hdrs_hint_ipv4_src_udp_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_NONFRAG_IPV4_UDP |
 		ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
-		&hdrs_hint_ipv4_src_udp_dst_gtpu_eh,
+		&hdrs_hint_ipv4_src_udp_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_NONFRAG_IPV4_UDP |
 		ETH_RSS_L3_SRC_ONLY,
-		&hdrs_hint_ipv4_src_gtpu_eh,
+		&hdrs_hint_ipv4_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_NONFRAG_IPV4_UDP |
 		ETH_RSS_L4_SRC_ONLY,
@@ -1353,86 +1423,86 @@  struct iavf_hash_match_type iavf_gtpu_hash_map_list[] = {
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_NONFRAG_IPV4_UDP |
 		ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
-		&hdrs_hint_ipv4_dst_udp_src_gtpu_eh,
+		&hdrs_hint_ipv4_dst_udp_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_NONFRAG_IPV4_UDP |
 		ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
-		&hdrs_hint_ipv4_dst_udp_dst_gtpu_eh,
+		&hdrs_hint_ipv4_dst_udp_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_NONFRAG_IPV4_UDP |
 		ETH_RSS_L3_DST_ONLY,
-		&hdrs_hint_ipv4_dst_gtpu_eh,
+		&hdrs_hint_ipv4_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_NONFRAG_IPV4_UDP |
 		ETH_RSS_L4_DST_ONLY,
-		&hdrs_hint_ipv4_udp_dst_gtpu_eh,
+		&hdrs_hint_ipv4_udp_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	{ETH_RSS_NONFRAG_IPV4_UDP,
-		&hdrs_hint_ipv4_udp_gtpu_eh,
+		&hdrs_hint_ipv4_udp_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP},
 	/* IPv4 GTPU IP IPv4 TCP */
 	{ETH_RSS_L3_SRC_ONLY |
 		ETH_RSS_L4_SRC_ONLY,
-		&hdrs_hint_ipv4_src_tcp_src_gtpu_eh,
+		&hdrs_hint_ipv4_src_tcp_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_L3_SRC_ONLY |
 		ETH_RSS_L4_DST_ONLY,
-		&hdrs_hint_ipv4_src_tcp_dst_gtpu_eh,
+		&hdrs_hint_ipv4_src_tcp_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_L3_SRC_ONLY,
-		&hdrs_hint_ipv4_src_gtpu_eh,
+		&hdrs_hint_ipv4_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_L4_SRC_ONLY,
-		&hdrs_hint_ipv4_tcp_src_gtpu_eh,
+		&hdrs_hint_ipv4_tcp_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_L3_DST_ONLY |
 		ETH_RSS_L4_SRC_ONLY,
-		&hdrs_hint_ipv4_dst_tcp_src_gtpu_eh,
+		&hdrs_hint_ipv4_dst_tcp_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_L3_DST_ONLY |
 		ETH_RSS_L4_DST_ONLY,
-		&hdrs_hint_ipv4_dst_tcp_dst_gtpu_eh,
+		&hdrs_hint_ipv4_dst_tcp_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_L3_DST_ONLY,
-		&hdrs_hint_ipv4_dst_gtpu_eh,
+		&hdrs_hint_ipv4_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_L4_DST_ONLY,
-		&hdrs_hint_ipv4_tcp_dst_gtpu_eh,
+		&hdrs_hint_ipv4_tcp_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_NONFRAG_IPV4_TCP |
 		ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
-		&hdrs_hint_ipv4_src_tcp_src_gtpu_eh,
+		&hdrs_hint_ipv4_src_tcp_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_NONFRAG_IPV4_TCP |
 		ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
-		&hdrs_hint_ipv4_src_tcp_dst_gtpu_eh,
+		&hdrs_hint_ipv4_src_tcp_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_NONFRAG_IPV4_TCP |
 		ETH_RSS_L3_SRC_ONLY,
-		&hdrs_hint_ipv4_src_gtpu_eh,
+		&hdrs_hint_ipv4_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_NONFRAG_IPV4_TCP |
 		ETH_RSS_L4_SRC_ONLY,
-		&hdrs_hint_ipv4_tcp_src_gtpu_eh,
+		&hdrs_hint_ipv4_tcp_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_NONFRAG_IPV4_TCP |
 		ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
-		&hdrs_hint_ipv4_dst_tcp_src_gtpu_eh,
+		&hdrs_hint_ipv4_dst_tcp_src_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_NONFRAG_IPV4_TCP |
 		ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
-		&hdrs_hint_ipv4_dst_tcp_dst_gtpu_eh,
+		&hdrs_hint_ipv4_dst_tcp_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_NONFRAG_IPV4_TCP |
 		ETH_RSS_L3_DST_ONLY,
-		&hdrs_hint_ipv4_dst_gtpu_eh,
+		&hdrs_hint_ipv4_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_NONFRAG_IPV4_TCP |
 		ETH_RSS_L4_DST_ONLY,
-		&hdrs_hint_ipv4_tcp_dst_gtpu_eh,
+		&hdrs_hint_ipv4_tcp_dst_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	{ETH_RSS_NONFRAG_IPV4_TCP,
-		&hdrs_hint_ipv4_tcp_gtpu_eh,
+		&hdrs_hint_ipv4_tcp_gtpu_ip,
 		IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP},
 	/* GTPU EH */
 	/* Inner IPV4 */