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 BB722A0522; Wed, 1 Jul 2020 14:15:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 56F421C1A0; Wed, 1 Jul 2020 14:15:10 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id DBA7D1C198; Wed, 1 Jul 2020 14:15:08 +0200 (CEST) IronPort-SDR: XOXNZM1GQgVNWJlUmE49/xhuErVpqR7Xcl7vuGqd6xkYU2PGtH6Uo+Vedb52dTUe+Xq2Aaol+P ANmI8eIQLjNg== X-IronPort-AV: E=McAfee;i="6000,8403,9668"; a="145629835" X-IronPort-AV: E=Sophos;i="5.75,300,1589266800"; d="scan'208";a="145629835" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2020 05:15:07 -0700 IronPort-SDR: r6g6cv68fcrGunTfxnmTV3nOrHy7ocmf+p7sCZT2canCXKQDxgJrpMb5SnlajfdO0gv9bgipn1 YXXiVIj2R28g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,300,1589266800"; d="scan'208";a="455084104" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga005.jf.intel.com with ESMTP; 01 Jul 2020 05:15:07 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 1 Jul 2020 05:15:07 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 1 Jul 2020 05:15:07 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 1 Jul 2020 05:15:06 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.89]) by shsmsx102.ccr.corp.intel.com ([169.254.2.36]) with mapi id 14.03.0439.000; Wed, 1 Jul 2020 20:15:03 +0800 From: "Zhang, Qi Z" To: "Yang, Qiming" , "Jiang, JunyuX" , "dev@dpdk.org" CC: "Wu, Jingjing" , "Xing, Beilei" , "stable@dpdk.org" Thread-Topic: [PATCH] net/iavf: fix RSS RETA settings invalid Thread-Index: AQHWT0zVn7n4pXwZp0aJxX4wu4Kq76jyo6sw Date: Wed, 1 Jul 2020 12:15:03 +0000 Message-ID: <039ED4275CED7440929022BC67E7061154849D27@SHSMSX103.ccr.corp.intel.com> References: <20200619074402.5663-1-junyux.jiang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 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/iavf: fix RSS RETA settings invalid 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" > -----Original Message----- > From: dev On Behalf Of Yang, Qiming > Sent: Wednesday, July 1, 2020 10:10 AM > To: Jiang, JunyuX ; dev@dpdk.org > Cc: Wu, Jingjing ; Xing, Beilei > ; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix RSS RETA settings invalid >=20 > > -----Original Message----- > > From: Jiang, JunyuX > > Sent: Friday, June 19, 2020 15:44 > > To: dev@dpdk.org > > Cc: Wu, Jingjing ; Xing, Beilei > > ; Yang, Qiming ; Jiang, > > JunyuX ; stable@dpdk.org > > Subject: [PATCH] net/iavf: fix RSS RETA settings invalid > > > > This patch moved the RSS initialization from dev start to dev > > configure, to fix the issue that RSS redirection table can not be kept = after > restarting port. > > > > Fixes: 69dd4c3d0898 ("net/avf: enable queue and device") > > Cc: stable@dpdk.org > > > > Signed-off-by: Junyu Jiang > > --- > > drivers/net/iavf/iavf_ethdev.c | 71 > > +++++++++++++++++----------------- > > 1 file changed, 35 insertions(+), 36 deletions(-) > > > > diff --git a/drivers/net/iavf/iavf_ethdev.c > > b/drivers/net/iavf/iavf_ethdev.c index 2b1066b0a..5e79a2d03 100644 > > --- a/drivers/net/iavf/iavf_ethdev.c > > +++ b/drivers/net/iavf/iavf_ethdev.c > > @@ -136,34 +136,6 @@ static const struct eth_dev_ops > iavf_eth_dev_ops > > =3D { > > .filter_ctrl =3D iavf_dev_filter_ctrl, > > }; > > > > -static int > > -iavf_dev_configure(struct rte_eth_dev *dev) -{ > > - struct iavf_adapter *ad =3D > > - IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); > > - struct iavf_info *vf =3D IAVF_DEV_PRIVATE_TO_VF(ad); > > - struct rte_eth_conf *dev_conf =3D &dev->data->dev_conf; > > - > > - ad->rx_bulk_alloc_allowed =3D true; > > - /* Initialize to TRUE. If any of Rx queues doesn't meet the > > - * vector Rx/Tx preconditions, it will be reset. > > - */ > > - ad->rx_vec_allowed =3D true; > > - ad->tx_vec_allowed =3D true; > > - > > - if (dev->data->dev_conf.rxmode.mq_mode & > > ETH_MQ_RX_RSS_FLAG) > > - dev->data->dev_conf.rxmode.offloads |=3D > > DEV_RX_OFFLOAD_RSS_HASH; > > - > > - /* Vlan stripping setting */ > > - if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) { > > - if (dev_conf->rxmode.offloads & > > DEV_RX_OFFLOAD_VLAN_STRIP) > > - iavf_enable_vlan_strip(ad); > > - else > > - iavf_disable_vlan_strip(ad); > > - } > > - return 0; > > -} > > - > > static int > > iavf_init_rss(struct iavf_adapter *adapter) { @@ -220,6 +192,41 @@ > > iavf_init_rss(struct iavf_adapter *adapter) > > return 0; > > } > > > > +static int > > +iavf_dev_configure(struct rte_eth_dev *dev) { > > + struct iavf_adapter *ad =3D > > + IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); > > + struct iavf_info *vf =3D IAVF_DEV_PRIVATE_TO_VF(ad); > > + struct rte_eth_conf *dev_conf =3D &dev->data->dev_conf; > > + > > + ad->rx_bulk_alloc_allowed =3D true; > > + /* Initialize to TRUE. If any of Rx queues doesn't meet the > > + * vector Rx/Tx preconditions, it will be reset. > > + */ > > + ad->rx_vec_allowed =3D true; > > + ad->tx_vec_allowed =3D true; > > + > > + if (dev->data->dev_conf.rxmode.mq_mode & > > ETH_MQ_RX_RSS_FLAG) > > + dev->data->dev_conf.rxmode.offloads |=3D > > DEV_RX_OFFLOAD_RSS_HASH; > > + > > + /* Vlan stripping setting */ > > + if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) { > > + if (dev_conf->rxmode.offloads & > > DEV_RX_OFFLOAD_VLAN_STRIP) > > + iavf_enable_vlan_strip(ad); > > + else > > + iavf_disable_vlan_strip(ad); > > + } > > + > > + if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) { > > + if (iavf_init_rss(ad) !=3D 0) { > > + PMD_DRV_LOG(ERR, "configure rss failed"); > > + return -1; > > + } > > + } > > + return 0; > > +} > > + > > static int > > iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq) { > > @@ - > > 440,13 +447,6 @@ iavf_dev_start(struct rte_eth_dev *dev) > > return -1; > > } > > > > - if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) { > > - if (iavf_init_rss(adapter) !=3D 0) { > > - PMD_DRV_LOG(ERR, "configure rss failed"); > > - goto err_rss; > > - } > > - } > > - > > if (iavf_configure_queues(adapter) !=3D 0) { > > PMD_DRV_LOG(ERR, "configure queues failed"); > > goto err_queue; > > @@ -475,7 +475,6 @@ iavf_dev_start(struct rte_eth_dev *dev) > > err_mac: > > iavf_add_del_all_mac_addr(adapter, false); > > err_queue: > > -err_rss: > > return -1; > > } > > > > -- > > 2.17.1 >=20 > Acked-by: Qiming Yang Applied dpdk-next-net-intel. Thanks Qi