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 B4650A034F; Wed, 13 May 2020 10:31:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 23D031C2EE; Wed, 13 May 2020 10:31:15 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 9BE021C2AA; Wed, 13 May 2020 10:31:13 +0200 (CEST) IronPort-SDR: BALDBsUXvWfkoC17lfuBlB2GR2cltYVL+t+mWqBGcmH18+17BBMorPCrVc2zhChGAaXhdp8h7x Bl6f8V+enThg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2020 01:31:12 -0700 IronPort-SDR: HM8M/hfv0kkRdsCG10v1hM276miOYZd149y9OgvXc3xpd7fD1s0wDUPq7tHmjet6sB29C+ohOu p5AFhMZ5PURQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,387,1583222400"; d="scan'208";a="251175788" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga007.jf.intel.com with ESMTP; 13 May 2020 01:31:12 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 13 May 2020 01:31:12 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 13 May 2020 01:31:11 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.225]) by shsmsx102.ccr.corp.intel.com ([169.254.2.38]) with mapi id 14.03.0439.000; Wed, 13 May 2020 16:31:08 +0800 From: "Cui, LunyuanX" To: "Wang, ShougangX" , "dev@dpdk.org" CC: "Xing, Beilei" , "Guo, Jia" , "Wang, ShougangX" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3] net/i40e: fix queue region issue in RSS flow Thread-Index: AQHWKNkrziSIrOooFkKP1ZBE0azL8ailr5pQ Date: Wed, 13 May 2020 08:31:07 +0000 Message-ID: References: <20200424085225.27655-1-shougangx.wang@intel.com> <20200513033320.15771-1-shougangx.wang@intel.com> In-Reply-To: <20200513033320.15771-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 v3] 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: Cui, Lunyuan > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shougang Wang > Sent: Wednesday, May 13, 2020 11:33 AM > To: dev@dpdk.org > Cc: Xing, Beilei ; Guo, Jia ; W= ang, > ShougangX ; stable@dpdk.org > Subject: [dpdk-dev] [PATCH v3] net/i40e: fix queue region issue in RSS fl= ow >=20 > This patch fixes the issue that the queue region does not take effect due= to > incorrectly setting the flow type. >=20 > Fixes: ecad87d22383 ("net/i40e: move RSS to flow API") > Cc: stable@dpdk.org >=20 > Signed-off-by: Shougang Wang > Reviewed-by: Jeff Guo > --- > drivers/net/i40e/i40e_flow.c | 35 ++++++++++++++++++++++++++++++++- > -- > 1 file changed, 32 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c > index 7e64ae53a..2f937567b 100644 > --- a/drivers/net/i40e/i40e_flow.c > +++ b/drivers/net/i40e/i40e_flow.c > @@ -4625,6 +4625,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 > @@ -4641,9 +4669,10 @@ i40e_flow_parse_rss_action(struct rte_eth_dev > *dev, > } >=20 > if (p_info.action_flag) { > - 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