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 11B42A0350; Wed, 1 Jul 2020 15:02:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D38921D405; Wed, 1 Jul 2020 15:02:46 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 024701BF8E for ; Wed, 1 Jul 2020 15:02:44 +0200 (CEST) IronPort-SDR: /KHTBpPwLFGG0z1a0+hlHAweHP2/RFveE/KB8mCAq5uwcGvE9jFz/92YpWueUXch9n2tRyPls5 ajz0PY30dmrA== X-IronPort-AV: E=McAfee;i="6000,8403,9668"; a="146563620" X-IronPort-AV: E=Sophos;i="5.75,300,1589266800"; d="scan'208";a="146563620" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2020 06:02:43 -0700 IronPort-SDR: 9PS4T0i4AYMc+kxnSnJ2xbUqh4blWfkNvvJ0G+nUClmT5bDfEXODCCqVzDDlJN1exR5Lcb524y iY5vOKyOtuZg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,300,1589266800"; d="scan'208";a="312684748" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga008.jf.intel.com with ESMTP; 01 Jul 2020 06:02:43 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 1 Jul 2020 06:02:43 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 1 Jul 2020 06:02:42 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.89]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0439.000; Wed, 1 Jul 2020 21:02:39 +0800 From: "Zhang, Qi Z" To: "Guo, Jia" , "Yang, Qiming" CC: "Ye, Xiaolong" , "dev@dpdk.org" , "Wu, Jingjing" , "Guo, Junfeng" , "Su, Simei" Thread-Topic: [dpdk-dev v3 2/2] net/ice: enable new input set for rss hash Thread-Index: AQHWR9WyWC7YeblgZkyVCTpMPwa0m6jyv8xg Date: Wed, 1 Jul 2020 13:02:38 +0000 Message-ID: <039ED4275CED7440929022BC67E7061154849DB0@SHSMSX103.ccr.corp.intel.com> References: <20200614150819.111089-1-jia.guo@intel.com> <20200621140927.20602-1-jia.guo@intel.com> <20200621140927.20602-2-jia.guo@intel.com> In-Reply-To: <20200621140927.20602-2-jia.guo@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [dpdk-dev v3 2/2] net/ice: enable new input set for rss hash 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" Please also separate this patch into code refactor purpose and new features > -----Original Message----- > From: Guo, Jia > Sent: Sunday, June 21, 2020 10:09 PM > To: Zhang, Qi Z ; Yang, Qiming > > Cc: Ye, Xiaolong ; dev@dpdk.org; Wu, Jingjing > ; Guo, Junfeng ; Su, Simei > ; Guo, Jia > Subject: [dpdk-dev v3 2/2] net/ice: enable new input set for rss hash >=20 > PF could add or delete a RSS rule base on the PF's hash capability. > Some new rss input set will be supported, the protocols as below: > eth/vlan/l2tpv3/esp/ah/pfcp/gtpu. >=20 > Signed-off-by: Jeff Guo > --- > v3->v2: > refince code sturcture and fix simple xor issue fix some typos > --- > drivers/net/ice/ice_hash.c | 719 ++++++++++++++++++++++++++----------- > 1 file changed, 500 insertions(+), 219 deletions(-) >=20 > diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c inde= x > eaf6a35a1..d77c67f19 100644 > --- a/drivers/net/ice/ice_hash.c > +++ b/drivers/net/ice/ice_hash.c > @@ -25,6 +25,9 @@ > #include "ice_ethdev.h" > #include "ice_generic_flow.h" >=20 > +#define ICE_GTPU_EH_DWNLINK 0 > +#define ICE_GTPU_EH_UPLINK 1 > + > struct rss_type_match_hdr { > uint32_t hdr_mask; > uint64_t eth_rss_hint; > @@ -76,91 +79,213 @@ ice_hash_parse_pattern_action(struct ice_adapter > *ad, > struct rte_flow_error *error); >=20 > /* The first member is protocol header, the second member is ETH_RSS_*. > */ -struct rss_type_match_hdr hint_0 =3D { > +struct rss_type_match_hdr hint_empty =3D { > ICE_FLOW_SEG_HDR_NONE, 0}; > -struct rss_type_match_hdr hint_1 =3D { > - ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER, > ETH_RSS_IPV4}; > -struct rss_type_match_hdr hint_2 =3D { > - ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_UDP | > - ICE_FLOW_SEG_HDR_IPV_OTHER, ETH_RSS_NONFRAG_IPV4_UDP}; > -struct rss_type_match_hdr hint_3 =3D { > - ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_TCP | > - ICE_FLOW_SEG_HDR_IPV_OTHER, ETH_RSS_NONFRAG_IPV4_TCP}; > -struct rss_type_match_hdr hint_4 =3D { > - ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_SCTP | > - ICE_FLOW_SEG_HDR_IPV_OTHER, ETH_RSS_NONFRAG_IPV4_SCTP}; > -struct rss_type_match_hdr hint_5 =3D { > - ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER, > ETH_RSS_IPV6}; > -struct rss_type_match_hdr hint_6 =3D { > - ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_UDP | > - ICE_FLOW_SEG_HDR_IPV_OTHER, ETH_RSS_NONFRAG_IPV6_UDP}; > -struct rss_type_match_hdr hint_7 =3D { > - ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_TCP | > - ICE_FLOW_SEG_HDR_IPV_OTHER, ETH_RSS_NONFRAG_IPV6_TCP}; > -struct rss_type_match_hdr hint_8 =3D { > - ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_SCTP | > - ICE_FLOW_SEG_HDR_IPV_OTHER, ETH_RSS_NONFRAG_IPV6_SCTP}; > -struct rss_type_match_hdr hint_9 =3D { > - ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_IPV4}; > -struct rss_type_match_hdr hint_10 =3D { > - ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_IPV4}; > -struct rss_type_match_hdr hint_11 =3D { > - ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_NONFRAG_IPV4_UDP}; > -struct rss_type_match_hdr hint_12 =3D { > - ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_NONFRAG_IPV4_TCP}; > -struct rss_type_match_hdr hint_13 =3D { > - ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_NONFRAG_IPV4_SCTP}; > -struct rss_type_match_hdr hint_14 =3D { > - ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_UDP}; > -struct rss_type_match_hdr hint_15 =3D { > - ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_TCP}; > -struct rss_type_match_hdr hint_16 =3D { > - ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_IPV6}; > -struct rss_type_match_hdr hint_17 =3D { > - ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_NONFRAG_IPV6_UDP}; > -struct rss_type_match_hdr hint_18 =3D { > - ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_NONFRAG_IPV6_TCP}; > -struct rss_type_match_hdr hint_19 =3D { > - ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_NONFRAG_IPV6_SCTP}; > -struct rss_type_match_hdr hint_20 =3D { > - ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_ETH | ETH_RSS_PPPOE}; > +struct rss_type_match_hdr hint_eth_ipv4 =3D { > + ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER, > + ETH_RSS_ETH | ETH_RSS_IPV4}; > +struct rss_type_match_hdr hint_eth_ipv4_udp =3D { > + ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_UDP, > + ETH_RSS_ETH | ETH_RSS_NONFRAG_IPV4_UDP}; struct > rss_type_match_hdr > +hint_eth_ipv4_tcp =3D { > + ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_TCP, > + ETH_RSS_ETH | ETH_RSS_NONFRAG_IPV4_TCP}; struct > rss_type_match_hdr > +hint_eth_ipv4_sctp =3D { > + ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_SCTP, > + ETH_RSS_ETH | ETH_RSS_NONFRAG_IPV4_SCTP}; struct > rss_type_match_hdr > +hint_eth_ipv4_gtpu_ipv4 =3D { > + ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV4 | > + ICE_FLOW_SEG_HDR_IPV_OTHER, > + ETH_RSS_GTPU | ETH_RSS_IPV4}; > +struct rss_type_match_hdr hint_eth_ipv4_gtpu_eh_ipv4 =3D { > + ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_IPV4 | > + ICE_FLOW_SEG_HDR_IPV_OTHER, > + ETH_RSS_GTPU | ETH_RSS_IPV4}; > +struct rss_type_match_hdr hint_eth_ipv4_gtpu_eh_ipv4_udp =3D { > + ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_IPV4 | > + ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_UDP, > + ETH_RSS_GTPU | ETH_RSS_NONFRAG_IPV4_UDP}; struct > rss_type_match_hdr > +hint_eth_ipv4_gtpu_eh_ipv4_tcp =3D { > + ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_IPV4 | > + ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_TCP, > + ETH_RSS_GTPU | ETH_RSS_NONFRAG_IPV4_TCP}; struct > rss_type_match_hdr > +hint_eth_pppoes_ipv4 =3D { > + ICE_FLOW_SEG_HDR_PPPOE, > + ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_IPV4}; struct > rss_type_match_hdr > +hint_eth_pppoes_ipv4_udp =3D { > + ICE_FLOW_SEG_HDR_PPPOE, > + ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_NONFRAG_IPV4_UDP}; > struct > +rss_type_match_hdr hint_eth_pppoes_ipv4_tcp =3D { > + ICE_FLOW_SEG_HDR_PPPOE, > + ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_NONFRAG_IPV4_TCP}; > struct > +rss_type_match_hdr hint_eth_pppoes_ipv4_sctp =3D { > + ICE_FLOW_SEG_HDR_PPPOE, > + ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_NONFRAG_IPV4_SCTP}; > struct > +rss_type_match_hdr hint_eth_ipv4_esp =3D { > + ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_ESP, > + ETH_RSS_ETH | ETH_RSS_IPV4 | ETH_RSS_ESP}; struct > rss_type_match_hdr > +hint_eth_ipv4_udp_esp =3D { > + ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_NAT_T_ESP, > + ETH_RSS_ETH | ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_ESP}; struct > +rss_type_match_hdr hint_eth_ipv4_eh =3D { > + ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_AH, > + ETH_RSS_ETH | ETH_RSS_IPV4 | ETH_RSS_AH}; struct > rss_type_match_hdr > +hint_eth_ipv4_l2tpv3 =3D { > + ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_L2TPV3, > + ETH_RSS_ETH | ETH_RSS_IPV4 | ETH_RSS_L2TPV3}; struct > +rss_type_match_hdr hint_eth_ipv4_pfcp =3D { > + ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_PFCP_SESSION, > + ETH_RSS_ETH | ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_PFCP}; > struct > +rss_type_match_hdr hint_eth_vlan_ipv4 =3D { > + ICE_FLOW_SEG_HDR_VLAN | ICE_FLOW_SEG_HDR_IPV4 | > + ICE_FLOW_SEG_HDR_IPV_OTHER, > + ETH_RSS_ETH | ETH_RSS_IPV4 | ETH_RSS_C_VLAN}; struct > +rss_type_match_hdr hint_eth_ipv6 =3D { > + ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER, > + ETH_RSS_ETH | ETH_RSS_IPV6}; > +struct rss_type_match_hdr hint_eth_ipv6_udp =3D { > + ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_UDP, > + ETH_RSS_ETH | ETH_RSS_NONFRAG_IPV6_UDP}; struct > rss_type_match_hdr > +hint_eth_ipv6_tcp =3D { > + ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_TCP, > + ETH_RSS_ETH | ETH_RSS_NONFRAG_IPV6_TCP}; struct > rss_type_match_hdr > +hint_eth_ipv6_sctp =3D { > + ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_SCTP, > + ETH_RSS_ETH | ETH_RSS_NONFRAG_IPV6_SCTP}; struct > rss_type_match_hdr > +hint_eth_ipv6_esp =3D { > + ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_ESP, > + ETH_RSS_ETH | ETH_RSS_IPV6 | ETH_RSS_ESP}; struct > rss_type_match_hdr > +hint_eth_ipv6_udp_esp =3D { > + ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_NAT_T_ESP, > + ETH_RSS_ETH | ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_ESP}; struct > +rss_type_match_hdr hint_eth_ipv6_ah =3D { > + ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_AH, > + ETH_RSS_ETH | ETH_RSS_IPV6 | ETH_RSS_AH}; struct > rss_type_match_hdr > +hint_eth_ipv6_l2tpv3 =3D { > + ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_L2TPV3, > + ETH_RSS_ETH | ETH_RSS_IPV6 | ETH_RSS_L2TPV3}; struct > +rss_type_match_hdr hint_eth_ipv6_pfcp =3D { > + ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER | > + ICE_FLOW_SEG_HDR_PFCP_SESSION, > + ETH_RSS_ETH | ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_PFCP}; > struct > +rss_type_match_hdr hint_eth_vlan_ipv6 =3D { > + ICE_FLOW_SEG_HDR_VLAN | ICE_FLOW_SEG_HDR_IPV6 | > + ICE_FLOW_SEG_HDR_IPV_OTHER, > + ETH_RSS_ETH | ETH_RSS_IPV6 | ETH_RSS_C_VLAN}; struct > +rss_type_match_hdr hint_eth_pppoes_ipv6 =3D { > + ICE_FLOW_SEG_HDR_PPPOE, > + ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_IPV6}; struct > rss_type_match_hdr > +hint_eth_pppoes_ipv6_udp =3D { > + ICE_FLOW_SEG_HDR_PPPOE, > + ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_NONFRAG_IPV6_UDP}; > struct > +rss_type_match_hdr hint_eth_pppoes_ipv6_tcp =3D { > + ICE_FLOW_SEG_HDR_PPPOE, > + ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_NONFRAG_IPV6_TCP}; > struct > +rss_type_match_hdr hint_eth_pppoes_ipv6_sctp =3D { > + ICE_FLOW_SEG_HDR_PPPOE, > + ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_NONFRAG_IPV6_SCTP}; > struct > +rss_type_match_hdr hint_eth_pppoes =3D { > + ICE_FLOW_SEG_HDR_PPPOE, > + ETH_RSS_ETH | ETH_RSS_PPPOE}; >=20 > /* Supported pattern for os default package. */ static struct > ice_pattern_match_item ice_hash_pattern_list_os[] =3D { > - {pattern_eth_ipv4, ICE_INSET_NONE, &hint_1}, > - {pattern_eth_ipv4_udp, ICE_INSET_NONE, &hint_2}, > - {pattern_eth_ipv4_tcp, ICE_INSET_NONE, &hint_3}, > - {pattern_eth_ipv4_sctp, ICE_INSET_NONE, &hint_4}, > - {pattern_eth_ipv6, ICE_INSET_NONE, &hint_5}, > - {pattern_eth_ipv6_udp, ICE_INSET_NONE, &hint_6}, > - {pattern_eth_ipv6_tcp, ICE_INSET_NONE, &hint_7}, > - {pattern_eth_ipv6_sctp, ICE_INSET_NONE, &hint_8}, > - {pattern_empty, ICE_INSET_NONE, &hint_0}, > + {pattern_eth_ipv4, ICE_INSET_NONE, &hint_eth_ipv4}, > + {pattern_eth_ipv4_udp, ICE_INSET_NONE, &hint_eth_ipv4_udp}, > + {pattern_eth_ipv4_tcp, ICE_INSET_NONE, &hint_eth_ipv4_tcp}, > + {pattern_eth_ipv4_sctp, ICE_INSET_NONE, &hint_eth_ipv4_sctp}, > + {pattern_eth_ipv6, ICE_INSET_NONE, &hint_eth_ipv6}, > + {pattern_eth_ipv6_udp, ICE_INSET_NONE, &hint_eth_ipv6_udp}, > + {pattern_eth_ipv6_tcp, ICE_INSET_NONE, &hint_eth_ipv6_tcp}, > + {pattern_eth_ipv6_sctp, ICE_INSET_NONE, &hint_eth_ipv6_sctp}, > + {pattern_empty, ICE_INSET_NONE, &hint_empty}, > }; >=20 > /* Supported pattern for comms package. */ static struct > ice_pattern_match_item ice_hash_pattern_list_comms[] =3D { > - {pattern_eth_ipv4, ICE_INSET_NONE, &hint_1}, > - {pattern_eth_ipv4_udp, ICE_INSET_NONE, &hint_2}, > - {pattern_eth_ipv4_tcp, ICE_INSET_NONE, &hint_3}, > - {pattern_eth_ipv4_sctp, ICE_INSET_NONE, &hint_4}, > - {pattern_eth_ipv6, ICE_INSET_NONE, &hint_5}, > - {pattern_eth_ipv6_udp, ICE_INSET_NONE, &hint_6}, > - {pattern_eth_ipv6_tcp, ICE_INSET_NONE, &hint_7}, > - {pattern_eth_ipv6_sctp, ICE_INSET_NONE, &hint_8}, > - {pattern_empty, ICE_INSET_NONE, &hint_0}, > - {pattern_eth_ipv4_gtpu_eh_ipv4, ICE_INSET_NONE, > &hint_9}, > - {pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE, &hint_14}, > - {pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE, &hint_15}, > - {pattern_eth_pppoes_ipv4, ICE_INSET_NONE, &hint_10}, > - {pattern_eth_pppoes_ipv4_udp, ICE_INSET_NONE, &hint_11}, > - {pattern_eth_pppoes_ipv4_tcp, ICE_INSET_NONE, &hint_12}, > - {pattern_eth_pppoes_ipv4_sctp, ICE_INSET_NONE, &hint_13}, > - {pattern_eth_pppoes_ipv6, ICE_INSET_NONE, &hint_16}, > - {pattern_eth_pppoes_ipv6_udp, ICE_INSET_NONE, &hint_17}, > - {pattern_eth_pppoes_ipv6_tcp, ICE_INSET_NONE, &hint_18}, > - {pattern_eth_pppoes_ipv6_sctp, ICE_INSET_NONE, &hint_19}, > - {pattern_eth_pppoes, ICE_INSET_NONE, &hint_20}, > + {pattern_empty, ICE_INSET_NONE, > + &hint_empty}, > + {pattern_eth_ipv4, ICE_INSET_NONE, > + &hint_eth_ipv4}, > + {pattern_eth_ipv4_udp, ICE_INSET_NONE, > + &hint_eth_ipv4_udp}, > + {pattern_eth_ipv4_tcp, ICE_INSET_NONE, > + &hint_eth_ipv4_tcp}, > + {pattern_eth_ipv4_sctp, ICE_INSET_NONE, > + &hint_eth_ipv4_sctp}, > + {pattern_eth_ipv4_gtpu_ipv4, ICE_INSET_NONE, > + &hint_eth_ipv4_gtpu_ipv4}, > + {pattern_eth_ipv4_gtpu_eh_ipv4, ICE_INSET_NONE, > + &hint_eth_ipv4_gtpu_eh_ipv4}, > + {pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE, > + &hint_eth_ipv4_gtpu_eh_ipv4_udp}, > + {pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE, > + &hint_eth_ipv4_gtpu_eh_ipv4_tcp}, > + {pattern_eth_pppoes_ipv4, ICE_INSET_NONE, > + &hint_eth_pppoes_ipv4}, > + {pattern_eth_pppoes_ipv4_udp, ICE_INSET_NONE, > + &hint_eth_pppoes_ipv4_udp}, > + {pattern_eth_pppoes_ipv4_tcp, ICE_INSET_NONE, > + &hint_eth_pppoes_ipv4_tcp}, > + {pattern_eth_pppoes_ipv4_sctp, ICE_INSET_NONE, > + &hint_eth_pppoes_ipv4_sctp}, > + {pattern_eth_ipv4_esp, ICE_INSET_NONE, > + &hint_eth_ipv4_esp}, > + {pattern_eth_ipv4_udp_esp, ICE_INSET_NONE, > + &hint_eth_ipv4_udp_esp}, > + {pattern_eth_ipv4_ah, ICE_INSET_NONE, > + &hint_eth_ipv4_eh}, > + {pattern_eth_ipv4_l2tp, ICE_INSET_NONE, > + &hint_eth_ipv4_l2tpv3}, > + {pattern_eth_ipv4_pfcp, ICE_INSET_NONE, > + &hint_eth_ipv4_pfcp}, > + {pattern_eth_vlan_ipv4, ICE_INSET_NONE, > + &hint_eth_vlan_ipv4}, > + {pattern_eth_ipv6, ICE_INSET_NONE, > + &hint_eth_ipv6}, > + {pattern_eth_ipv6_udp, ICE_INSET_NONE, > + &hint_eth_ipv6_udp}, > + {pattern_eth_ipv6_tcp, ICE_INSET_NONE, > + &hint_eth_ipv6_tcp}, > + {pattern_eth_ipv6_sctp, ICE_INSET_NONE, > + &hint_eth_ipv6_sctp}, > + {pattern_eth_ipv6_esp, ICE_INSET_NONE, > + &hint_eth_ipv6_esp}, > + {pattern_eth_ipv6_udp_esp, ICE_INSET_NONE, > + &hint_eth_ipv6_udp_esp}, > + {pattern_eth_ipv6_ah, ICE_INSET_NONE, > + &hint_eth_ipv6_ah}, > + {pattern_eth_ipv6_l2tp, ICE_INSET_NONE, > + &hint_eth_ipv6_l2tpv3}, > + {pattern_eth_ipv6_pfcp, ICE_INSET_NONE, > + &hint_eth_ipv6_pfcp}, > + {pattern_eth_vlan_ipv6, ICE_INSET_NONE, > + &hint_eth_vlan_ipv6}, > + {pattern_eth_pppoes_ipv6, ICE_INSET_NONE, > + &hint_eth_pppoes_ipv6}, > + {pattern_eth_pppoes_ipv6_udp, ICE_INSET_NONE, > + &hint_eth_pppoes_ipv6_udp}, > + {pattern_eth_pppoes_ipv6_tcp, ICE_INSET_NONE, > + &hint_eth_pppoes_ipv6_tcp}, > + {pattern_eth_pppoes_ipv6_sctp, ICE_INSET_NONE, > + &hint_eth_pppoes_ipv6_sctp}, > + {pattern_eth_pppoes, ICE_INSET_NONE, > + &hint_eth_pppoes}, > }; >=20 > /** > @@ -168,69 +293,227 @@ static struct ice_pattern_match_item > ice_hash_pattern_list_comms[] =3D { > * the second member is hash fields. > */ > struct ice_hash_match_type ice_hash_type_list[] =3D { > - {ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA)}, > - {ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA)}, > - {ETH_RSS_IPV4, > ICE_FLOW_HASH_IPV4}, > - {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_DST_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA)}, > - {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_DST_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA)}, > - {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_DST_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_UDP, > ICE_HASH_UDP_IPV4}, > - {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_DST_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA)}, > - {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_DST_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA)}, > - {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_DST_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_TCP, > ICE_HASH_TCP_IPV4}, > - {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_DST_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA)}, > - {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_DST_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA)}, > - {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_DST_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV4_SCTP, > ICE_HASH_SCTP_IPV4}, > - {ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA)}, > - {ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA)}, > - {ETH_RSS_IPV6, > ICE_FLOW_HASH_IPV6}, > - {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_DST_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA)}, > - {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_DST_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA)}, > - {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_DST_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_UDP, > ICE_HASH_UDP_IPV6}, > - {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_DST_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA)}, > - {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_DST_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA)}, > - {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_DST_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_TCP, > ICE_HASH_TCP_IPV6}, > - {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_DST_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA)}, > - {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_DST_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA) | > BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA)}, > - {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)}, > - {ETH_RSS_NONFRAG_IPV6_SCTP, > ICE_HASH_SCTP_IPV6}, > - {ETH_RSS_ETH | ETH_RSS_L2_SRC_ONLY, > BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_SA)}, > - {ETH_RSS_PPPOE, > ICE_FLOW_HASH_PPPOE_SESS_ID}, > - {ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_L2_SRC_ONLY, > ICE_FLOW_HASH_PPPOE_SESS_ID | > BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_SA)}, > + {ETH_RSS_L2_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_SA)}, > + {ETH_RSS_L2_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_DA)}, > + {ETH_RSS_ETH | ETH_RSS_L2_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_SA)}, > + {ETH_RSS_ETH | ETH_RSS_L2_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_DA)}, > + {ETH_RSS_ETH, > + BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_SA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_DA)}, > + {ETH_RSS_PPPOE, > + ICE_FLOW_HASH_PPPOE_SESS_ID}, > + {ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_L2_SRC_ONLY, > + ICE_FLOW_HASH_PPPOE_SESS_ID | > + BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_SA)}, > + {ETH_RSS_C_VLAN, > + BIT_ULL(ICE_FLOW_FIELD_IDX_C_VLAN)}, > + {ETH_RSS_S_VLAN, > + BIT_ULL(ICE_FLOW_FIELD_IDX_S_VLAN)}, > + {ETH_RSS_ESP, > + BIT_ULL(ICE_FLOW_FIELD_IDX_ESP_SPI)}, > + {ETH_RSS_AH, > + BIT_ULL(ICE_FLOW_FIELD_IDX_AH_SPI)}, > + {ETH_RSS_L2TPV3, > + BIT_ULL(ICE_FLOW_FIELD_IDX_L2TPV3_SESS_ID)}, > + {ETH_RSS_PFCP, > + BIT_ULL(ICE_FLOW_FIELD_IDX_PFCP_SEID)}, > + {ETH_RSS_GTPU, > + BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_IP_TEID) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_EH_TEID) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_UP_TEID) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_DWN_TEID)}, > + /* IPV4 */ > + {ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA)}, > + {ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA)}, > + {ETH_RSS_IPV4, ICE_FLOW_HASH_IPV4}, > + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)}, > + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)}, > + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA)}, > + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)}, > + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)}, > + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA)}, > + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT)}, > + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT)}, > + {ETH_RSS_NONFRAG_IPV4_UDP, > + ICE_HASH_UDP_IPV4 | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT)}, > + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)}, > + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)}, > + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA)}, > + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)}, > + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)}, > + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA)}, > + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT)}, > + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT)}, > + {ETH_RSS_NONFRAG_IPV4_TCP, > + ICE_HASH_TCP_IPV4 | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT)}, > + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)}, > + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)}, > + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA)}, > + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)}, > + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)}, > + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA)}, > + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT)}, > + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT)}, > + {ETH_RSS_NONFRAG_IPV4_SCTP, > + ICE_HASH_SCTP_IPV4 | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT)}, > + /* IPV6 */ > + {ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA)}, > + {ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA)}, > + {ETH_RSS_IPV6, ICE_FLOW_HASH_IPV6}, > + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)}, > + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)}, > + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA)}, > + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)}, > + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)}, > + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA)}, > + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)}, > + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)}, > + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_PFCP, > + BIT_ULL(ICE_FLOW_FIELD_IDX_PFCP_SEID)}, > + {ETH_RSS_NONFRAG_IPV6_UDP, > + ICE_HASH_UDP_IPV6 | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)}, > + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)}, > + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)}, > + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA)}, > + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)}, > + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)}, > + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA)}, > + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)}, > + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)}, > + {ETH_RSS_NONFRAG_IPV6_TCP, > + ICE_HASH_TCP_IPV6 | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)}, > + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)}, > + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY | > ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)}, > + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA)}, > + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)}, > + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY | > ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)}, > + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA)}, > + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_SRC_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)}, > + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY, > + BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT) | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)}, > + {ETH_RSS_NONFRAG_IPV6_SCTP, > + ICE_HASH_SCTP_IPV6 | > + BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)}, > }; >=20 > static struct ice_flow_engine ice_hash_engine =3D { @@ -285,10 +568,13 @= @ > ice_hash_init(struct ice_adapter *ad) } >=20 > static int > -ice_hash_check_inset(const struct rte_flow_item pattern[], > - struct rte_flow_error *error) > +ice_hash_parse_pattern(struct ice_pattern_match_item > *pattern_match_item, > + const struct rte_flow_item pattern[], void **meta, > + struct rte_flow_error *error) > { > const struct rte_flow_item *item =3D pattern; > + const struct rte_flow_item_gtp_psc *psc; > + uint32_t hdrs =3D 0; >=20 > for (item =3D pattern; item->type !=3D RTE_FLOW_ITEM_TYPE_END; item++) > { > if (item->last) { > @@ -298,15 +584,30 @@ ice_hash_check_inset(const struct rte_flow_item > pattern[], > return -rte_errno; > } >=20 > - /* Ignore spec and mask. */ > - if (item->spec || item->mask) { > - rte_flow_error_set(error, EINVAL, > - RTE_FLOW_ERROR_TYPE_ITEM, item, > - "Invalid spec/mask."); > - return -rte_errno; > + switch (item->type) { > + case RTE_FLOW_ITEM_TYPE_GTPU: > + hdrs |=3D ICE_FLOW_SEG_HDR_GTPU_IP; > + break; > + case RTE_FLOW_ITEM_TYPE_GTP_PSC: > + psc =3D item->spec; > + hdrs &=3D ~ICE_FLOW_SEG_HDR_GTPU_IP; > + if (!psc) > + hdrs |=3D ICE_FLOW_SEG_HDR_GTPU_EH; > + else if (psc->pdu_type =3D=3D ICE_GTPU_EH_UPLINK) > + hdrs |=3D ICE_FLOW_SEG_HDR_GTPU_UP; > + else if (psc->pdu_type =3D=3D ICE_GTPU_EH_DWNLINK) > + hdrs |=3D ICE_FLOW_SEG_HDR_GTPU_DWN; > + break; > + default: > + break; > } > } >=20 > + /* Save protocol header to rss_meta. */ > + ((struct rss_meta *)*meta)->pkt_hdr |=3D > + ((struct rss_type_match_hdr *) > + (pattern_match_item->meta))->hdr_mask | hdrs; > + > return 0; > } >=20 > @@ -316,14 +617,14 @@ ice_hash_parse_action(struct > ice_pattern_match_item *pattern_match_item, > void **meta, > struct rte_flow_error *error) > { > - const struct rte_flow_action *action; > - enum rte_flow_action_type action_type; > - const struct rte_flow_action_rss *rss; > struct rss_type_match_hdr *m =3D (struct rss_type_match_hdr *) > (pattern_match_item->meta); > + struct rss_meta *hash_meta =3D (struct rss_meta *)*meta; > uint32_t type_list_len =3D RTE_DIM(ice_hash_type_list); > - struct ice_hash_match_type *type_match_item; > - uint64_t rss_hf; > + enum rte_flow_action_type action_type; > + const struct rte_flow_action_rss *rss; > + const struct rte_flow_action *action; > + uint64_t rss_type; > uint16_t i; >=20 > /* Supported action is RSS. */ > @@ -333,46 +634,24 @@ ice_hash_parse_action(struct > ice_pattern_match_item *pattern_match_item, > switch (action_type) { > case RTE_FLOW_ACTION_TYPE_RSS: > rss =3D action->conf; > - rss_hf =3D rss->types; > + rss_type =3D rss->types; >=20 > - /** > - * Check simultaneous use of SRC_ONLY and DST_ONLY > - * of the same level. > - */ > - rss_hf =3D rte_eth_rss_hf_refine(rss_hf); > - > - /* Check if pattern is empty. */ > + /* Check hash function and save it to rss_meta. */ > if (pattern_match_item->pattern_list !=3D > - pattern_empty && rss->func =3D=3D > - RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) > + pattern_empty && rss->func =3D=3D > + RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) { > return rte_flow_error_set(error, ENOTSUP, > RTE_FLOW_ERROR_TYPE_ACTION, action, > "Not supported flow"); > - > - if ((rss_hf & ETH_RSS_ETH) && (rss_hf & ~ETH_RSS_PPPOE)) > - m->eth_rss_hint =3D ETH_RSS_ETH; > - else if ((rss_hf & ETH_RSS_PPPOE) && (rss_hf & > ~ETH_RSS_ETH)) > - m->eth_rss_hint =3D ETH_RSS_PPPOE; > - else if ((rss_hf & ETH_RSS_ETH) && (rss_hf & > ETH_RSS_PPPOE)) > - m->eth_rss_hint =3D ETH_RSS_ETH | ETH_RSS_PPPOE; > - > - /* Check if rss types match pattern. */ > - if (rss->func !=3D RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) { > - if (((rss_hf & ETH_RSS_IPV4) !=3D m->eth_rss_hint) && > - ((rss_hf & ETH_RSS_NONFRAG_IPV4_UDP) !=3D > m->eth_rss_hint) && > - ((rss_hf & ETH_RSS_NONFRAG_IPV4_TCP) !=3D > m->eth_rss_hint) && > - ((rss_hf & ETH_RSS_NONFRAG_IPV4_SCTP) !=3D > m->eth_rss_hint) && > - ((rss_hf & ETH_RSS_IPV6) !=3D m->eth_rss_hint) && > - ((rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) !=3D > m->eth_rss_hint) && > - ((rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) !=3D > m->eth_rss_hint) && > - ((rss_hf & ETH_RSS_NONFRAG_IPV6_SCTP) !=3D > m->eth_rss_hint) && > - ((rss_hf & ETH_RSS_ETH) !=3D m->eth_rss_hint) && > - ((rss_hf & ETH_RSS_PPPOE) !=3D m->eth_rss_hint) && > - (((rss_hf & (ETH_RSS_ETH | ETH_RSS_PPPOE)) !=3D > - m->eth_rss_hint))) > - return rte_flow_error_set(error, > - ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, > - action, "Not supported RSS types"); > + } else if (rss->func =3D=3D > + RTE_ETH_HASH_FUNCTION_SIMPLE_XOR){ > + ((struct rss_meta *)*meta)->hash_function =3D > + RTE_ETH_HASH_FUNCTION_SIMPLE_XOR; > + return 0; > + } else if (rss->func =3D=3D > + RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) { > + ((struct rss_meta *)*meta)->hash_function =3D > + RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ; > } >=20 > if (rss->level) > @@ -390,42 +669,47 @@ ice_hash_parse_action(struct > ice_pattern_match_item *pattern_match_item, > RTE_FLOW_ERROR_TYPE_ACTION, action, > "a non-NULL RSS queue is not supported"); >=20 > - /* Check hash function and save it to rss_meta. */ > - if (rss->func =3D=3D > - RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) > - ((struct rss_meta *)*meta)->hash_function =3D > - RTE_ETH_HASH_FUNCTION_SIMPLE_XOR; > + /** > + * Check simultaneous use of SRC_ONLY and DST_ONLY > + * of the same level. > + */ > + rss_type =3D rte_eth_rss_hf_refine(rss_type); >=20 > - if (rss->func =3D=3D > - RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) > - ((struct rss_meta *)*meta)->hash_function =3D > - RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ; > + uint64_t combine_type =3D ETH_RSS_L2_SRC_ONLY | > + ETH_RSS_L2_DST_ONLY | > + ETH_RSS_L3_SRC_ONLY | > + ETH_RSS_L3_DST_ONLY | > + ETH_RSS_L4_SRC_ONLY | > + ETH_RSS_L4_DST_ONLY; >=20 > - type_match_item =3D rte_zmalloc("ice_type_match_item", > - sizeof(struct ice_hash_match_type), 0); > - if (!type_match_item) { > - rte_flow_error_set(error, EINVAL, > - RTE_FLOW_ERROR_TYPE_HANDLE, NULL, > - "No memory for type_match_item"); > - return -ENOMEM; > + /* Check if rss types match pattern. */ > + if (rss_type & ~combine_type & ~m->eth_rss_hint) { > + return rte_flow_error_set(error, > + ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, > + action, "Not supported RSS types"); > } >=20 > /* Find matched hash fields according to hash type. */ > for (i =3D 0; i < type_list_len; i++) { > - if (rss_hf =3D=3D > - ice_hash_type_list[i].hash_type) { > - type_match_item->hash_type =3D > - ice_hash_type_list[i].hash_type; > - type_match_item->hash_flds =3D > - ice_hash_type_list[i].hash_flds; > + struct ice_hash_match_type *ht_map =3D > + &ice_hash_type_list[i]; > + > + if (rss_type =3D=3D ht_map->hash_type) { > + hash_meta->hash_flds =3D > + ht_map->hash_flds; > + break; > } > } >=20 > - /* Save hash fileds to rss_meta. */ > - ((struct rss_meta *)*meta)->hash_flds =3D > - type_match_item->hash_flds; > + /* update hash field for nat-t esp. */ > + if ((rss_type =3D=3D ETH_RSS_ESP) && > + (m->eth_rss_hint || ETH_RSS_NONFRAG_IPV4_UDP)) { > + hash_meta->hash_flds &=3D > + ~(BIT_ULL(ICE_FLOW_FIELD_IDX_ESP_SPI)); > + hash_meta->hash_flds |=3D > + BIT_ULL(ICE_FLOW_FIELD_IDX_NAT_T_ESP_SPI); > + } >=20 > - rte_free(type_match_item); > break; >=20 > case RTE_FLOW_ACTION_TYPE_END: > @@ -471,14 +755,11 @@ ice_hash_parse_pattern_action(__rte_unused > struct ice_adapter *ad, > goto error; > } >=20 > - ret =3D ice_hash_check_inset(pattern, error); > + ret =3D ice_hash_parse_pattern(pattern_match_item, pattern, > + (void **)&rss_meta_ptr, error); > if (ret) > goto error; >=20 > - /* Save protocol header to rss_meta. */ > - rss_meta_ptr->pkt_hdr =3D ((struct rss_type_match_hdr *) > - (pattern_match_item->meta))->hdr_mask; > - > /* Check rss action. */ > ret =3D ice_hash_parse_action(pattern_match_item, actions, > (void **)&rss_meta_ptr, error); > -- > 2.20.1