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 E1ADFA04B5; Thu, 10 Sep 2020 07:25:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1BA0B1BEB3; Thu, 10 Sep 2020 07:25:00 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 653612BA8 for ; Thu, 10 Sep 2020 07:24:58 +0200 (CEST) IronPort-SDR: TcOOY7w/PllRkpsdaLX09nQIUFbDGW0biTJ/syjNlAO2LsoFcdXX7rom6CYdtUU5djx83IagoT WyrsBL0AHxSw== X-IronPort-AV: E=McAfee;i="6000,8403,9739"; a="155869143" X-IronPort-AV: E=Sophos;i="5.76,411,1592895600"; d="scan'208";a="155869143" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2020 22:24:57 -0700 IronPort-SDR: Ej3ihcNwc5fs6mzaBngRrdbhla+poLUpFACbAC6Qx+hGKmRuZaWPi5Cq2B/zXMFs0q3YMnRWye 50Iqaz4fpeng== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,411,1592895600"; d="scan'208";a="286448338" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga008.fm.intel.com with ESMTP; 09 Sep 2020 22:24:57 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 9 Sep 2020 22:24:55 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 10 Sep 2020 13:24:54 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Thu, 10 Sep 2020 13:24:54 +0800 From: "Guo, Jia" To: "Zhang, AlvinX" , "Zhang, Qi Z" CC: "dev@dpdk.org" Thread-Topic: [PATCH v4] net/iavf: support outer IP hash for GTPU Thread-Index: AQHWhyKpyYy3esUeqUyzMBx6PhUL86lhVStQ Date: Thu, 10 Sep 2020 05:24:54 +0000 Message-ID: <8033a27f7ade4db2921d96c671a2b78f@intel.com> References: <20200908095015.23708-3-alvinx.zhang@intel.com> <20200910032623.38168-1-alvinx.zhang@intel.com> In-Reply-To: <20200910032623.38168-1-alvinx.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4] net/iavf: support outer IP hash for GTPU 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" > -----Original Message----- > From: Zhang, AlvinX > Sent: Thursday, September 10, 2020 11:26 AM > To: Guo, Jia ; Zhang, Qi Z > Cc: dev@dpdk.org; Zhang, AlvinX > Subject: [PATCH v4] net/iavf: support outer IP hash for GTPU >=20 > From: Alvin Zhang >=20 > Add headers for GTPU, now outer IP hash can be configured as input sets f= or > GTPU packet. >=20 I think this patch will not cover outer IP hash for any GTPU case, only non= e-inner GTPU case, right?=20 > Signed-off-by: Alvin Zhang > --- >=20 > V2: Modify codes according to comments. > V3: Refact all codes. > V4: Fix compatibility issues. >=20 > drivers/net/iavf/iavf_hash.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) >=20 > diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c = index > aab8b14..3ec32d9 100644 > --- a/drivers/net/iavf/iavf_hash.c > +++ b/drivers/net/iavf/iavf_hash.c > @@ -132,6 +132,9 @@ struct iavf_hash_flow_cfg { > VIRTCHNL_PROTO_HDR_PFCP, \ > FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_PFCP_SEID), > {BUFF_NOUSED} } >=20 > +#define proto_hdr_gtpu { \ > + VIRTCHNL_PROTO_HDR_GTPU_IP, 0, {BUFF_NOUSED} } > + I still not funs of set field to zero here since it should be general use f= or other case, it could specific refine to 0 when parsing pattern if need.= =20 > #define TUNNEL_LEVEL_OUTER 0 > #define TUNNEL_LEVEL_INNER 1 >=20 > @@ -256,6 +259,14 @@ struct virtchnl_proto_hdrs ipv6_pfcp_tmplt =3D { > TUNNEL_LEVEL_OUTER, 2, {proto_hdr_ipv6, proto_hdr_pfcp} }; >=20 > +struct virtchnl_proto_hdrs outer_ipv4_udp_gtpu_tmplt =3D { > + TUNNEL_LEVEL_OUTER, 3, {proto_hdr_ipv4, proto_hdr_udp, > proto_hdr_gtpu} > +}; > + > +struct virtchnl_proto_hdrs outer_ipv6_udp_gtpu_tmplt =3D { > + TUNNEL_LEVEL_OUTER, 3, {proto_hdr_ipv6, proto_hdr_udp, > proto_hdr_gtpu} > +}; > + > /* rss type super set */ >=20 > /* IPv4 outer */ > @@ -348,6 +359,7 @@ struct virtchnl_proto_hdrs ipv6_pfcp_tmplt =3D { > {iavf_pattern_eth_vlan_ipv4_udp, > IAVF_RSS_TYPE_VLAN_IPV4_UDP, &outer_ipv4_udp_tmplt}, > {iavf_pattern_eth_vlan_ipv4_tcp, > IAVF_RSS_TYPE_VLAN_IPV4_TCP, &outer_ipv4_tcp_tmplt}, > {iavf_pattern_eth_vlan_ipv4_sctp, > IAVF_RSS_TYPE_VLAN_IPV4_SCTP, &outer_ipv4_sctp_tmplt}, > + {iavf_pattern_eth_ipv4_gtpu, ETH_RSS_IPV4, > &outer_ipv4_udp_gtpu_tmplt}, There is also a question the same as the other mail loop of GTPC, should it= be supper set here? > {iavf_pattern_eth_ipv4_gtpu_ipv4, > IAVF_RSS_TYPE_GTPU_IPV4, &inner_ipv4_tmplt}, > {iavf_pattern_eth_ipv4_gtpu_ipv4_udp, > IAVF_RSS_TYPE_GTPU_IPV4_UDP, &inner_ipv4_udp_tmplt}, > {iavf_pattern_eth_ipv4_gtpu_ipv4_tcp, > IAVF_RSS_TYPE_GTPU_IPV4_TCP, &inner_ipv4_tcp_tmplt}, > @@ -374,6 +386,7 @@ struct virtchnl_proto_hdrs ipv6_pfcp_tmplt =3D { > {iavf_pattern_eth_vlan_ipv6_udp, > IAVF_RSS_TYPE_VLAN_IPV6_UDP, &outer_ipv6_udp_tmplt}, > {iavf_pattern_eth_vlan_ipv6_tcp, > IAVF_RSS_TYPE_VLAN_IPV6_TCP, &outer_ipv6_tcp_tmplt}, > {iavf_pattern_eth_vlan_ipv6_sctp, > IAVF_RSS_TYPE_VLAN_IPV6_SCTP, &outer_ipv6_sctp_tmplt}, > + {iavf_pattern_eth_ipv6_gtpu, ETH_RSS_IPV6, > &outer_ipv6_udp_gtpu_tmplt}, > {iavf_pattern_eth_ipv4_gtpu_ipv6, > IAVF_RSS_TYPE_GTPU_IPV6, &inner_ipv6_tmplt}, > {iavf_pattern_eth_ipv4_gtpu_ipv6_udp, > IAVF_RSS_TYPE_GTPU_IPV6_UDP, &inner_ipv6_udp_tmplt}, > {iavf_pattern_eth_ipv4_gtpu_ipv6_tcp, > IAVF_RSS_TYPE_GTPU_IPV6_TCP, &inner_ipv6_tcp_tmplt}, > -- > 1.8.3.1