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 CB638A0350; Tue, 23 Jun 2020 04:47:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F22871D5B2; Tue, 23 Jun 2020 04:47:15 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id E8DF21D5B1 for ; Tue, 23 Jun 2020 04:47:12 +0200 (CEST) IronPort-SDR: dZsl65uoI+Rfq7MeSWhHNODzOOP7oKqAl0PYfcGDcBPnWgbVZPGUTFY6q1RuOn3JKDAZQ0Ca0d 2JvzPrH9unXg== X-IronPort-AV: E=McAfee;i="6000,8403,9660"; a="123605637" X-IronPort-AV: E=Sophos;i="5.75,269,1589266800"; d="scan'208";a="123605637" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2020 19:47:11 -0700 IronPort-SDR: 95RsuRFhgusPeejBnP79bP/K19qoj1OpOJ948S44GAtHN3rkP/kiUxwBbzVJY+PuR5n8qD5JFT umy/cs6UtVBw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,269,1589266800"; d="scan'208";a="263171990" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga007.fm.intel.com with ESMTP; 22 Jun 2020 19:47:11 -0700 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jun 2020 19:47:11 -0700 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by SHSMSX603.ccr.corp.intel.com (10.109.6.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 23 Jun 2020 10:47:08 +0800 Received: from shsmsx603.ccr.corp.intel.com ([10.109.6.143]) by SHSMSX603.ccr.corp.intel.com ([10.109.6.143]) with mapi id 15.01.1713.004; Tue, 23 Jun 2020 10:47:08 +0800 From: "Jiang, JunyuX" To: "Zhang, Qi Z" , "dev@dpdk.org" CC: "Yang, Qiming" , "Su, Simei" Thread-Topic: [PATCH v2] net/ice: support based RSS configure Thread-Index: AQHWSFiemRyOLpIJsEWIEoBu6qTkiajkLj+AgAFQ0XA= Date: Tue, 23 Jun 2020 02:47:08 +0000 Message-ID: References: <20200610063355.35172-1-junyux.jiang@intel.com> <20200622053312.46719-1-junyux.jiang@intel.com> <039ED4275CED7440929022BC67E7061154842F8A@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E7061154842F8A@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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 v2] net/ice: support based RSS configure 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" Hi qi, > -----Original Message----- > From: Zhang, Qi Z > Sent: Monday, June 22, 2020 10:37 PM > To: Jiang, JunyuX ; dev@dpdk.org > Cc: Yang, Qiming ; Su, Simei > Subject: RE: [PATCH v2] net/ice: support based RSS configure >=20 >=20 >=20 > > -----Original Message----- > > From: Jiang, JunyuX > > Sent: Monday, June 22, 2020 1:33 PM > > To: dev@dpdk.org > > Cc: Yang, Qiming ; Zhang, Qi Z > > ; Su, Simei ; Jiang, JunyuX > > > > Subject: [PATCH v2] net/ice: support based RSS configure > The title is misleading, how about "initialize and update RSS based on us= er > request" >=20 > > > > Enable/disable RSS for corresponding flow base on the user's > > requirement >=20 > Initialize and update RSS configure based on user request (rte_eth_rss_co= nf) > from dev_configure and .rss_hash_update ops. > All previous default configure has been removed. > . Got it, it looks better. > > > > Signed-off-by: Junyu Jiang > > > > --- > > v1->v2: > > remove gtpu and pppoe/pppod configuration from rss init > > --- > > drivers/net/ice/ice_ethdev.c | 162 > > +++++++++++++++++++++-------------- > > 1 file changed, 96 insertions(+), 66 deletions(-) > > > > diff --git a/drivers/net/ice/ice_ethdev.c > > b/drivers/net/ice/ice_ethdev.c index 5a89a1955..cbe59a40e 100644 > > --- a/drivers/net/ice/ice_ethdev.c > > +++ b/drivers/net/ice/ice_ethdev.c > > @@ -2441,6 +2441,87 @@ ice_dev_uninit(struct rte_eth_dev *dev) > > return 0; > > } > > > > +static void > > +ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf) { > > + struct ice_hw *hw =3D ICE_PF_TO_HW(pf); > > + struct ice_vsi *vsi =3D pf->main_vsi; > > + int ret; > > + > > + /** > > + * configure RSS for IPv4 with input set IPv4 src/dst > > + * configure RSS for IPv6 with input set IPv6 src/dst >=20 > The comment looks redundant, please merge into one line. > /* Configure RSS for IP with src/dst address as input set */ >=20 Got it. > > + */ > > + if (rss_hf & ETH_RSS_IP) { >=20 > This is not correct, it is possible user only want IPv4 but not IPv6. >=20 > For ice, I think we can do like below >=20 > If (rss_hf & ETH_RSS_IPV4) { > Ice_add_rss_cfg (... ICE_FLOW_HASH_IPV4 ...) } If (rss_hf & > ETH_RSS_IPV6) { > Ice_add_rss_cfg (... ICE_FLOW_HASH_IPv6 ...) } We can just ignore > ETH_RSS_FRAG_IPV4 and ETH_RSS_NONFRAG_IPV4_OTHER and same for > UDP/TCP and SCTP. >=20 >=20 > > + ret =3D ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV4, > > + ICE_FLOW_SEG_HDR_IPV4, 0); >=20 > You need ICE_FLOW_SEG_HDR_IPV_OTHER, see patch > http://patchwork.dpdk.org/patch/71584/ >=20 Got it, same for UDP/TCP and SCTP. >=20 [...] > > /* set hash key */ > > @@ -3687,7 +3706,18 @@ ice_rss_hash_update(struct rte_eth_dev *dev, > > if (status) > > return status; > > > > - /* TODO: hash enable config, ice_add_rss_cfg */ > > + if (rss_conf->rss_hf =3D=3D 0) > > + return -EINVAL; > > + > > + status =3D ice_rem_vsi_rss_cfg(hw, vsi->idx); > > + if (status !=3D ICE_SUCCESS) { > > + PMD_DRV_LOG(ERR, "Failed to remove rss cfg!"); > > + return status; > > + } >=20 > No need to remove exist configure, > we just need to make sure all the configure from rss_hf has been applied. Got it. >=20 > > + > > + /* RSS hash configuration */ > > + ice_rss_hash_set(pf, rss_conf->rss_hf); > > + > > return 0; > > } > > > > -- > > 2.17.1