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 7D127A0597; Wed, 8 Apr 2020 08:47:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5B5691BF90; Wed, 8 Apr 2020 08:47:24 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id A0DBB1BF7B; Wed, 8 Apr 2020 08:47:22 +0200 (CEST) IronPort-SDR: 4QgTeEN69dsf3CyKhTsRqOcfGoyaqCINLUYEQyohWT1+V0Ka1bK2eYXe+8vR8nmq6qlEFnTHcY OI/COWNNV7hA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2020 23:47:21 -0700 IronPort-SDR: I1zU5IFHwTC5aW0OhYzjApjV9zaDgA5JZvfXBSsnOQPb6z7VFoETYLFCeANRkCjbPgoim5iifl I5hOX3YDw82A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,357,1580803200"; d="scan'208";a="451500349" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by fmsmga005.fm.intel.com with ESMTP; 07 Apr 2020 23:47:20 -0700 Date: Wed, 8 Apr 2020 14:43:35 +0800 From: Ye Xiaolong To: Junyu Jiang Cc: dev@dpdk.org, Qi Zhang , Qiming Yang , stable@dpdk.org Message-ID: <20200408064335.GD114503@intel.com> References: <20200319074825.16035-1-junyux.jiang@intel.com> <20200407014817.25163-1-junyux.jiang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200407014817.25163-1-junyux.jiang@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v5] net/ice: fix RSS advanced rule invalid issue 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" On 04/07, Junyu Jiang wrote: >This patch moved the RSS initialization from dev start to dev configure >to fix RSS advanced rule invalid after running port stop and port start. > >Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS") >Cc: stable@dpdk.org > >Signed-off-by: Junyu Jiang >--- > drivers/net/ice/ice_ethdev.c | 50 +++++++++++++++++++----------------- > 1 file changed, 26 insertions(+), 24 deletions(-) > >diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c >index 85ef83e92..90a91c9c1 100644 >--- a/drivers/net/ice/ice_ethdev.c >+++ b/drivers/net/ice/ice_ethdev.c >@@ -2446,24 +2446,6 @@ ice_dev_uninit(struct rte_eth_dev *dev) > return 0; > } > >-static int >-ice_dev_configure(struct rte_eth_dev *dev) >-{ >- struct ice_adapter *ad = >- ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); >- >- /* Initialize to TRUE. If any of Rx queues doesn't meet the >- * bulk allocation or vector Rx preconditions we will reset it. >- */ >- ad->rx_bulk_alloc_allowed = true; >- ad->tx_simple_allowed = true; >- >- if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) >- dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; >- >- return 0; >-} >- > static int ice_init_rss(struct ice_pf *pf) > { > struct ice_hw *hw = ICE_PF_TO_HW(pf); >@@ -2594,6 +2576,32 @@ static int ice_init_rss(struct ice_pf *pf) > return 0; > } > >+static int >+ice_dev_configure(struct rte_eth_dev *dev) >+{ >+ struct ice_adapter *ad = >+ ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); >+ struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private); >+ int ret; >+ >+ /* Initialize to TRUE. If any of Rx queues doesn't meet the >+ * bulk allocation or vector Rx preconditions we will reset it. >+ */ >+ ad->rx_bulk_alloc_allowed = true; >+ ad->tx_simple_allowed = true; >+ >+ if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) >+ dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; >+ >+ ret = ice_init_rss(pf); >+ if (ret) { >+ PMD_DRV_LOG(ERR, "Failed to enable rss for PF"); >+ return ret; >+ } >+ >+ return 0; >+} >+ > static void > __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect, > int base_queue, int nb_queue) >@@ -2797,12 +2805,6 @@ ice_dev_start(struct rte_eth_dev *dev) > } > } > >- ret = ice_init_rss(pf); >- if (ret) { >- PMD_DRV_LOG(ERR, "Failed to enable rss for PF"); >- goto rx_err; >- } >- > ice_set_rx_function(dev); > ice_set_tx_function(dev); > >-- >2.17.1 > Applied to dpdk-next-net-intel, Thanks.