DPDK patches and discussions
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@nvidia.com>
To: Maxime Leroy <maxime.leroy@6wind.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	Raslan Darawsheh <rasland@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix rss reta is reset when device is started
Date: Tue, 15 Sep 2020 08:14:10 +0000	[thread overview]
Message-ID: <DM6PR12MB274881406BFFE143625A3A4DCF200@DM6PR12MB2748.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20200716104320.10582-1-maxime.leroy@6wind.com>

Hi,

> -----Original Message-----
> From: Maxime Leroy <maxime.leroy@6wind.com>
> Sent: Thursday, July 16, 2020 1:43 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Raslan Darawsheh <rasland@mellanox.com>
> Subject: [PATCH] net/mlx5: fix rss reta is reset when device is started
> 
> The following sequences was working fine on mlx5:
>    rte_eth_dev_configure(portid, ...);
> 
>    for (queueid = 0; queueid < nb_txq; queueid++)
>       rte_eth_tx_queue_setup(portid, queueid, ...);
> 
>    for (queueid = 0; queueid < nb_rxq; queueid++)
>       rte_eth_rx_queue_setup(portid, queueid, ...);
> 
>   // use a custom reta configuration
>   rte_eth_dev_rss_reta_update(portid, reta_conf, reta_size);
>   rte_eth_dev_start(portid);
> 
> We were able to configure a custom reta before starting the port.
> 
> The commit "net/mlx5: support RSS on hairpin" breaks this logic by
> moving the code initializing the RSS reta from rte_eth_dev_configure
> into rte_eth_dev_start.
> 
> To fix the issue, the skip_default_rss_reta is always set to 1 in
> rte_eth_dev_rss_reta to avoid reconfigure the rss reta when the device
> is started.
> 
> Fixes: 63bd16292c3a ("net/mlx5: support RSS on hairpin")
> Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
> ---
>  drivers/net/mlx5/mlx5_rss.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c
> index 653b0691..6f75ece2 100644
> --- a/drivers/net/mlx5/mlx5_rss.c
> +++ b/drivers/net/mlx5/mlx5_rss.c
> @@ -220,9 +220,11 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev
> *dev,
>  		MLX5_ASSERT(reta_conf[idx].reta[pos] < priv->rxqs_n);
>  		(*priv->reta_idx)[i] = reta_conf[idx].reta[pos];
>  	}
> +
> +	priv->skip_default_rss_reta = 1;
> +
>  	if (dev->data->dev_started) {
>  		mlx5_dev_stop(dev);
> -		priv->skip_default_rss_reta = 1;
>  		return mlx5_dev_start(dev);
>  	}
>  	return 0;
> --
> 2.27.0

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

      parent reply	other threads:[~2020-09-15  8:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 10:43 Maxime Leroy
2020-09-10 11:23 ` Maxime Leroy
2020-09-10 12:17   ` Ori Kam
2020-09-15  8:14 ` Raslan Darawsheh [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=DM6PR12MB274881406BFFE143625A3A4DCF200@DM6PR12MB2748.namprd12.prod.outlook.com \
    --to=rasland@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=maxime.leroy@6wind.com \
    --cc=rasland@mellanox.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).