From patchwork Fri Jul 3 11:16:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com X-Patchwork-Id: 73036 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 67E0AA0519; Fri, 3 Jul 2020 16:40:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 127601DCA3; Fri, 3 Jul 2020 16:38:05 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 79C171D8CF for ; Fri, 3 Jul 2020 13:17:23 +0200 (CEST) IronPort-SDR: K4T5FKDm8vhJVlSBYDxxo95cScWbJiWnU30AD98DqgGWulOlmJASd/y/dfCmuh/R12PFxsD2Uu vVTSKnM/Y5zA== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="146220582" X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="146220582" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2020 04:17:21 -0700 IronPort-SDR: Yq8XFBpiS9ILch55jrSHtPsWVpgd4q8HcviRkH6Sttu+yukRoC1koAsBS4G+GbLoEFKn075y5d LvB8kpK7jKFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="321780423" Received: from silpixa00400380.ir.intel.com ([10.237.213.188]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jul 2020 04:17:19 -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 12:16:44 +0100 Message-Id: <20200703111644.73351-9-gordon.noonan@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200703111644.73351-1-gordon.noonan@intel.com> References: <20200703111644.73351-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 */