DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] app/testpmd: set default RSS key as NULL
@ 2018-11-03 15:54 Ophir Munk
  2018-11-05 13:31 ` Ferruh Yigit
  2018-11-14  5:24 ` Zhao1, Wei
  0 siblings, 2 replies; 5+ messages in thread
From: Ophir Munk @ 2018-11-03 15:54 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger, dev
  Cc: Asaf Penso, Shahaf Shuler, Thomas Monjalon, Olga Shern,
	Ophir Munk, Yongseok Koh

When creating an RSS rule without specifying a key (see [1]) it is
expected that the device will use the default key.
A NULL key is uded to indicate to a PMD it should use
its default key, however testpmd assigns a non-NULL dummy key
(see [2]) instead.
This does not enable testing any PMD behavior when the RSS key is not
specified. This commit fixes this limitation by setting key to NULL.

[1]
RSS rule example without specifying a key:
flow create 0 ingress <pattern> / end actions rss queues 0 1 end / end
[2]
Testpmd default key assignment:
.key= "testpmd's default RSS hash key, "
"override it for better balancing"

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
v1: Initial version

 app/test-pmd/cmdline_flow.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 23ea7cc..91e2e35 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3248,26 +3248,15 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
 			.func = RTE_ETH_HASH_FUNCTION_DEFAULT,
 			.level = 0,
 			.types = rss_hf,
-			.key_len = sizeof(action_rss_data->key),
+			.key_len = 0,
 			.queue_num = RTE_MIN(nb_rxq, ACTION_RSS_QUEUE_NUM),
-			.key = action_rss_data->key,
+			.key = NULL,
 			.queue = action_rss_data->queue,
 		},
-		.key = "testpmd's default RSS hash key, "
-			"override it for better balancing",
 		.queue = { 0 },
 	};
 	for (i = 0; i < action_rss_data->conf.queue_num; ++i)
 		action_rss_data->queue[i] = i;
-	if (!port_id_is_invalid(ctx->port, DISABLED_WARN) &&
-	    ctx->port != (portid_t)RTE_PORT_ALL) {
-		struct rte_eth_dev_info info;
-
-		rte_eth_dev_info_get(ctx->port, &info);
-		action_rss_data->conf.key_len =
-			RTE_MIN(sizeof(action_rss_data->key),
-				info.hash_key_size);
-	}
 	action->conf = &action_rss_data->conf;
 	return ret;
 }
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v1] app/testpmd: set default RSS key as NULL
  2018-11-03 15:54 [dpdk-dev] [PATCH v1] app/testpmd: set default RSS key as NULL Ophir Munk
@ 2018-11-05 13:31 ` Ferruh Yigit
  2018-11-14  5:24 ` Zhao1, Wei
  1 sibling, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2018-11-05 13:31 UTC (permalink / raw)
  To: Ophir Munk, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger, dev
  Cc: Asaf Penso, Shahaf Shuler, Thomas Monjalon, Olga Shern, Yongseok Koh

