DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] testpmd: allow to query any RETA size
@ 2017-07-07  6:02 Yuanhan Liu
  2017-07-07  6:02 ` [dpdk-dev] [PATCH 2/2] testpmd: give more hint on invalid " Yuanhan Liu
  2017-07-10  1:17 ` [dpdk-dev] [PATCH 1/2] testpmd: allow to query any " Wu, Jingjing
  0 siblings, 2 replies; 6+ messages in thread
From: Yuanhan Liu @ 2017-07-07  6:02 UTC (permalink / raw)
  To: dev; +Cc: Jingjing Wu, Yuanhan Liu

Currently, testpmd just allows to query the RETA info only when the
required size equals to configured RETA size.

This patch allows to query any RETA size <= the configured size. This
helps when the RETA size is big (say 512) and when I just want to peak
few RETA entries.

Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 0afac68..c8faef9 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2143,7 +2143,7 @@ cmd_showport_reta_parsed(void *parsed_result,
 
 	memset(&dev_info, 0, sizeof(dev_info));
 	rte_eth_dev_info_get(res->port_id, &dev_info);
-	if (dev_info.reta_size == 0 || res->size != dev_info.reta_size ||
+	if (dev_info.reta_size == 0 || res->size > dev_info.reta_size ||
 				res->size > ETH_RSS_RETA_SIZE_512) {
 		printf("Invalid redirection table size: %u\n", res->size);
 		return;
-- 
2.7.4

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

* [dpdk-dev] [PATCH 2/2] testpmd: give more hint on invalid RETA size
  2017-07-07  6:02 [dpdk-dev] [PATCH 1/2] testpmd: allow to query any RETA size Yuanhan Liu
@ 2017-07-07  6:02 ` Yuanhan Liu
  2017-07-10  1:19   ` Wu, Jingjing
  2017-07-10  1:17 ` [dpdk-dev] [PATCH 1/2] testpmd: allow to query any " Wu, Jingjing
  1 sibling, 1 reply; 6+ messages in thread
From: Yuanhan Liu @ 2017-07-07  6:02 UTC (permalink / raw)
  To: dev; +Cc: Jingjing Wu, Yuanhan Liu

Print the valid RTE size range so that user knows what goes wrong.

Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 app/test-pmd/cmdline.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index c8faef9..d32a1df 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2140,12 +2140,14 @@ cmd_showport_reta_parsed(void *parsed_result,
 	struct cmd_showport_reta *res = parsed_result;
 	struct rte_eth_rss_reta_entry64 reta_conf[8];
 	struct rte_eth_dev_info dev_info;
+	uint16_t max_reta_size;
 
 	memset(&dev_info, 0, sizeof(dev_info));
 	rte_eth_dev_info_get(res->port_id, &dev_info);
-	if (dev_info.reta_size == 0 || res->size > dev_info.reta_size ||
-				res->size > ETH_RSS_RETA_SIZE_512) {
-		printf("Invalid redirection table size: %u\n", res->size);
+	max_reta_size = RTE_MIN(dev_info.reta_size, ETH_RSS_RETA_SIZE_512);
+	if (res->size == 0 || res->size > max_reta_size) {
+		printf("Invalid redirection table size: %u (1-%u)\n",
+			res->size, max_reta_size);
 		return;
 	}
 
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH 1/2] testpmd: allow to query any RETA size
  2017-07-07  6:02 [dpdk-dev] [PATCH 1/2] testpmd: allow to query any RETA size Yuanhan Liu
  2017-07-07  6:02 ` [dpdk-dev] [PATCH 2/2] testpmd: give more hint on invalid " Yuanhan Liu
@ 2017-07-10  1:17 ` Wu, Jingjing
  2017-10-08  4:03   ` Ferruh Yigit
  1 sibling, 1 reply; 6+ messages in thread
From: Wu, Jingjing @ 2017-07-10  1:17 UTC (permalink / raw)
  To: Yuanhan Liu, dev



> -----Original Message-----
> From: Yuanhan Liu [mailto:yliu@fridaylinux.org]
> Sent: Friday, July 7, 2017 2:02 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Yuanhan Liu <yliu@fridaylinux.org>
> Subject: [PATCH 1/2] testpmd: allow to query any RETA size
> 
> Currently, testpmd just allows to query the RETA info only when the
> required size equals to configured RETA size.
> 
> This patch allows to query any RETA size <= the configured size. This
> helps when the RETA size is big (say 512) and when I just want to peak
> few RETA entries.
> 
> Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>
Looks reasonable.

Acked-by: Jingjing Wu <jingjing.wu@intel.com>

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

* Re: [dpdk-dev] [PATCH 2/2] testpmd: give more hint on invalid RETA size
  2017-07-07  6:02 ` [dpdk-dev] [PATCH 2/2] testpmd: give more hint on invalid " Yuanhan Liu
@ 2017-07-10  1:19   ` Wu, Jingjing
  2017-07-10  1:24     ` Yuanhan Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Wu, Jingjing @ 2017-07-10  1:19 UTC (permalink / raw)
  To: Yuanhan Liu, dev



> -----Original Message-----
> From: Yuanhan Liu [mailto:yliu@fridaylinux.org]
> Sent: Friday, July 7, 2017 2:02 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Yuanhan Liu <yliu@fridaylinux.org>
> Subject: [PATCH 2/2] testpmd: give more hint on invalid RETA size
> 
> Print the valid RTE size range so that user knows what goes wrong.
> 
> Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>
> ---
>  app/test-pmd/cmdline.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index c8faef9..d32a1df 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -2140,12 +2140,14 @@ cmd_showport_reta_parsed(void *parsed_result,
>  	struct cmd_showport_reta *res = parsed_result;
>  	struct rte_eth_rss_reta_entry64 reta_conf[8];
>  	struct rte_eth_dev_info dev_info;
> +	uint16_t max_reta_size;
> 
>  	memset(&dev_info, 0, sizeof(dev_info));
>  	rte_eth_dev_info_get(res->port_id, &dev_info);
> -	if (dev_info.reta_size == 0 || res->size > dev_info.reta_size ||
> -				res->size > ETH_RSS_RETA_SIZE_512) {
> -		printf("Invalid redirection table size: %u\n", res->size);
> +	max_reta_size = RTE_MIN(dev_info.reta_size, ETH_RSS_RETA_SIZE_512);
> +	if (res->size == 0 || res->size > max_reta_size) {
> +		printf("Invalid redirection table size: %u (1-%u)\n",
> +			res->size, max_reta_size);
>  		return;
>  	}
> 
Why not merge this with previous one?
Thanks
Jingjing

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

* Re: [dpdk-dev] [PATCH 2/2] testpmd: give more hint on invalid RETA size
  2017-07-10  1:19   ` Wu, Jingjing
@ 2017-07-10  1:24     ` Yuanhan Liu
  0 siblings, 0 replies; 6+ messages in thread
From: Yuanhan Liu @ 2017-07-10  1:24 UTC (permalink / raw)
  To: Wu, Jingjing; +Cc: dev

On Mon, Jul 10, 2017 at 01:19:06AM +0000, Wu, Jingjing wrote:
> > -----Original Message-----
> > From: Yuanhan Liu [mailto:yliu@fridaylinux.org]
> > Subject: [PATCH 2/2] testpmd: give more hint on invalid RETA size
> > 
> > Print the valid RTE size range so that user knows what goes wrong.
> > 
> > Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>
> > ---
> >  app/test-pmd/cmdline.c | 8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> > 
> > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> > index c8faef9..d32a1df 100644
> > --- a/app/test-pmd/cmdline.c
> > +++ b/app/test-pmd/cmdline.c
> > @@ -2140,12 +2140,14 @@ cmd_showport_reta_parsed(void *parsed_result,
> >  	struct cmd_showport_reta *res = parsed_result;
> >  	struct rte_eth_rss_reta_entry64 reta_conf[8];
> >  	struct rte_eth_dev_info dev_info;
> > +	uint16_t max_reta_size;
> > 
> >  	memset(&dev_info, 0, sizeof(dev_info));
> >  	rte_eth_dev_info_get(res->port_id, &dev_info);
> > -	if (dev_info.reta_size == 0 || res->size > dev_info.reta_size ||
> > -				res->size > ETH_RSS_RETA_SIZE_512) {
> > -		printf("Invalid redirection table size: %u\n", res->size);
> > +	max_reta_size = RTE_MIN(dev_info.reta_size, ETH_RSS_RETA_SIZE_512);
> > +	if (res->size == 0 || res->size > max_reta_size) {
> > +		printf("Invalid redirection table size: %u (1-%u)\n",
> > +			res->size, max_reta_size);
> >  		return;
> >  	}
> > 
> Why not merge this with previous one?

Because they are two differnt things, even though each of them is really tiny.

	--yliu

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

* Re: [dpdk-dev] [PATCH 1/2] testpmd: allow to query any RETA size
  2017-07-10  1:17 ` [dpdk-dev] [PATCH 1/2] testpmd: allow to query any " Wu, Jingjing
@ 2017-10-08  4:03   ` Ferruh Yigit
  0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2017-10-08  4:03 UTC (permalink / raw)
  To: Jingjing Wu, Yuanhan Liu; +Cc: DPDK

On 7/10/2017 2:17 AM, jingjing.wu at intel.com (Wu, Jingjing) wrote:
>> -----Original Message-----
>> From: Yuanhan Liu [mailto:yliu at fridaylinux.org]
>> Sent: Friday, July 7, 2017 2:02 PM
>> To: dev at dpdk.org
>> Cc: Wu, Jingjing <jingjing.wu at intel.com>; Yuanhan Liu <yliu at fridaylinux.org>
>> Subject: [PATCH 1/2] testpmd: allow to query any RETA size
>>
>> Currently, testpmd just allows to query the RETA info only when the
>> required size equals to configured RETA size.
>>
>> This patch allows to query any RETA size <= the configured size. This
>> helps when the RETA size is big (say 512) and when I just want to peak
>> few RETA entries.
>>
>> Signed-off-by: Yuanhan Liu <yliu at fridaylinux.org>
> 
> Acked-by: Jingjing Wu <jingjing.wu at intel.com>

Series applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2017-10-08  4:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-07  6:02 [dpdk-dev] [PATCH 1/2] testpmd: allow to query any RETA size Yuanhan Liu
2017-07-07  6:02 ` [dpdk-dev] [PATCH 2/2] testpmd: give more hint on invalid " Yuanhan Liu
2017-07-10  1:19   ` Wu, Jingjing
2017-07-10  1:24     ` Yuanhan Liu
2017-07-10  1:17 ` [dpdk-dev] [PATCH 1/2] testpmd: allow to query any " Wu, Jingjing
2017-10-08  4:03   ` Ferruh Yigit

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