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 25A0CA0093; Mon, 18 May 2020 04:57:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 001101D448; Mon, 18 May 2020 04:57:27 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 959441D443; Mon, 18 May 2020 04:57:25 +0200 (CEST) IronPort-SDR: nA2wGR5O9bUuF+HwbHx0cxrQFNIFchKKL000N1zUqZl+Fbug7luRjULCDfXr0cYaOtDCfI5bva VM3EdtRiAmeQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2020 19:57:24 -0700 IronPort-SDR: fvg6iQV+Dv9wZdN+7SU+0mDcYOP7xxxVLituU05/j6/eFQmu5nFsXhW1BcytL0ECmxtgkN5/Nz 7G/fZqUD6GKw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,405,1583222400"; d="scan'208";a="411104391" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 17 May 2020 19:57:24 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 17 May 2020 19:57:24 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 17 May 2020 19:57:23 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.181]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.13]) with mapi id 14.03.0439.000; Mon, 18 May 2020 10:57:20 +0800 From: "Xu, HailinX" To: "Wang, ShougangX" , "dev@dpdk.org" CC: "Wang, ShougangX" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4] net/i40e: fix queue region issue in RSS flow Thread-Index: AQHWKo4D04Rxfyume0ioTrpRtVrlGqitKvXg Date: Mon, 18 May 2020 02:57:19 +0000 Message-ID: References: <20200424085225.27655-1-shougangx.wang@intel.com> <20200515073231.19158-1-shougangx.wang@intel.com> In-Reply-To: <20200515073231.19158-1-shougangx.wang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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] [PATCH v4] net/i40e: fix queue region issue in RSS flow 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" Tested-by: Xu, Hailin Regards, Xu, Hailin -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shougang Wang Sent: Friday, May 15, 2020 3:33 PM To: dev@dpdk.org Cc: Wang, ShougangX ; stable@dpdk.org Subject: [dpdk-dev] [PATCH v4] net/i40e: fix queue region issue in RSS flow This patch fixes the issue that the queue region does not take effect due t= o incorrectly setting the flow type. Fixes: ecad87d22383 ("net/i40e: move RSS to flow API") Cc: stable@dpdk.org Signed-off-by: Shougang Wang Reviewed-by: Jeff Guo Tested-by: Hailin Xu Tested-by: Lunyuan Cui --- v4: -rebased on dpdk-next-net-intel --- drivers/net/i40e/i40e_flow.c | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c in= dex f5f2f0d5d..1b2c86fa9 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -4623,6 +4623,34 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, uint32_t index =3D 0; uint64_t hf_bit =3D 1; =20 + static const struct { + uint64_t rss_type; + enum i40e_filter_pctype pctype; + } pctype_match_table[] =3D { + {ETH_RSS_FRAG_IPV4, + I40E_FILTER_PCTYPE_FRAG_IPV4}, + {ETH_RSS_NONFRAG_IPV4_TCP, + I40E_FILTER_PCTYPE_NONF_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_UDP, + I40E_FILTER_PCTYPE_NONF_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_SCTP, + I40E_FILTER_PCTYPE_NONF_IPV4_SCTP}, + {ETH_RSS_NONFRAG_IPV4_OTHER, + I40E_FILTER_PCTYPE_NONF_IPV4_OTHER}, + {ETH_RSS_FRAG_IPV6, + I40E_FILTER_PCTYPE_FRAG_IPV6}, + {ETH_RSS_NONFRAG_IPV6_TCP, + I40E_FILTER_PCTYPE_NONF_IPV6_TCP}, + {ETH_RSS_NONFRAG_IPV6_UDP, + I40E_FILTER_PCTYPE_NONF_IPV6_UDP}, + {ETH_RSS_NONFRAG_IPV6_SCTP, + I40E_FILTER_PCTYPE_NONF_IPV6_SCTP}, + {ETH_RSS_NONFRAG_IPV6_OTHER, + I40E_FILTER_PCTYPE_NONF_IPV6_OTHER}, + {ETH_RSS_L2_PAYLOAD, + I40E_FILTER_PCTYPE_L2_PAYLOAD}, + }; + NEXT_ITEM_OF_ACTION(act, actions, index); rss =3D act->conf; =20 @@ -4639,9 +4667,10 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, } =20 if (p_info.action_flag && rss->queue_num) { - for (n =3D 0; n < 64; n++) { - if (rss->types & (hf_bit << n)) { - conf_info->region[0].hw_flowtype[0] =3D n; + for (j =3D 0; j < RTE_DIM(pctype_match_table); j++) { + if (rss->types & pctype_match_table[j].rss_type) { + conf_info->region[0].hw_flowtype[0] =3D + (uint8_t)pctype_match_table[j].pctype; conf_info->region[0].flowtype_num =3D 1; conf_info->queue_region_number =3D 1; break; -- 2.17.1