On 11/3/2018 3:54 PM, Ophir Munk wrote:
> When creating an RSS rule without specifying a key (see [1]) it is
> expected that the device will use the default key.
> A NULL key is uded to indicate to a PMD it should use
> its default key, however testpmd assigns a non-NULL dummy key
> (see [2]) instead.
> This does not enable testing any PMD behavior when the RSS key is not
> specified. This commit fixes this limitation by setting key to NULL.
> 
> [1]
> RSS rule example without specifying a key:
> flow create 0 ingress <pattern> / end actions rss queues 0 1 end / end
> [2]
> Testpmd default key assignment:
> .key= "testpmd's default RSS hash key, "
> "override it for better balancing"
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v1] app/testpmd: set default RSS key as NULL
  2018-11-03 15:54 [dpdk-dev] [PATCH v1] app/testpmd: set default RSS key as NULL Ophir Munk
  2018-11-05 13:31 ` Ferruh Yigit
@ 2018-11-14  5:24 ` Zhao1, Wei
  2018-11-14  9:20   ` Ophir Munk
  1 sibling, 1 reply; 5+ messages in thread
From: Zhao1, Wei @ 2018-11-14  5:24 UTC (permalink / raw)
  To: Ophir Munk, Lu, Wenzhuo, Wu, Jingjing, Iremonger, Bernard, dev,
	Peng, Yuan
  Cc: Asaf Penso, Shahaf Shuler, Thomas Monjalon, Olga Shern, Yongseok Koh

Hi, Ophir Munk

	Peng yuan has find this problem with patch , if you  use the following test step, You will find the problem.
She is using i40e nic.

./x86_64-native-linuxapp-gcc/app/testpmd -c 1ffff -n 4 - -i --nb-cores=8 --rxq=4 --txq=4 --port-topology=chained ...............
testpmd> start
testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp  end key 67108863 / end
 Segmentation fault (core dumped)


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ophir Munk
> Sent: Saturday, November 3, 2018 11:55 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Iremonger, Bernard
> <bernard.iremonger@intel.com>; dev@dpdk.org
> Cc: Asaf Penso <asafp@mellanox.com>; Shahaf Shuler
> <shahafs@mellanox.com>; Thomas Monjalon <thomas@monjalon.net>;
> Olga Shern <olgas@mellanox.com>; Ophir Munk <ophirmu@mellanox.com>;
> Yongseok Koh <yskoh@mellanox.com>
> Subject: [dpdk-dev] [PATCH v1] app/testpmd: set default RSS key as NULL
> 
> When creating an RSS rule without specifying a key (see [1]) it is expected
> that the device will use the default key.
> A NULL key is uded to indicate to a PMD it should use its default key,
> however testpmd assigns a non-NULL dummy key (see [2]) instead.
> This does not enable testing any PMD behavior when the RSS key is not
> specified. This commit fixes this limitation by setting key to NULL.
> 
> [1]
> RSS rule example without specifying a key:
> flow create 0 ingress <pattern> / end actions rss queues 0 1 end / end [2]
> Testpmd default key assignment:
> .key= "testpmd's default RSS hash key, "
> "override it for better balancing"
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> ---
> v1: Initial version
> 
>  app/test-pmd/cmdline_flow.c | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
> 
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index 23ea7cc..91e2e35 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -3248,26 +3248,15 @@ static int comp_vc_action_rss_queue(struct
> context *, const struct token *,
>  			.func = RTE_ETH_HASH_FUNCTION_DEFAULT,
>  			.level = 0,
>  			.types = rss_hf,
> -			.key_len = sizeof(action_rss_data->key),
> +			.key_len = 0,
>  			.queue_num = RTE_MIN(nb_rxq,
> ACTION_RSS_QUEUE_NUM),
> -			.key = action_rss_data->key,
> +			.key = NULL,
>  			.queue = action_rss_data->queue,
>  		},
> -		.key = "testpmd's default RSS hash key, "
> -			"override it for better balancing",
>  		.queue = { 0 },
>  	};
>  	for (i = 0; i < action_rss_data->conf.queue_num; ++i)
>  		action_rss_data->queue[i] = i;
> -	if (!port_id_is_invalid(ctx->port, DISABLED_WARN) &&
> -	    ctx->port != (portid_t)RTE_PORT_ALL) {
> -		struct rte_eth_dev_info info;
> -
> -		rte_eth_dev_info_get(ctx->port, &info);
> -		action_rss_data->conf.key_len =
> -			RTE_MIN(sizeof(action_rss_data->key),
> -				info.hash_key_size);
> -	}
>  	action->conf = &action_rss_data->conf;
>  	return ret;
>  }
> --
> 1.8.3.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v1] app/testpmd: set default RSS key as NULL
  2018-11-14  5:24 ` Zhao1, Wei
@ 2018-11-14  9:20   ` Ophir Munk
  2018-11-14  9:57     ` Zhao1, Wei
  0 siblings, 1 reply; 5+ messages in thread
