All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ophir Munk <ophirmu@mellanox.com>
To: Shahaf Shuler <shahafs@mellanox.com>, Yongseok Koh <yskoh@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Asaf Penso <asafp@mellanox.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Olga Shern <olgas@mellanox.com>
Subject: Re: [PATCH] net/mlx5: set RSS key len 0 to indicate default RSS
Date: Mon, 29 Oct 2018 16:37:59 +0000	[thread overview]
Message-ID: <VI1PR0502MB374323F0FE19E545818CA2FBD1F30@VI1PR0502MB3743.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <DB7PR05MB44262A7CF560AFFBEB1A6204C3E50@DB7PR05MB4426.eurprd05.prod.outlook.com>

> -----Original Message-----
> From: Shahaf Shuler
> Sent: Sunday, October 07, 2018 2:21 PM
> To: Yongseok Koh <yskoh@mellanox.com>; Ophir Munk
> <ophirmu@mellanox.com>
> Cc: dev@dpdk.org; Asaf Penso <asafp@mellanox.com>; Thomas Monjalon
> <thomas@monjalon.net>; Olga Shern <olgas@mellanox.com>
> Subject: RE: [PATCH] net/mlx5: set RSS key len 0 to indicate default RSS
> 
> > > 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.
> 
> Can you refer where in the rte_flow API this is documented?  I couldn't find it
> under struct rte_flow_action_rss  definition.
> I agree it is better for the PMD to behave this way, but this should be
> explained in the API, so for this patch to be accepted we need also doc
> update in rte_flow.h.
> 

Will update documentation in v2

> In my opinion, it is better for the key to be NULL to request from the PMD to
> use the default key, similar to struct rte_eth_rss_conf.
> 

I suggest considering both (NULL key or key_len 0) as a criteria for using default RSS key.
In addition if type==0 it will be considered a default type and mlx5 will use ETH_RSS_IP
Will update in v2

> > > 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 {
> > >
> > > @@ -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);
> 
> In Mellanox devices 40B of a key is a must. If you intended to copy 0 bytes, it
> is better to do it in other ways.

rss->key_len can be 0 or 40. Please consider this memcpy() a generic code which fits both cases.

> 

  reply	other threads:[~2018-10-29 16:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 17:37 [PATCH] net/mlx5: set RSS key len 0 to indicate default RSS Ophir Munk
2018-10-03 18:56 ` Yongseok Koh
2018-10-07 11:21   ` Shahaf Shuler
2018-10-29 16:37     ` Ophir Munk [this message]
2018-10-29 16:26   ` Ophir Munk
2018-11-01  8:59 ` [PATCH v2] net/mlx5: set RSS key to NULL " Ophir Munk
2018-11-01 14:00   ` Shahaf Shuler
2018-11-02 17:54     ` FW: " Ophir Munk
2018-11-03 17:18     ` Ophir Munk
2018-11-03 15:48   ` [PATCH v3] " Ophir Munk
2018-11-03 17:39     ` [PATCH v4] " Ophir Munk
2018-11-04  6:28       ` Shahaf Shuler
2018-11-04 10:08         ` Ophir Munk
2018-11-04 12:10       ` [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=VI1PR0502MB374323F0FE19E545818CA2FBD1F30@VI1PR0502MB3743.eurprd05.prod.outlook.com \
    --to=ophirmu@mellanox.com \
    --cc=asafp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=olgas@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=thomas@monjalon.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.