DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ophir Munk <ophirmu@mellanox.com>
To: Shahaf Shuler <shahafs@mellanox.com>,
	Yongseok Koh <yskoh@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Asaf Penso <asafp@mellanox.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Olga Shern <olgas@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH v4] net/mlx5: set RSS key to NULL to indicate default RSS
Date: Sun, 4 Nov 2018 10:08:31 +0000	[thread overview]
Message-ID: <VI1PR0502MB3743013A8C2A5C51D30F721DD1C90@VI1PR0502MB3743.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <DB7PR05MB44261DE17FA8097EA6AE09F5C3C90@DB7PR05MB4426.eurprd05.prod.outlook.com>


> -----Original Message-----
> From: Shahaf Shuler
> Sent: Sunday, November 04, 2018 8:29 AM
> To: Ophir Munk <ophirmu@mellanox.com>; Yongseok Koh
> <yskoh@mellanox.com>; dev@dpdk.org
> Cc: Asaf Penso <asafp@mellanox.com>; Thomas Monjalon
> <thomas@monjalon.net>; Olga Shern <olgas@mellanox.com>
> Subject: RE: [PATCH v4] net/mlx5: set RSS key to NULL to indicate default
> RSS
> 
> Hi Ophir,
> 
> Saturday, November 3, 2018 7:40 PM, Ophir Munk
> > Subject: [PATCH v4] net/mlx5: set RSS key to NULL to indicate default
> > RSS
> >
> > Applications which add RSS rules must supply an RSS key and length.
> > If an application is only interested in default RSS operation it
> > should not care about the exact RSS key.
> > By setting the key to NULL - the PMD will use the default RSS key.
> > In addition if the application does not care about the RSS type it can
> > set it to 0 and the PMD will use the default type (ETH_RSS_IP).
> >
> > Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> > ---
> > v1:
> > Initial release
> >
> > v2, v3:
> > Rebase + following code review
> >
> > v4:
> > Avoid sgementation faulut by not allowing in cation validation
> > key=NULL ane
> > key_len!=0 See https://patches.dpdk.org/patch/47645/
> >
> >
> >  doc/guides/nics/mlx5.rst           |  1 +
> >  drivers/net/mlx5/mlx5_flow.c       |  8 +++++++-
> >  drivers/net/mlx5/mlx5_flow_dv.c    |  7 +++++--
> >  drivers/net/mlx5/mlx5_flow_verbs.c |  8 ++++++--
> >  drivers/net/mlx5/mlx5_rxq.c        | 18 ++++--------------
> >  5 files changed, 23 insertions(+), 19 deletions(-)
> >
> > diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index
> > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> > b/drivers/net/mlx5/mlx5_flow_dv.c index c11ecd4..cdf3377 100644
> > --- a/drivers/net/mlx5/mlx5_flow_dv.c
> > +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> > @@ -1758,8 +1758,11 @@
> >  			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);
> > -		flow->rss.types = rss->types;
> > +		/* NULL RSS key indicates default RSS key. */
> > +		rss_key = !rss->key ? rss_hash_default_key : rss->key;
> 
> Getting compilation error:
> error: 'rss_key' undeclared (first use in this function)
>    rss_key = !rss->key ? rss_hash_default_key : rss->key;
> 
> please address.

Most of the code in file mlx5_flow_dv.c is under #ifdef HAVE_IBV_FLOW_DV_SUPPORT
In my case this macro is not defined so most of the code is not compiled...
Please note mlx5 Makefile:

$Q sh -- '$<' '$@' \
      HAVE_IBV_FLOW_DV_SUPPORT \
      infiniband/mlx5dv.h \
      func mlx5dv_create_flow_action_packet_reformat \
      $(AUTOCONF_OUTPUT)
 
I will issue v5 with a fix

> Other than that, no more comments. You can put my ack when on the next
> version.
> 
> 
> > +		memcpy(flow->key, rss_key, MLX5_RSS_HASH_KEY_LEN);

  reply	other threads:[~2018-11-04 10:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 17:37 [dpdk-dev] [PATCH] net/mlx5: set RSS key len 0 " Ophir Munk
2018-10-03 18:56 ` Yongseok Koh
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 [this message]
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=VI1PR0502MB3743013A8C2A5C51D30F721DD1C90@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 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).