From: Ophir Munk @ 2018-11-14  9:20 UTC (permalink / raw)
  To: Zhao1, Wei, Lu, Wenzhuo, Wu, Jingjing, Iremonger, Bernard, dev,
	Peng, Yuan
  Cc: Asaf Penso, Shahaf Shuler, Thomas Monjalon, Olga Shern, Yongseok Koh

Hi Zhao,
The patch which causes your crash is already reverted (see [1]). 
You can find it with head of next-net or in RC3 (once it is issued).
Please re-test your case after applying the reverting patch.

Regards,
Ophir

[1]
Commit 8773db152033 ("app/testpmd: revert setting default RSS")

> -----Original Message-----
> From: Zhao1, Wei [mailto:wei.zhao1@intel.com]
> Sent: Wednesday, November 14, 2018 7:25 AM
> To: Ophir Munk <ophirmu@mellanox.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Iremonger,
> Bernard <bernard.iremonger@intel.com>; dev@dpdk.org; Peng, Yuan
> <yuan.peng@intel.com>
> Cc: Asaf Penso <asafp@mellanox.com>; Shahaf Shuler
> <shahafs@mellanox.com>; Thomas Monjalon <thomas@monjalon.net>;
> Olga Shern <olgas@mellanox.com>; Yongseok Koh <yskoh@mellanox.com>
> Subject: RE: [PATCH v1] app/testpmd: set default RSS key as NULL
> 
> Hi, Ophir Munk
> 
> 	Peng yuan has find this problem with patch , if you  use the following
> test step, You will find the problem.
> She is using i40e nic.
> 
> ./x86_64-native-linuxapp-gcc/app/testpmd -c 1ffff -n 4 - -i --nb-cores=8 --
> rxq=4 --txq=4 --port-topology=chained ...............
> testpmd> start
> testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp
> testpmd> end key 67108863 / end
>  Segmentation fault (core dumped)
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ophir Munk
> > Sent: Saturday, November 3, 2018 11:55 PM
> > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> > <jingjing.wu@intel.com>; Iremonger, Bernard
> > <bernard.iremonger@intel.com>; dev@dpdk.org
> > Cc: Asaf Penso <asafp@mellanox.com>; Shahaf Shuler
> > <shahafs@mellanox.com>; Thomas Monjalon <thomas@monjalon.net>;
> Olga
> > Shern <olgas@mellanox.com>; Ophir Munk <ophirmu@mellanox.com>;
> > Yongseok Koh <yskoh@mellanox.com>
> > Subject: [dpdk-dev] [PATCH v1] app/testpmd: set default RSS key as
> > NULL
> >
> > When creating an RSS rule without specifying a key (see [1]) it is
> > expected that the device will use the default key.
> > A NULL key is uded to indicate to a PMD it should use its default key,
> > however testpmd assigns a non-NULL dummy key (see [2]) instead.
> > This does not enable testing any PMD behavior when the RSS key is not
> > specified. This commit fixes this limitation by setting key to NULL.
> >
> > [1]
> > RSS rule example without specifying a key:
> > flow create 0 ingress <pattern> / end actions rss queues 0 1 end / end
> > [2] Testpmd default key assignment:
> > .key= "testpmd's default RSS hash key, "
> > "override it for better balancing"
> >
> > Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> > ---
> > v1: Initial version
> >
> >  app/test-pmd/cmdline_flow.c | 15 ++-------------
> >  1 file changed, 2 insertions(+), 13 deletions(-)
> >
> > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> > index 23ea7cc..91e2e35 100644
> > --- a/app/test-pmd/cmdline_flow.c
> > +++ b/app/test-pmd/cmdline_flow.c
> > @@ -3248,26 +3248,15 @@ static int comp_vc_action_rss_queue(struct
> > context *, const struct token *,
> >  			.func = RTE_ETH_HASH_FUNCTION_DEFAULT,
> >  			.level = 0,
> >  			.types = rss_hf,
> > -			.key_len = sizeof(action_rss_data->key),
> > +			.key_len = 0,
> >  			.queue_num = RTE_MIN(nb_rxq,
> > ACTION_RSS_QUEUE_NUM),
> > -			.key = action_rss_data->key,
> > +			.key = NULL,
> >  			.queue = action_rss_data->queue,
> >  		},
> > -		.key = "testpmd's default RSS hash key, "
> > -			"override it for better balancing",
> >  		.queue = { 0 },
> >  	};
> >  	for (i = 0; i < action_rss_data->conf.queue_num; ++i)
> >  		action_rss_data->queue[i] = i;
> > -	if (!port_id_is_invalid(ctx->port, DISABLED_WARN) &&
> > -	    ctx->port != (portid_t)RTE_PORT_ALL) {
> > -		struct rte_eth_dev_info info;
> > -
> > -		rte_eth_dev_info_get(ctx->port, &info);
> > -		action_rss_data->conf.key_len =
> > -			RTE_MIN(sizeof(action_rss_data->key),
> > -				info.hash_key_size);
> > -	}
> >  	action->conf = &action_rss_data->conf;
> >  	return ret;
> >  }
> > --
> > 1.8.3.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v1] app/testpmd: set default RSS key as NULL
  2018-11-14  9:20   ` Ophir Munk
@ 2018-11-14  9:57     ` Zhao1, Wei
  0 siblings, 0 replies; 5+ messages in thread
