DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xueming(Steven) Li" <xuemingl@mellanox.com>
To: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>,
	Nelio Laranjeiro <notifications@github.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3 2/2] app/testpmd: only config supported RSS hash types
Date: Thu, 19 Apr 2018 15:50:39 +0000	[thread overview]
Message-ID: <DB5PR05MB1671C2BEF5591DE12BDDD002ACB50@DB5PR05MB1671.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20180418143008.GR4957@6wind.com>



> -----Original Message-----
> From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> Sent: Wednesday, April 18, 2018 10:30 PM
> To: Xueming(Steven) Li <xuemingl@mellanox.com>
> Cc: Shahaf Shuler <shahafs@mellanox.com>; Nelio Laranjeiro <notifications@github.com>; Wenzhuo Lu
> <wenzhuo.lu@intel.com>; Jingjing Wu <jingjing.wu@intel.com>; Thomas Monjalon <thomas@monjalon.net>;
> dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3 2/2] app/testpmd: only config supported RSS hash types
> 
> On Wed, Apr 18, 2018 at 02:10:45PM +0000, Xueming(Steven) Li wrote:
> >
> >
> > > -----Original Message-----
> > > From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> > > Sent: Wednesday, April 18, 2018 9:26 PM
> > > To: Xueming(Steven) Li <xuemingl@mellanox.com>
> > > Cc: Shahaf Shuler <shahafs@mellanox.com>; Nelio Laranjeiro
> > > <notifications@github.com>; Wenzhuo Lu <wenzhuo.lu@intel.com>;
> > > Jingjing Wu <jingjing.wu@intel.com>; Thomas Monjalon
> > > <thomas@monjalon.net>; dev@dpdk.org
> > > Subject: Re: [dpdk-dev] [PATCH v3 2/2] app/testpmd: only config
> > > supported RSS hash types
> > >
> > > Hi Xueming,
> > >
> > > On Wed, Apr 18, 2018 at 07:06:48PM +0800, Xueming Li wrote:
> > > > "port config all rss all" command will fail on PMD that not
> > > > support any of hard coding RSS hash types. This patch changed hard
> > > > coding hash types to supported types retrieved from device info.
> > > >
> > > > Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> > >
> > > Problem is that this patch removes the ability to request "all" RSS types regardless of PMD
> support.
> > >
> > > Users will expect "all" to behave as documented, however doing so
> > > will only result in the limited set of types reported by PMDs. For
> > > instance at least
> > > mlx4 doesn't update the flow_type_rss_offloads field since it has
> > > never implemented configuration support for the legacy RSS API.
> >
> > Keeping it "all" as it is will result in error for PMDs not completely
> > support "all" RSS types and this always confuse people.
> 
> You're redefining the commonly accepted meaning of "all". The first instance of "all" in the "port
> config all rss all" command means "all ports", not "only ports that happen to implement the RSS
> configuration callback". Same for all other testpmd commands accepting "all" as a parameter anywhere.
> 
> Those that don't will return errors, it's fine.
> 
> > How about adding a check, if flow_type_rss_offloads not set, ignore and set default RSS "all" types?
> 
> Results would be even less predictable. Keep it simple. Testpmd is a testing tool, if PMD developers
> want to check error-spitting abilities of their PMDs, they must be able to. Adding a dedicated
> parameter is one way to satisfy everyone, dropping this patch is another.

Okay, v4 version sent by adding "default" parameter, thanks.

