DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yongseok Koh <yskoh@mellanox.com>
To: Ophir Munk <ophirmu@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Asaf Penso <asafp@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Olga Shern <olgas@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: set RSS key len 0 to indicate default RSS
Date: Wed, 3 Oct 2018 18:56:23 +0000	[thread overview]
Message-ID: <E8F85E0F-171F-4300-8898-C99CE4CA89C5@mellanox.com> (raw)
In-Reply-To: <1538588246-21436-1-git-send-email-ophirmu@mellanox.com>


> On Oct 3, 2018, at 10:37 AM, Ophir Munk <ophirmu@mellanox.com> wrote:
> 
> Applications which add an RSS flow must supply an RSS key table and an
> RSS key length. If an application needs to add the default RSS flow it
> should not care about the exact RSS default key table and its length.
> By setting key length to 0 - the PMD will know that it should use the
> default RSS key table and length.
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_flow.c | 7 ++++---

Please rebase the code on top of the latest dpdk-next-net-mlx.
Actually, it is better to rebase on top of PR#878.

Thanks,
Yongseok

> 1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 3f548a9..18eacf5 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -2062,7 +2062,8 @@ struct mlx5_flow_tunnel_info {
> 					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
> 					  &rss->level,
> 					  "tunnel RSS is not supported");
> -	if (rss->key_len < MLX5_RSS_HASH_KEY_LEN)
> +	/* key_len 0 means using default RSS key */
> +	if (rss->key_len > 0 && rss->key_len < MLX5_RSS_HASH_KEY_LEN)
> 		return rte_flow_error_set(error, ENOTSUP,
> 					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
> 					  &rss->key_len,
> @@ -2106,7 +2107,7 @@ struct mlx5_flow_tunnel_info {
> 		memcpy((*flow->queue), rss->queue,
> 		       rss->queue_num * sizeof(uint16_t));
> 	flow->rss.queue_num = rss->queue_num;
> -	memcpy(flow->key, rss->key, MLX5_RSS_HASH_KEY_LEN);
> +	memcpy(flow->key, rss->key, rss->key_len);
> 	flow->rss.types = rss->types;
> 	flow->rss.level = rss->level;
> 	flow->fate |= MLX5_FLOW_FATE_RSS;
> @@ -2948,7 +2949,7 @@ struct mlx5_flow_tunnel_info {
> 					     flow->rss.queue_num);
> 			if (!hrxq)
> 				hrxq = mlx5_hrxq_new(dev, flow->key,
> -						     MLX5_RSS_HASH_KEY_LEN,
> +						     flow->rss.key_len,
> 						     verbs->hash_fields,
> 						     (*flow->queue),
> 						     flow->rss.queue_num,
> -- 
> 1.8.3.1
> 

  reply	other threads:[~2018-10-03 18:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 17:37 Ophir Munk
2018-10-03 18:56 ` Yongseok Koh [this message]
2018-10-07 11:21   ` Shahaf Shuler
2018-10-29 16:37     ` Ophir Munk
2018-10-29 16:26   ` Ophir Munk
2018-11-01  8:59 ` [dpdk-dev] [PATCH v2] net/mlx5: set RSS key to NULL " Ophir Munk
2018-11-01 14:00   ` Shahaf Shuler
2018-11-02 17:54     ` [dpdk-dev] FW: " Ophir Munk
2018-11-03 17:18     ` [dpdk-dev] " Ophir Munk
2018-11-03 15:48   ` [dpdk-dev] [PATCH v3] " Ophir Munk
2018-11-03 17:39     ` [dpdk-dev] [PATCH v4] " Ophir Munk
2018-11-04  6:28       ` Shahaf Shuler
2018-11-04 10:08         ` Ophir Munk
2018-11-04 12:10       ` [dpdk-dev] [PATCH v5] " Ophir Munk
2018-11-04 13:43         ` 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=E8F85E0F-171F-4300-8898-C99CE4CA89C5@mellanox.com \
    --to=yskoh@mellanox.com \
    --cc=asafp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=olgas@mellanox.com \
    --cc=ophirmu@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=thomas@monjalon.net \
    /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).