DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Cc: dev@dpdk.org, Adrien Mazarguil <adrien.mazarguil@6wind.com>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: return RSS hash result in mbuf
Date: Tue, 27 Sep 2016 15:11:10 +0100	[thread overview]
Message-ID: <20160927141110.GC36420@bricha3-MOBL3> (raw)
In-Reply-To: <42701f77fcdb03c88ea845071c0710797cfaa549.1473840791.git.nelio.laranjeiro@6wind.com>

On Wed, Sep 14, 2016 at 10:16:05AM +0200, Nelio Laranjeiro wrote:
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
>  drivers/net/mlx5/mlx5_rxq.c  | 1 +
>  drivers/net/mlx5/mlx5_rxtx.c | 6 +++++-
>  drivers/net/mlx5/mlx5_rxtx.h | 2 ++
>  3 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> index f6f4315..65c264b 100644
> --- a/drivers/net/mlx5/mlx5_rxq.c
> +++ b/drivers/net/mlx5/mlx5_rxq.c
> @@ -926,6 +926,7 @@ rxq_ctrl_setup(struct rte_eth_dev *dev, struct rxq_ctrl *rxq_ctrl,
>  		.rxq = {
>  			.elts_n = log2above(desc),
>  			.mp = mp,
> +			.rss_hash = !!(priv->rxqs_n > 1),
>  		},

Two comments on this:
1. I don't think the !! is needed, since this is a comparison which will result
   in 0 or 1, rather than an int value that needs to be clamped to those values.
2. Why limit the use of RSS to when there is more than one RX queues? Sometimes
   it might be useful to have a precomputed hash for a packet even when not
   spreading packets among RX queues. For example, when using a single RX queue,
   but doing a hash table lookup for each packet, the RSS value could be used
   as the lookup hash.

/Bruce

  parent reply	other threads:[~2016-09-27 14:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-14  8:16 Nelio Laranjeiro
2016-09-14  8:16 ` Nelio Laranjeiro
2016-09-23  9:15   ` Adrien Mazarguil
2016-09-27 14:11   ` Bruce Richardson [this message]
2016-09-27 14:29     ` Nélio Laranjeiro
2016-09-27 14:53 ` [dpdk-dev] [PATCH v2] " Nelio Laranjeiro
2016-09-27 17:03   ` Ferruh Yigit
2016-09-28  7:01     ` Nélio Laranjeiro
2016-09-28  7:02 ` [dpdk-dev] [PATCH v3] " Nelio Laranjeiro
2016-09-28  8:59   ` Adrien Mazarguil
2016-09-28 12:11 ` [dpdk-dev] [PATCH v4] " Nelio Laranjeiro
2016-10-12 15:12   ` Bruce Richardson

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=20160927141110.GC36420@bricha3-MOBL3 \
    --to=bruce.richardson@intel.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=nelio.laranjeiro@6wind.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).