From: Zhao1, Wei @ 2018-11-14  9:57 UTC (permalink / raw)
  To: Ophir Munk, Lu, Wenzhuo, Wu, Jingjing, Iremonger, Bernard, dev,
	Peng, Yuan
  Cc: Asaf Penso, Shahaf Shuler, Thomas Monjalon, Olga Shern, Yongseok Koh



> -----Original Message-----
> From: Ophir Munk [mailto:ophirmu@mellanox.com]
> Sent: Wednesday, November 14, 2018 5:20 PM
> To: Zhao1, Wei <wei.zhao1@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Iremonger,
> Bernard <bernard.iremonger@intel.com>; dev@dpdk.org; Peng, Yuan
> <yuan.peng@intel.com>
> Cc: Asaf Penso <asafp@mellanox.com>; Shahaf Shuler
> <shahafs@mellanox.com>; Thomas Monjalon <thomas@monjalon.net>;
> Olga Shern <olgas@mellanox.com>; Yongseok Koh <yskoh@mellanox.com>
> Subject: RE: [PATCH v1] app/testpmd: set default RSS key as NULL
> 
> Hi Zhao,
> The patch which causes your crash is already reverted (see [1]).
> You can find it with head of next-net or in RC3 (once it is issued).
> Please re-test your case after applying the reverting patch.
> 
> Regards,
> Ophir
> 
> [1]
> Commit 8773db152033 ("app/testpmd: revert setting default RSS")

Get, Thanks.

