DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>
To: Allain Legacy <allain.legacy@windriver.com>
Cc: adrien.mazarguil@6wind.com, yskoh@mellanox.com, dev@dpdk.org,
	matt.peters@windriver.com
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: setup RSS regardless of queue count
Date: Tue, 20 Mar 2018 13:26:08 +0100	[thread overview]
Message-ID: <20180320122608.6noglggdsojbtqsx@laranjeiro-vm.dev.6wind.com> (raw)
In-Reply-To: <20180319163007.11516-1-allain.legacy@windriver.com>

On Mon, Mar 19, 2018 at 11:30:07AM -0500, Allain Legacy wrote:
> From: Dahir Osman <dahir.osman@windriver.com>
> 
> In some environments it is desirable to have the NIC perform RSS
> normally on the packet regardless of the number of queues configured.
> The RSS hash result that is stored in the mbuf can then be used by
> the application to make decisions about how to distribute workloads
> to threads, secondary processes, or even virtual machines if the
> application is a virtual switch.  This change to the mlx5 driver
> aligns with how other drivers in the Intel family work.
> 
> Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
> ---
>  drivers/net/mlx5/mlx5_rxq.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> index ff58c4921..e6b05b0ad 100644
> --- a/drivers/net/mlx5/mlx5_rxq.c
> +++ b/drivers/net/mlx5/mlx5_rxq.c
> @@ -1028,7 +1028,8 @@ mlx5_priv_rxq_new(struct priv *priv, uint16_t idx, uint16_t desc,
>  	      tmpl->rxq.crc_present ? "disabled" : "enabled",
>  	      tmpl->rxq.crc_present << 2);
>  	/* Save port ID. */
> -	tmpl->rxq.rss_hash = priv->rxqs_n > 1;
> +	tmpl->rxq.rss_hash = (!!(dev->data->dev_conf.rxmode.mq_mode &
> +				 ETH_MQ_RX_RSS));
>  	tmpl->rxq.port_id = dev->data->port_id;
>  	tmpl->priv = priv;
>  	tmpl->rxq.mp = mp;
> -- 
> 2.12.1

Unfortunately, is not enough to have a valid RSS hash result when the
PMD has a single Rx queue, a little more work needs to be handled in the
mlx5_flow.c engine to configure the hash field in Verbs Hash Rx queues
when a single queues is being used.

Thanks,

-- 
Nélio Laranjeiro
6WIND

  reply	other threads:[~2018-03-20 12:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19 16:30 Allain Legacy
2018-03-20 12:26 ` Nélio Laranjeiro [this message]
2018-03-20 13:10   ` Legacy, Allain
2018-03-20 23:07   ` Yongseok Koh
2018-03-21  8:33     ` Nélio Laranjeiro
2018-03-21 12:43       ` Legacy, Allain
2018-03-21 12:47 ` [dpdk-dev] [PATCH v2] " Nelio Laranjeiro
2018-03-21 12:54   ` Nélio Laranjeiro
2018-03-22 23:37   ` Yongseok Koh
2018-03-23 12:15     ` Legacy, Allain
2018-03-26 18:09     ` Legacy, Allain
2018-03-27 16:53       ` Shahaf Shuler

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=20180320122608.6noglggdsojbtqsx@laranjeiro-vm.dev.6wind.com \
    --to=nelio.laranjeiro@6wind.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=allain.legacy@windriver.com \
    --cc=dev@dpdk.org \
    --cc=matt.peters@windriver.com \
    --cc=yskoh@mellanox.com \
    /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).