From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 2FF6A1B4D4 for ; Mon, 3 Dec 2018 09:31:01 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Dec 2018 00:31:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,309,1539673200"; d="scan'208";a="106528616" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga008.fm.intel.com with ESMTP; 03 Dec 2018 00:31:01 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 3 Dec 2018 00:31:01 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.59]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.203]) with mapi id 14.03.0415.000; Mon, 3 Dec 2018 16:30:59 +0800 From: "Zhang, Qi Z" To: "Li, Xiaoyun" CC: "dev@dpdk.org" Thread-Topic: [PATCH v2] net/i40e: adjust the RSS table Thread-Index: AQHUithUIWZ3JaS3hUyp8Gv4LY5Vp6Vsqrew Date: Mon, 3 Dec 2018 08:30:58 +0000 Message-ID: <039ED4275CED7440929022BC67E70611532F8B57@SHSMSX103.ccr.corp.intel.com> References: <1542936954-39421-1-git-send-email-xiaoyun.li@intel.com> <1543820324-65325-1-git-send-email-xiaoyun.li@intel.com> In-Reply-To: <1543820324-65325-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjRiZjg1MWUtNDcyMy00MGUxLTk4N2EtMzgwN2UyZDNjM2JiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNW1PcFpkYzNucU5pekY2RG1JV1VpWkRRTkgzcm9EQWVmQlBQVGxjQUNZQTdLclZtR1lnbGZNVkFMV2E5RFRQMSJ9 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 v2] 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 08:31:02 -0000 minor captures inline Otherwise Acked-by: Qi Zhang > -----Original Message----- > From: Li, Xiaoyun > Sent: Monday, December 3, 2018 2:59 PM > To: Zhang, Qi Z > Cc: dev@dpdk.org; Li, Xiaoyun > Subject: [PATCH v2] net/i40e: adjust the RSS table >=20 > When starting the device, the RSS table is initialized. So the RSS update= before > device_start would be overwitten. This patch allows users to update the R= SS s/ overwitten /overwritten > reta table before device_start and adjusts the order to set entries seque= ntially. >=20 > Signed-off-by: Xiaoyun Li > --- > v2: > * Adds support to update RSS table before device_start. > * Simplify the codes with rte_bswap32. > * Polish the commit log. > --- > drivers/net/i40e/i40e_ethdev.c | 21 ++++++++++++++------- > drivers/net/i40e/i40e_ethdev.h | 3 +++ > 2 files changed, 17 insertions(+), 7 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 552a7a5..fea42b0 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -2444,6 +2444,8 @@ i40e_dev_stop(struct rte_eth_dev *dev) > pf->tm_conf.committed =3D false; >=20 > hw->adapter_stopped =3D 1; > + > + pf->adapter->is_rss_reta_update =3D 0; How about rename to rss_reta_updated? > } >=20 > static void > @@ -4255,6 +4257,8 @@ i40e_dev_rss_reta_update(struct rte_eth_dev *dev, > } > ret =3D i40e_set_rss_lut(pf->main_vsi, lut, reta_size); >=20 > + pf->adapter->is_rss_reta_update =3D 1; > + > out: > rte_free(lut); >=20 > @@ -8492,13 +8496,16 @@ 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; > - lut =3D (lut << 8) | (j & ((0x1 << > - hw->func_caps.rss_table_entry_width) - 1)); > - if ((i & 3) =3D=3D 3) > - I40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut); > + if (pf->adapter->is_rss_reta_update =3D=3D 0) { > + for (i =3D 0, j =3D 0; i < hw->func_caps.rss_table_size; i++, j++) { > + if (j =3D=3D num) > + j =3D 0; > + lut =3D (lut << 8) | (j & ((0x1 << > + hw->func_caps.rss_table_entry_width) - 1)); > + if ((i & 3) =3D=3D 3) > + I40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), > + rte_bswap32(lut)); > + } > } >=20 > rss_conf =3D pf->dev_data->dev_conf.rx_adv_conf.rss_conf; > diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethde= v.h > index 11ecfc3..854aada 100644 > --- a/drivers/net/i40e/i40e_ethdev.h > +++ b/drivers/net/i40e/i40e_ethdev.h > @@ -1081,6 +1081,9 @@ struct i40e_adapter { >=20 > /* For devargs */ > uint8_t use_latest_vec; > + > + /* For RSS reta table update */ > + uint8_t is_rss_reta_update; > }; >=20 > /** > -- > 2.7.4