> 
> > > You should add an argument with a different name (e.g. "supported"
> > > or
> > > "default") for that and keep the original meaning for "all".
> > >
> > > Testpmd documentation has to be updated accordingly.
> > >
> > > One more nit below.
> > >
> > > > ---
> > > >  app/test-pmd/cmdline.c | 7 +++++++
> > > >  1 file changed, 7 insertions(+)
> > > >
> > > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> > > > 512e3b55e..d357de7e6 100644
> > > > --- a/app/test-pmd/cmdline.c
> > > > +++ b/app/test-pmd/cmdline.c
> > > > @@ -1998,6 +1998,7 @@ cmd_config_rss_parsed(void *parsed_result,  {
> > > >  	struct cmd_config_rss *res = parsed_result;
> > > >  	struct rte_eth_rss_conf rss_conf = { .rss_key_len = 0, };
> > > > +	struct rte_eth_dev_info dev_info = {0};
> > >
> > > This could be declared in the new block where it's used. Also note
> > > that "{0}" is nonstandard syntax, use memset() or initialize a field like rss_key_len above.
> > >
> > > >  	int diag;
> > > >  	uint8_t i;
> > > >
> > > > @@ -2034,6 +2035,12 @@ cmd_config_rss_parsed(void *parsed_result,
> > > >  	}
> > > >  	rss_conf.rss_key = NULL;
> > > >  	for (i = 0; i < rte_eth_dev_count(); i++) {
> > > > +		if (!strcmp(res->value, "all")) {
> > > > +			rte_eth_dev_info_get(i, &dev_info);
> > > > +			if (dev_info.flow_type_rss_offloads)
> > > > +				rss_conf.rss_hf =
> > > > +					dev_info.flow_type_rss_offloads;
> > > > +		}
> > > >  		diag = rte_eth_dev_rss_hash_update(i, &rss_conf);
> > > >  		if (diag < 0)
> > > >  			printf("Configuration of RSS hash at ethernet port %d "
> > > > --
> > > > 2.13.3
> > > >
> > >
> > >
> > > --
> > > Adrien Mazarguil
> > > 6WIND
> 
> --
> Adrien Mazarguil
> 6WIND

  reply	other threads:[~2018-04-19 15:50 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-18  7:37 [dpdk-dev] [PATCH] net/mlx5: add supported hash function check Xueming Li
2018-03-19  8:29 ` Nélio Laranjeiro
2018-03-22 10:42   ` Xueming(Steven) Li
2018-03-26 11:39     ` Nélio Laranjeiro
2018-04-02 12:41       ` Xueming(Steven) Li
2018-04-04  7:35         ` Nélio Laranjeiro
2018-04-09 12:10 ` [dpdk-dev] [PATCH v1 1/2] ethdev: " Xueming Li
2018-04-16 22:56   ` Thomas Monjalon
2018-04-17 14:24   ` [dpdk-dev] [PATCH v2 " Xueming Li
2018-04-17 22:00     ` Thomas Monjalon
2018-04-18 11:55       ` Xueming(Steven) Li
2018-04-18 12:15         ` Thomas Monjalon
2018-04-17 14:24   ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: only config supported RSS hash types Xueming Li
2018-04-18  8:11   ` [dpdk-dev] [PATCH v3 1/2] ethdev: add supported hash function check Xueming Li
2018-04-18  8:11   ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: only config supported RSS hash types Xueming Li
2018-04-18 11:06   ` [dpdk-dev] [PATCH v3 1/2] ethdev: add supported hash function check Xueming Li
2018-04-18 11:06   ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: only config supported RSS hash types Xueming Li
2018-04-18 13:25     ` Adrien Mazarguil
2018-04-18 13:54       ` Xueming(Steven) Li
2018-04-18 14:16         ` Adrien Mazarguil
2018-04-18 14:26           ` Xueming(Steven) Li
2018-04-18 14:47             ` Adrien Mazarguil
2018-04-18 14:10       ` Xueming(Steven) Li
2018-04-18 14:30         ` Adrien Mazarguil
2018-04-19 15:50           ` Xueming(Steven) Li [this message]
2018-04-19 15:48   ` [dpdk-dev] [PATCH v4 1/2] ethdev: add supported hash function check Xueming Li
2018-04-20  8:10     ` Adrien Mazarguil
2018-04-19 15:48   ` [dpdk-dev] [PATCH v4 2/2] app/testpmd: new parameter for port config all rss command Xueming Li
2018-04-20  8:10     ` Adrien Mazarguil
2018-04-20 13:06   ` [dpdk-dev] [PATCH v5 1/2] ethdev: introduce generic IP/UDP tunnel checksum and TSO Xueming Li
2018-04-20 13:48     ` Ferruh Yigit
2018-04-20 14:23       ` Ferruh Yigit
2018-04-20 14:23       ` Xueming(Steven) Li
2018-04-20 13:06   ` [dpdk-dev] [PATCH v5 2/2] app/testpmd: testpmd support Tx generic tunnel offloads Xueming Li
2018-04-20 14:29     ` Xueming(Steven) Li
2018-04-20 14:30   ` [dpdk-dev] [PATCH v5 1/2] ethdev: add supported hash function check Xueming Li
2018-04-20 14:35     ` Ferruh Yigit
2018-04-20 14:44       ` Xueming(Steven) Li
2018-04-23 15:20     ` Thomas Monjalon
2018-04-23 16:07       ` Ferruh Yigit
2018-04-23 16:06     ` Ferruh Yigit
2018-04-23 18:14       ` Thomas Monjalon
2018-05-01 11:04         ` Ferruh Yigit
2018-05-01 14:04           ` Thomas Monjalon
2018-04-20 14:30   ` [dpdk-dev] [PATCH v5 2/2] app/testpmd: new parameter for port config all rss command Xueming Li
2018-04-09 12:10 ` [dpdk-dev] [PATCH v1 2/2] app/testpmd: config all supported RSS functions Xueming Li
2018-04-16 22:53   ` Thomas Monjalon

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=DB5PR05MB1671C2BEF5591DE12BDDD002ACB50@DB5PR05MB1671.eurprd05.prod.outlook.com \
    --to=xuemingl@mellanox.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=notifications@github.com \
    --cc=shahafs@mellanox.com \
    --cc=thomas@monjalon.net \
    --cc=wenzhuo.lu@intel.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).