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 CA40CA04B5; Thu, 10 Sep 2020 07:14:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AF4E41BEB3; Thu, 10 Sep 2020 07:14:10 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 70DCE2BA8 for ; Thu, 10 Sep 2020 07:14:08 +0200 (CEST) IronPort-SDR: 0YOVHwNRczuGicJIFDHt/ZaafEz0ep3uGvo4hIA6XgBL4KvCmL9HZBuCA1vOxZ3YJVTEJfCptm caTD0By2ZeeA== X-IronPort-AV: E=McAfee;i="6000,8403,9739"; a="243287055" X-IronPort-AV: E=Sophos;i="5.76,411,1592895600"; d="scan'208";a="243287055" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2020 22:14:07 -0700 IronPort-SDR: QFDiWbURKvCBLVbsi10Yi16jspBhJ+0FHg8qRynPSxeSsVqqphvYIFAHaGkrp8j/t63cmJjyAF Mf0Qe9O188vw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,411,1592895600"; d="scan'208";a="407657413" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga001.fm.intel.com with ESMTP; 09 Sep 2020 22:14:07 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by fmsmsx602.amr.corp.intel.com (10.18.126.82) 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:14:06 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX606.ccr.corp.intel.com (10.109.6.216) 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:14:04 +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:14:04 +0800 From: "Guo, Jia" To: "Zhang, AlvinX" , "Zhang, Qi Z" CC: "dev@dpdk.org" Thread-Topic: [PATCH v4 2/2] net/iavf: support outer IP hash for GTPC Thread-Index: AQHWhyQjQ191+sbs8UShF7ybhtzlYKlhUUiA Date: Thu, 10 Sep 2020 05:14:04 +0000 Message-ID: <19133970cdf64d5882531d3933bac5af@intel.com> References: <20200908095015.23708-1-alvinx.zhang@intel.com> <20200910033652.30632-1-alvinx.zhang@intel.com> <20200910033652.30632-2-alvinx.zhang@intel.com> In-Reply-To: <20200910033652.30632-2-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 2/2] net/iavf: support outer IP hash for GTPC 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" Hi, Alvin > -----Original Message----- > From: Zhang, AlvinX > Sent: Thursday, September 10, 2020 11:37 AM > To: Guo, Jia ; Zhang, Qi Z > Cc: dev@dpdk.org; Zhang, AlvinX > Subject: [PATCH v4 2/2] net/iavf: support outer IP hash for GTPC >=20 > From: Alvin Zhang >=20 > Add patterns and headers for GTPC, now outer IP hash can be configured as > input sets for GTPC packet. >=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_generic_flow.c | 18 ++++++++++++++++++ > drivers/net/iavf/iavf_generic_flow.h | 6 ++++++ > drivers/net/iavf/iavf_hash.c | 13 +++++++++++++ > 3 files changed, 37 insertions(+) >=20 > diff --git a/drivers/net/iavf/iavf_generic_flow.c > b/drivers/net/iavf/iavf_generic_flow.c > index 321a4dc..00e7f15 100644 > --- a/drivers/net/iavf/iavf_generic_flow.c > +++ b/drivers/net/iavf/iavf_generic_flow.c > @@ -315,6 +315,15 @@ enum rte_flow_item_type > iavf_pattern_eth_qinq_ipv6_icmp6[] =3D { > RTE_FLOW_ITEM_TYPE_END, > }; >=20 > +/* IPv4 GTPC */ > +enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpc[] =3D { > + RTE_FLOW_ITEM_TYPE_ETH, > + RTE_FLOW_ITEM_TYPE_IPV4, > + RTE_FLOW_ITEM_TYPE_UDP, > + RTE_FLOW_ITEM_TYPE_GTPC, > + RTE_FLOW_ITEM_TYPE_END, > +}; > + > /* IPV4 GTPU (EH) */ > enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu[] =3D { > RTE_FLOW_ITEM_TYPE_ETH, > @@ -333,6 +342,15 @@ enum rte_flow_item_type > iavf_pattern_eth_ipv4_gtpu_eh[] =3D { > RTE_FLOW_ITEM_TYPE_END, > }; >=20 > +/* IPv6 GTPC */ > +enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpc[] =3D { > + RTE_FLOW_ITEM_TYPE_ETH, > + RTE_FLOW_ITEM_TYPE_IPV6, > + RTE_FLOW_ITEM_TYPE_UDP, > + RTE_FLOW_ITEM_TYPE_GTPC, > + RTE_FLOW_ITEM_TYPE_END, > +}; > + > /* IPV6 GTPU (EH) */ > enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu[] =3D { > RTE_FLOW_ITEM_TYPE_ETH, > diff --git a/drivers/net/iavf/iavf_generic_flow.h > b/drivers/net/iavf/iavf_generic_flow.h > index f365cc3..dbc7294 100644 > --- a/drivers/net/iavf/iavf_generic_flow.h > +++ b/drivers/net/iavf/iavf_generic_flow.h > @@ -182,10 +182,16 @@ > extern enum rte_flow_item_type iavf_pattern_eth_vlan_ipv6_icmp6[]; > extern enum rte_flow_item_type iavf_pattern_eth_qinq_ipv6_icmp6[]; >=20 > +/* IPv4 GTPC */ > +extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpc[]; > + > /* IPv4 GTPU (EH) */ > extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu[]; extern > enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh[]; >=20 > +/* IPv4 GTPC */ /* IPv6 GTPC */ > +extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpc[]; > + > /* IPv6 GTPU (EH) */ > extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu[]; extern > enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu_eh[]; diff --git > a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index > d0f0057..4e8ee5c 100644 > --- a/drivers/net/iavf/iavf_hash.c > +++ b/drivers/net/iavf/iavf_hash.c > @@ -135,6 +135,9 @@ struct iavf_hash_flow_cfg { #define proto_hdr_gtpu > { \ > VIRTCHNL_PROTO_HDR_GTPU_IP, 0, {BUFF_NOUSED} } >=20 > +#define proto_hdr_gtpc { \ > + VIRTCHNL_PROTO_HDR_GTPC, 0, {BUFF_NOUSED} } > + > #define TUNNEL_LEVEL_OUTER 0 > #define TUNNEL_LEVEL_INNER 1 >=20 > @@ -267,6 +270,14 @@ struct virtchnl_proto_hdrs > outer_ipv6_udp_gtpu_tmplt =3D { > TUNNEL_LEVEL_OUTER, 3, {proto_hdr_ipv6, proto_hdr_udp, > proto_hdr_gtpu} }; >=20 > +struct virtchnl_proto_hdrs ipv4_udp_gtpc_tmplt =3D { > + TUNNEL_LEVEL_OUTER, 3, {proto_hdr_ipv4, proto_hdr_udp, > proto_hdr_gtpc} > +}; > + > +struct virtchnl_proto_hdrs ipv6_udp_gtpc_tmplt =3D { > + TUNNEL_LEVEL_OUTER, 3, {proto_hdr_ipv6, proto_hdr_udp, > proto_hdr_gtpc} > +}; > + > /* rss type super set */ >=20 > /* IPv4 outer */ > @@ -377,6 +388,7 @@ struct virtchnl_proto_hdrs > outer_ipv6_udp_gtpu_tmplt =3D { > {iavf_pattern_eth_ipv4_ah, > IAVF_RSS_TYPE_IPV4_AH, &ipv4_ah_tmplt}, > {iavf_pattern_eth_ipv4_l2tpv3, > IAVF_RSS_TYPE_IPV4_L2TPV3, &ipv4_l2tpv3_tmplt}, > {iavf_pattern_eth_ipv4_pfcp, > IAVF_RSS_TYPE_IPV4_PFCP, &ipv4_pfcp_tmplt}, > + {iavf_pattern_eth_ipv4_gtpc, ETH_RSS_IPV4, Since the input set hint is the supper set, so I suppose you use the supper= set "ETH_RSS_IPV4 | ETH_RSS_GTPC" here, and considerate if we need to enab= le GTPC hash at this patch, if not it could be process when parsing pattern. Want to know other's opin= ion.=20 > &ipv4_udp_gtpc_tmplt}, > /* IPv6 */ > {iavf_pattern_eth_ipv6, > IAVF_RSS_TYPE_OUTER_IPV6, &outer_ipv6_tmplt}, > {iavf_pattern_eth_ipv6_udp, > IAVF_RSS_TYPE_OUTER_IPV6_UDP, &outer_ipv6_udp_tmplt}, > @@ -404,6 +416,7 @@ struct virtchnl_proto_hdrs > outer_ipv6_udp_gtpu_tmplt =3D { > {iavf_pattern_eth_ipv6_ah, > IAVF_RSS_TYPE_IPV6_AH, &ipv6_ah_tmplt}, > {iavf_pattern_eth_ipv6_l2tpv3, > IAVF_RSS_TYPE_IPV6_L2TPV3, &ipv6_l2tpv3_tmplt}, > {iavf_pattern_eth_ipv6_pfcp, > IAVF_RSS_TYPE_IPV6_PFCP, &ipv6_pfcp_tmplt}, > + {iavf_pattern_eth_ipv6_gtpc, ETH_RSS_IPV6, > &ipv6_udp_gtpc_tmplt}, > }; >=20 > struct virtchnl_proto_hdrs *iavf_hash_default_hdrs[] =3D { > -- > 1.8.3.1