From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 7A11A1B39E for ; Mon, 3 Dec 2018 06:30:00 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Dec 2018 21:29:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,309,1539673200"; d="scan'208";a="97512073" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga006.jf.intel.com with ESMTP; 02 Dec 2018 21:29:59 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 2 Dec 2018 21:29:59 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 2 Dec 2018 21:29:58 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.59]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.46]) with mapi id 14.03.0415.000; Mon, 3 Dec 2018 13:29:56 +0800 From: "Zhang, Qi Z" To: "Li, Xiaoyun" CC: "dev@dpdk.org" Thread-Topic: [PATCH] net/i40e: adjust the RSS table Thread-Index: AQHUgs95bhef2Z8DjUKeLGkyszOVZ6Vsi1Lw Date: Mon, 3 Dec 2018 05:29:56 +0000 Message-ID: <039ED4275CED7440929022BC67E70611532F89A9@SHSMSX103.ccr.corp.intel.com> References: <1542936954-39421-1-git-send-email-xiaoyun.li@intel.com> In-Reply-To: <1542936954-39421-1-git-send-email-xiaoyun.li@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjc3ZTdhZTAtM2ZiOC00MjU2LTk4MzAtYmRmNDE2ZTM1YWUxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWTVzWmU1ZEQ1TVM0Z3JydVRhOTBtZXZIbWVEbWV3Tlg2Z016N3k2OFwvM2pLTnErN3V0Z1JqQWxmd090MG1ld2kifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 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] [PATCH] net/i40e: adjust the RSS table 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: , X-List-Received-Date: Mon, 03 Dec 2018 05:30:01 -0000 > -----Original Message----- > From: Li, Xiaoyun > Sent: Friday, November 23, 2018 9:36 AM > To: Zhang, Qi Z > Cc: dev@dpdk.org; Li, Xiaoyun > Subject: [PATCH] net/i40e: adjust the RSS table >=20 > When starting the device, the RSS table is set. For 8 queues, the RSS has= h table > would be like | 3,2,1,0,7,6,5,4 | 3,2,1,0,7,6,5,4 |... This patch adjusts= this table > to set entries sequentially. Then for 8 queues, the RSS table would be li= ke | > 0,1,2,3,4,5,6,7 | 0,1,2,3,4,5,6,7 |... My understanding is this is a byte order issue. Does below change will fix the same thing? - I40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut); - I40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), rte_bswap32(lut)); >=20 > Signed-off-by: Xiaoyun Li > --- > drivers/net/i40e/i40e_ethdev.c | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 790ecc3..031eba0 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -8468,6 +8468,7 @@ i40e_pf_config_rss(struct i40e_pf *pf) { > struct i40e_hw *hw =3D I40E_PF_TO_HW(pf); > struct rte_eth_rss_conf rss_conf; > + uint32_t size =3D hw->func_caps.rss_table_size; > uint32_t i, lut =3D 0; > uint16_t j, num; >=20 > @@ -8489,13 +8490,17 @@ i40e_pf_config_rss(struct i40e_pf *pf) > return -ENOTSUP; > } >=20 > - for (i =3D 0, j =3D 0; i < hw->func_caps.rss_table_size; i++, j++) { > - if (j =3D=3D num) > - j =3D 0; > + for (i =3D size - 1, j =3D (size - 1) % num;; i--, j--) { > lut =3D (lut << 8) | (j & ((0x1 << > - hw->func_caps.rss_table_entry_width) - 1)); > - if ((i & 3) =3D=3D 3) > + hw->func_caps.rss_table_entry_width) - 1)); > + > + if (j =3D=3D 0) > + j =3D num; > + > + if ((i & 3) =3D=3D 0) > I40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut); > + if (i =3D=3D 0) > + break; > } >=20 > rss_conf =3D pf->dev_data->dev_conf.rx_adv_conf.rss_conf; > -- > 2.7.4