DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Junyu Jiang <junyux.jiang@intel.com>
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,
	Qiming Yang <qiming.yang@intel.com>,
	stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v5] net/ice: fix RSS advanced rule invalid issue
Date: Wed, 8 Apr 2020 14:43:35 +0800	[thread overview]
Message-ID: <20200408064335.GD114503@intel.com> (raw)
In-Reply-To: <20200407014817.25163-1-junyux.jiang@intel.com>

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 <junyux.jiang@intel.com>
>---
> 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.

      parent reply	other threads:[~2020-04-08  6:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-19  7:48 [dpdk-dev] [PATCH] " Junyu Jiang
2020-03-26  2:00 ` Yang, Qiming
2020-03-26  6:35 ` [dpdk-dev] [PATCH v2] " Junyu Jiang
2020-03-26  6:57 ` Junyu Jiang
2020-03-26  8:57   ` Yang, Qiming
2020-04-01  6:29 ` [dpdk-dev] [PATCH v3] " Junyu Jiang
2020-04-01  8:26 ` [dpdk-dev] [PATCH v4] " Junyu Jiang
2020-04-01  9:03   ` Yang, Qiming
2020-04-02  2:53   ` He, Zhiwei
2020-04-07  1:48 ` [dpdk-dev] [PATCH v5] " Junyu Jiang
2020-04-07  2:18   ` He, Zhiwei
2020-04-07  5:13   ` Yang, Qiming
2020-04-08  6:43   ` Ye Xiaolong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200408064335.GD114503@intel.com \
    --to=xiaolong.ye@intel.com \
    --cc=dev@dpdk.org \
    --cc=junyux.jiang@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).