From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C544A034F; Tue, 30 Mar 2021 05:29:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59EAA140F82; Tue, 30 Mar 2021 05:29:59 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 2342C140F70 for ; Tue, 30 Mar 2021 05:29:56 +0200 (CEST) IronPort-SDR: bhTf/RsC4CdRWfVWtbNhAJkYkkDkc4PCh6cXCO0VN8nfq3JsjorjjRxtTRvj2qcW2DKKCElCEY tDezHVb+1NmA== X-IronPort-AV: E=McAfee;i="6000,8403,9938"; a="188410945" X-IronPort-AV: E=Sophos;i="5.81,289,1610438400"; d="scan'208";a="188410945" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2021 20:29:54 -0700 IronPort-SDR: +DmzWuCRAiH77yh8LKPD/Rz4hfBP6wAGML8mXAD/pk4yASNHR7LIHPowrPLK4PXSNg2nSFcw1p zxoxGDAPDZLQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,289,1610438400"; d="scan'208";a="527171660" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga004.jf.intel.com with ESMTP; 29 Mar 2021 20:29:53 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 29 Mar 2021 20:29:52 -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.2106.2; Tue, 30 Mar 2021 11:29:50 +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.2106.013; Tue, 30 Mar 2021 11:29:50 +0800 From: "Zhang, Qi Z" To: "Ding, Xuan" , "Guo, Jia" CC: "dev@dpdk.org" , "Yang, Qiming" , "Noonan, Gordon" , "Varshney, Shashank1" Thread-Topic: [PATCH] net/ice: refine RSS configure Thread-Index: AQHXIXPUsPl8hxVlU0qLpGsxBgcHnqqbWJ6AgACKxqA= Date: Tue, 30 Mar 2021 03:29:50 +0000 Message-ID: <0f2f65c090a84a4088f306dfc78b1916@intel.com> References: <20210325124241.2357850-1-qi.z.zhang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows 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] net/ice: refine RSS configure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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: Ding, Xuan > Sent: Tuesday, March 30, 2021 11:00 AM > To: Zhang, Qi Z ; Guo, Jia > Cc: dev@dpdk.org; Yang, Qiming ; Noonan, Gordon > ; Varshney, Shashank1 > > Subject: RE: [PATCH] net/ice: refine RSS configure >=20 > Hi Qi, >=20 > Replies inline. >=20 > > -----Original Message----- > > From: Zhang, Qi Z > > Sent: Thursday, March 25, 2021 8:43 PM > > To: Guo, Jia ; Ding, Xuan > > Cc: dev@dpdk.org; Yang, Qiming ; Noonan, > Gordon > > ; Varshney, Shashank1 > > ; Zhang, Qi Z > > Subject: [PATCH] net/ice: refine RSS configure > > > > The ICE_RSS_ANY_HEADERS will try to enable outer RSS for non-tunnel > > case and inner RSS for tunnel case. This confuse user. > > > > As we already have ICE_RSS_INNER_HEADER for tunnel case, So, replace > > ICE_RSS_ANY_HEADERS with ICE_RSS_OUTER_HEADERS for all exist flow > > which only specified the outer pattern. > > > > To enable inner RSS for any tunnel cases, a separated rule should be > > enabled. > > > > The patch also remove some unncessary condition check for GTPU >=20 > Here ' unncessary ' is a typo, should be 'unnecessary'. >=20 > > in base code, as we already can support outer RSS for GTPU. > > > > Signed-off-by: Qi Zhang > > --- > > drivers/net/ice/base/ice_flow.c | 14 ------------ > > drivers/net/ice/ice_ethdev.c | 4 ++-- > > drivers/net/ice/ice_hash.c | 38 ++++++++++++++++----------------- > > 3 files changed, 21 insertions(+), 35 deletions(-) > > > > diff --git a/drivers/net/ice/base/ice_flow.c > > b/drivers/net/ice/base/ice_flow.c index d123206fc6..bceb257d61 100644 > > --- a/drivers/net/ice/base/ice_flow.c > > +++ b/drivers/net/ice/base/ice_flow.c > > @@ -3678,13 +3678,6 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 > > vsi_handle, if (status) goto exit; > > > > -/* Don't do RSS for GTPU Outer */ > > -if (segs_cnt =3D=3D ICE_FLOW_SEG_SINGLE && > > - segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) { > > -status =3D ICE_SUCCESS; > > -goto exit; > > -} > > - > > /* Search for a flow profile that has matching headers, hash fields > > * and has the input VSI associated to it. If found, no further > > * operations required and exit. > > @@ -3847,13 +3840,6 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 > > vsi_handle, if (status) goto out; > > > > -/* Don't do RSS for GTPU Outer */ > > -if (segs_cnt =3D=3D ICE_FLOW_SEG_SINGLE && > > - segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) { > > -status =3D ICE_SUCCESS; > > -goto out; > > -} > > - > > prof =3D ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt= , > > vsi_handle, ICE_FLOW_FIND_PROF_CHK_FLDS); diff --git > > a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index > > 3e85e5f629..4ccf31cb41 100644 > > --- a/drivers/net/ice/ice_ethdev.c > > +++ b/drivers/net/ice/ice_ethdev.c > > @@ -2348,7 +2348,7 @@ hash_cfg_reset(struct ice_rss_hash_cfg *cfg) > > cfg->hash_flds =3D 0; cfg->addl_hdrs =3D 0; cfg->symm =3D 0; > > -cfg->hdr_type =3D ICE_RSS_ANY_HEADERS; > > +cfg->hdr_type =3D ICE_RSS_OUTER_HEADERS; > > } > > > > static int > > @@ -2833,7 +2833,7 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t > rss_hf) > > __func__, ret); > > > > cfg.symm =3D 0; > > -cfg.hdr_type =3D ICE_RSS_ANY_HEADERS; > > +cfg.hdr_type =3D ICE_RSS_OUTER_HEADERS; > > /* Configure RSS for IPv4 with src/dst addr as input set */ if > > (rss_hf & ETH_RSS_IPV4) { cfg.addl_hdrs =3D ICE_FLOW_SEG_HDR_IPV4 | > > ICE_FLOW_SEG_HDR_IPV_OTHER; diff --git a/drivers/net/ice/ice_hash.c > > b/drivers/net/ice/ice_hash.c index 58a0c18d09..7d7e7052da 100644 > > --- a/drivers/net/ice/ice_hash.c > > +++ b/drivers/net/ice/ice_hash.c > > @@ -110,7 +110,7 @@ struct ice_rss_hash_cfg ipv4_tmplt =3D { > > ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV4 | > > ICE_FLOW_SEG_HDR_IPV_OTHER, ICE_FLOW_HASH_ETH | > ICE_FLOW_HASH_IPV4, > > -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -118,7 +118,7 @@ struct ice_rss_hash_cfg ipv4_udp_tmplt =3D { > > ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV4 | > > ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_UDP, > ICE_FLOW_HASH_ETH > > | ICE_HASH_UDP_IPV4 | ICE_IPV4_PROT, -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -126,7 +126,7 @@ struct ice_rss_hash_cfg ipv4_tcp_tmplt =3D { > > ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV4 | > > ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_TCP, > ICE_FLOW_HASH_ETH > > | ICE_HASH_TCP_IPV4 | ICE_IPV4_PROT, -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -134,7 +134,7 @@ struct ice_rss_hash_cfg ipv4_sctp_tmplt =3D { > > ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV4 | > > ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_SCTP, > ICE_FLOW_HASH_ETH > > | ICE_HASH_SCTP_IPV4 | ICE_IPV4_PROT, -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -142,7 +142,7 @@ struct ice_rss_hash_cfg ipv6_tmplt =3D { > > ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV6 | > > ICE_FLOW_SEG_HDR_IPV_OTHER, ICE_FLOW_HASH_ETH | > ICE_FLOW_HASH_IPV6, > > -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -150,7 +150,7 @@ struct ice_rss_hash_cfg ipv6_udp_tmplt =3D { > > ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV6 | > > ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_UDP, > ICE_FLOW_HASH_ETH > > | ICE_HASH_UDP_IPV6 | ICE_IPV6_PROT, -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -158,7 +158,7 @@ struct ice_rss_hash_cfg ipv6_tcp_tmplt =3D { > > ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV6 | > > ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_TCP, > ICE_FLOW_HASH_ETH > > | ICE_HASH_TCP_IPV6 | ICE_IPV6_PROT, -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -166,7 +166,7 @@ struct ice_rss_hash_cfg ipv6_sctp_tmplt =3D { > > ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_IPV6 | > > ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_SCTP, > ICE_FLOW_HASH_ETH > > | ICE_HASH_SCTP_IPV6 | ICE_IPV6_PROT, -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -262,7 +262,7 @@ struct ice_rss_hash_cfg eth_ipv4_esp_tmplt =3D { > > ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER | > > ICE_FLOW_SEG_HDR_ESP, ICE_FLOW_HASH_ESP_SPI, > -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -270,7 +270,7 @@ struct ice_rss_hash_cfg eth_ipv4_udp_esp_tmplt =3D = { > > ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER | > > ICE_FLOW_SEG_HDR_NAT_T_ESP, ICE_FLOW_HASH_NAT_T_ESP_SPI, > > -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -278,7 +278,7 @@ struct ice_rss_hash_cfg eth_ipv4_ah_tmplt =3D { > > ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER | > > ICE_FLOW_SEG_HDR_AH, ICE_FLOW_HASH_AH_SPI, > -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -286,7 +286,7 @@ struct ice_rss_hash_cfg eth_ipv4_l2tpv3_tmplt =3D { > > ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER | > > ICE_FLOW_SEG_HDR_L2TPV3, ICE_FLOW_HASH_L2TPV3_SESS_ID, > > -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -294,7 +294,7 @@ struct ice_rss_hash_cfg eth_ipv4_pfcp_tmplt =3D { > > ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER | > > ICE_FLOW_SEG_HDR_PFCP_SESSION, ICE_FLOW_HASH_PFCP_SEID, > > -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -302,7 +302,7 @@ struct ice_rss_hash_cfg eth_ipv6_esp_tmplt =3D { > > ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER | > > ICE_FLOW_SEG_HDR_ESP, ICE_FLOW_HASH_ESP_SPI, > -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -310,7 +310,7 @@ struct ice_rss_hash_cfg eth_ipv6_udp_esp_tmplt =3D = { > > ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER | > > ICE_FLOW_SEG_HDR_NAT_T_ESP, ICE_FLOW_HASH_NAT_T_ESP_SPI, > > -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -318,7 +318,7 @@ struct ice_rss_hash_cfg eth_ipv6_ah_tmplt =3D { > > ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER | > > ICE_FLOW_SEG_HDR_AH, ICE_FLOW_HASH_AH_SPI, > -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -326,7 +326,7 @@ struct ice_rss_hash_cfg eth_ipv6_l2tpv3_tmplt =3D { > > ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER | > > ICE_FLOW_SEG_HDR_L2TPV3, ICE_FLOW_HASH_L2TPV3_SESS_ID, > > -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > @@ -334,14 +334,14 @@ struct ice_rss_hash_cfg eth_ipv6_pfcp_tmplt =3D { > > ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_IPV_OTHER | > > ICE_FLOW_SEG_HDR_PFCP_SESSION, ICE_FLOW_HASH_PFCP_SEID, > > -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > struct ice_rss_hash_cfg pppoe_tmplt =3D { ICE_FLOW_SEG_HDR_ETH, > > ICE_FLOW_HASH_ETH | ICE_FLOW_HASH_PPPOE_SESS_ID, > -ICE_RSS_ANY_HEADERS, > > +ICE_RSS_OUTER_HEADERS, > > 0 > > }; > > > > -- > > 2.26.2 >=20 > Since PPPOE protocol is a encapsulating network protocol. > For IP/UDP or IP/TCP cases, is it right to treat it as outer cases? > Here are some doubts. PPPOE don't have outer l3/l4, it belongs to the same layer with inner l3/l4= , for single layer, we just take outer header Typically , inner header will only be used for gtpu/vxlan/gre=20 >=20 > Thanks, > Xuan >=20