> 
> > -----Original Message-----
> > From: Zhao1, Wei [mailto:wei.zhao1@intel.com]
> > Sent: Wednesday, November 14, 2018 7:25 AM
> > To: Ophir Munk <ophirmu@mellanox.com>; Lu, Wenzhuo
> > <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> > Iremonger, Bernard <bernard.iremonger@intel.com>; dev@dpdk.org;
> Peng,
> > Yuan <yuan.peng@intel.com>
> > Cc: Asaf Penso <asafp@mellanox.com>; Shahaf Shuler
> > <shahafs@mellanox.com>; Thomas Monjalon <thomas@monjalon.net>;
> Olga
> > Shern <olgas@mellanox.com>; Yongseok Koh <yskoh@mellanox.com>
> > Subject: RE: [PATCH v1] app/testpmd: set default RSS key as NULL
> >
> > Hi, Ophir Munk
> >
> > 	Peng yuan has find this problem with patch , if you  use the
> > following test step, You will find the problem.
> > She is using i40e nic.
> >
> > ./x86_64-native-linuxapp-gcc/app/testpmd -c 1ffff -n 4 - -i
> > --nb-cores=8 --
> > rxq=4 --txq=4 --port-topology=chained ...............
> > testpmd> start
> > testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp
> > testpmd> end key 67108863 / end
> >  Segmentation fault (core dumped)
> >
> >
> > > -----Original Message-----
> > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ophir Munk
> > > Sent: Saturday, November 3, 2018 11:55 PM
> > > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> > > <jingjing.wu@intel.com>; Iremonger, Bernard
> > > <bernard.iremonger@intel.com>; dev@dpdk.org
> > > Cc: Asaf Penso <asafp@mellanox.com>; Shahaf Shuler
> > > <shahafs@mellanox.com>; Thomas Monjalon <thomas@monjalon.net>;
> > Olga
> > > Shern <olgas@mellanox.com>; Ophir Munk <ophirmu@mellanox.com>;
> > > Yongseok Koh <yskoh@mellanox.com>
> > > Subject: [dpdk-dev] [PATCH v1] app/testpmd: set default RSS key as
> > > NULL
> > >
> > > When creating an RSS rule without specifying a key (see [1]) it is
> > > expected that the device will use the default key.
> > > A NULL key is uded to indicate to a PMD it should use its default
> > > key, however testpmd assigns a non-NULL dummy key (see [2]) instead.
> > > This does not enable testing any PMD behavior when the RSS key is
> > > not specified. This commit fixes this limitation by setting key to NULL.
> > >
> > > [1]
> > > RSS rule example without specifying a key:
> > > flow create 0 ingress <pattern> / end actions rss queues 0 1 end /
> > > end [2] Testpmd default key assignment:
> > > .key= "testpmd's default RSS hash key, "
> > > "override it for better balancing"
> > >
> > > Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> > > ---
> > > v1: Initial version
> > >
> > >  app/test-pmd/cmdline_flow.c | 15 ++-------------
> > >  1 file changed, 2 insertions(+), 13 deletions(-)
> > >
> > > diff --git a/app/test-pmd/cmdline_flow.c
> > > b/app/test-pmd/cmdline_flow.c index 23ea7cc..91e2e35 100644
> > > --- a/app/test-pmd/cmdline_flow.c
> > > +++ b/app/test-pmd/cmdline_flow.c
> > > @@ -3248,26 +3248,15 @@ static int comp_vc_action_rss_queue(struct
> > > context *, const struct token *,
> > >  			.func = RTE_ETH_HASH_FUNCTION_DEFAULT,
> > >  			.level = 0,
> > >  			.types = rss_hf,
> > > -			.key_len = sizeof(action_rss_data->key),
> > > +			.key_len = 0,
> > >  			.queue_num = RTE_MIN(nb_rxq,
> > > ACTION_RSS_QUEUE_NUM),
> > > -			.key = action_rss_data->key,
> > > +			.key = NULL,
> > >  			.queue = action_rss_data->queue,
> > >  		},
> > > -		.key = "testpmd's default RSS hash key, "
> > > -			"override it for better balancing",
> > >  		.queue = { 0 },
> > >  	};
> > >  	for (i = 0; i < action_rss_data->conf.queue_num; ++i)
> > >  		action_rss_data->queue[i] = i;
> > > -	if (!port_id_is_invalid(ctx->port, DISABLED_WARN) &&
> > > -	    ctx->port != (portid_t)RTE_PORT_ALL) {
> > > -		struct rte_eth_dev_info info;
> > > -
> > > -		rte_eth_dev_info_get(ctx->port, &info);
> > > -		action_rss_data->conf.key_len =
> > > -			RTE_MIN(sizeof(action_rss_data->key),
> > > -				info.hash_key_size);
> > > -	}
> > >  	action->conf = &action_rss_data->conf;
> > >  	return ret;
> > >  }
> > > --
> > > 1.8.3.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-14  9:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-03 15:54 [dpdk-dev] [PATCH v1] app/testpmd: set default RSS key as NULL Ophir Munk
2018-11-05 13:31 ` Ferruh Yigit
2018-11-14  5:24 ` Zhao1, Wei
2018-11-14  9:20   ` Ophir Munk
2018-11-14  9:57     ` Zhao1, Wei

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).