From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 891FCA0519; Fri, 3 Jul 2020 16:38:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 80B181DC61; Fri, 3 Jul 2020 16:37:54 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 00A0F1DB10 for ; Fri, 3 Jul 2020 12:29:00 +0200 (CEST) IronPort-SDR: 4+c2h8jup8TN79b78ihUNVdkE8iw4GhSSCdfWMwAKEEcVZwBjNPRXn65lMS9EJqKiyFFkeDDib 2aItHyQlwiKA== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="126741932" X-IronPort-AV: E=Sophos;i="5.75,307,1589266800"; d="scan'208";a="126741932" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2020 03:29:00 -0700 IronPort-SDR: FhhMqh6ME5lCNJ3zcsPWP/uCyOILPkYD/ObHwD6yxkr2jBeCo2267cLzsY2DqyrVXQmNUaP856 V0bYNKJlTaxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="304548554" Received: from silpixa00400380.ir.intel.com ([10.237.213.188]) by fmsmga004.fm.intel.com with ESMTP; 03 Jul 2020 03:28:58 -0700 From: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com To: dev@dpdk.org Cc: gordon.noonan@intel.com, Jeff Guo Date: Fri, 3 Jul 2020 11:28:29 +0100 Message-Id: <20200703102829.52581-9-gordon.noonan@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200703102829.52581-1-gordon.noonan@intel.com> References: <20200703102829.52581-1-gordon.noonan@intel.com> X-Mailman-Approved-At: Fri, 03 Jul 2020 16:37:41 +0200 Subject: [dpdk-dev] [PATCH RFC 8/8] net/iavf: fix gtpu ip udp issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Jeff Guo Signed-off-by: Jeff Guo --- drivers/net/iavf/iavf_hash.c | 136 ++++++++++++++++++++++++++--------- 1 file changed, 103 insertions(+), 33 deletions(-) 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 */ -- 2.17.1