DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix display issue in flow query
@ 2020-07-13  6:28 Chenxu Di
  2020-07-13  8:16 ` David Marchand
  2020-07-14  1:37 ` [dpdk-dev] [PATCH v2] app/testpmd: fix incorrect output format " Chenxu Di
  0 siblings, 2 replies; 6+ messages in thread
From: Chenxu Di @ 2020-07-13  6:28 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, wenzhuo.lu, Chenxu Di

This patch fix the error line break in the display info of flow query

Fixes: bdb1d61690f7 ("app/testpmd: support RSS config in flow query")

Signed-off-by: Chenxu Di <chenxux.di@intel.com>
---
 app/test-pmd/config.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index fcbe6b6f7..7b254e484 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1425,7 +1425,10 @@ rss_config_display(struct rte_flow_action_rss *rss_conf)
 	if (rss_conf->queue_num == 0)
 		printf("none\n");
 	for (i = 0; i < rss_conf->queue_num; i++)
-		printf("%d\n", rss_conf->queue[i]);
+		if (i == rss_conf->queue_num - 1)
+			printf("%d\n", rss_conf->queue[i]);
+		else
+			printf("%d ", rss_conf->queue[i]);
 
 	printf(" function: ");
 	switch (rss_conf->func) {
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH] app/testpmd: fix display issue in flow query
  2020-07-13  6:28 [dpdk-dev] [PATCH] app/testpmd: fix display issue in flow query Chenxu Di
@ 2020-07-13  8:16 ` David Marchand
  2020-07-13  8:23   ` Di, ChenxuX
  2020-07-14  1:37 ` [dpdk-dev] [PATCH v2] app/testpmd: fix incorrect output format " Chenxu Di
  1 sibling, 1 reply; 6+ messages in thread
From: David Marchand @ 2020-07-13  8:16 UTC (permalink / raw)
  To: Chenxu Di; +Cc: dev, Beilei Xing, Wenzhuo Lu

On Mon, Jul 13, 2020 at 8:39 AM Chenxu Di <chenxux.di@intel.com> wrote:
>
> This patch fix the error line break in the display info of flow query
>
> Fixes: bdb1d61690f7 ("app/testpmd: support RSS config in flow query")
>
> Signed-off-by: Chenxu Di <chenxux.di@intel.com>
> ---
>  app/test-pmd/config.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index fcbe6b6f7..7b254e484 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -1425,7 +1425,10 @@ rss_config_display(struct rte_flow_action_rss *rss_conf)
>         if (rss_conf->queue_num == 0)
>                 printf("none\n");
>         for (i = 0; i < rss_conf->queue_num; i++)
> -               printf("%d\n", rss_conf->queue[i]);
> +               if (i == rss_conf->queue_num - 1)
> +                       printf("%d\n", rss_conf->queue[i]);
> +               else
> +                       printf("%d ", rss_conf->queue[i]);
>
>         printf(" function: ");
>         switch (rss_conf->func) {
> --
> 2.17.1
>

What do you think of this (untested) alternative?

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index fcbe6b6f74..30bee33248 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1421,11 +1421,12 @@ rss_config_display(struct rte_flow_action_rss *rss_conf)
        }

        printf("RSS:\n"
-              " queues: ");
+              " queues:");
        if (rss_conf->queue_num == 0)
-               printf("none\n");
+               printf(" none");
        for (i = 0; i < rss_conf->queue_num; i++)
-               printf("%d\n", rss_conf->queue[i]);
+               printf(" %d", rss_conf->queue[i]);
+       printf("\n");



        printf(" function: ");
        switch (rss_conf->func) {


-- 
David Marchand


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

* Re: [dpdk-dev] [PATCH] app/testpmd: fix display issue in flow query
  2020-07-13  8:16 ` David Marchand
@ 2020-07-13  8:23   ` Di, ChenxuX
  0 siblings, 0 replies; 6+ messages in thread
From: Di, ChenxuX @ 2020-07-13  8:23 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, Xing, Beilei, Lu, Wenzhuo

Ok, it looks better.
I will update it soon.

> -----Original Message-----
> From: David Marchand [mailto:david.marchand@redhat.com]
> Sent: Monday, July 13, 2020 4:16 PM
> To: Di, ChenxuX <chenxux.di@intel.com>
> Cc: dev <dev@dpdk.org>; Xing, Beilei <beilei.xing@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix display issue in flow query
> 
> On Mon, Jul 13, 2020 at 8:39 AM Chenxu Di <chenxux.di@intel.com> wrote:
> >
> > This patch fix the error line break in the display info of flow query
> >
> > Fixes: bdb1d61690f7 ("app/testpmd: support RSS config in flow query")
> >
> > Signed-off-by: Chenxu Di <chenxux.di@intel.com>
> > ---
> >  app/test-pmd/config.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
> > fcbe6b6f7..7b254e484 100644
> > --- a/app/test-pmd/config.c
> > +++ b/app/test-pmd/config.c
> > @@ -1425,7 +1425,10 @@ rss_config_display(struct rte_flow_action_rss
> *rss_conf)
> >         if (rss_conf->queue_num == 0)
> >                 printf("none\n");
> >         for (i = 0; i < rss_conf->queue_num; i++)
> > -               printf("%d\n", rss_conf->queue[i]);
> > +               if (i == rss_conf->queue_num - 1)
> > +                       printf("%d\n", rss_conf->queue[i]);
> > +               else
> > +                       printf("%d ", rss_conf->queue[i]);
> >
> >         printf(" function: ");
> >         switch (rss_conf->func) {
> > --
> > 2.17.1
> >
> 
> What do you think of this (untested) alternative?
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
> fcbe6b6f74..30bee33248 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -1421,11 +1421,12 @@ rss_config_display(struct rte_flow_action_rss
> *rss_conf)
>         }
> 
>         printf("RSS:\n"
> -              " queues: ");
> +              " queues:");
>         if (rss_conf->queue_num == 0)
> -               printf("none\n");
> +               printf(" none");
>         for (i = 0; i < rss_conf->queue_num; i++)
> -               printf("%d\n", rss_conf->queue[i]);
> +               printf(" %d", rss_conf->queue[i]);
> +       printf("\n");
> 
> 
> 
>         printf(" function: ");
>         switch (rss_conf->func) {
> 
> 
> --
> David Marchand


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

* [dpdk-dev] [PATCH v2] app/testpmd: fix incorrect output format in flow query
  2020-07-13  6:28 [dpdk-dev] [PATCH] app/testpmd: fix display issue in flow query Chenxu Di
  2020-07-13  8:16 ` David Marchand
@ 2020-07-14  1:37 ` Chenxu Di
  2020-07-14 10:06   ` Phil Yang
  1 sibling, 1 reply; 6+ messages in thread
From: Chenxu Di @ 2020-07-14  1:37 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, david.marchand, wenzhuo.lu, Chenxu Di

This patch fix the error line break in the output format of flow query

Fixes: bdb1d61690f7 ("app/testpmd: support RSS config in flow query")

Signed-off-by: Chenxu Di <chenxux.di@intel.com>
---
 app/test-pmd/config.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index fcbe6b6f7..30bee3324 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1421,11 +1421,12 @@ rss_config_display(struct rte_flow_action_rss *rss_conf)
 	}
 
 	printf("RSS:\n"
-	       " queues: ");
+	       " queues:");
 	if (rss_conf->queue_num == 0)
-		printf("none\n");
+		printf(" none");
 	for (i = 0; i < rss_conf->queue_num; i++)
-		printf("%d\n", rss_conf->queue[i]);
+		printf(" %d", rss_conf->queue[i]);
+	printf("\n");
 
 	printf(" function: ");
 	switch (rss_conf->func) {
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH v2] app/testpmd: fix incorrect output format in flow query
  2020-07-14  1:37 ` [dpdk-dev] [PATCH v2] app/testpmd: fix incorrect output format " Chenxu Di
@ 2020-07-14 10:06   ` Phil Yang
  2020-07-14 11:38     ` Ferruh Yigit
  0 siblings, 1 reply; 6+ messages in thread
From: Phil Yang @ 2020-07-14 10:06 UTC (permalink / raw)
  To: Chenxu Di, dev; +Cc: beilei.xing, david.marchand, wenzhuo.lu, nd, nd

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Chenxu Di
> Sent: Tuesday, July 14, 2020 9:37 AM
> To: dev@dpdk.org
> Cc: beilei.xing@intel.com; david.marchand@redhat.com;
> wenzhuo.lu@intel.com; Chenxu Di <chenxux.di@intel.com>
> Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix incorrect output format in
> flow query
> 
> This patch fix the error line break in the output format of flow query
> 
> Fixes: bdb1d61690f7 ("app/testpmd: support RSS config in flow query")
> 
> Signed-off-by: Chenxu Di <chenxux.di@intel.com>


Tested-by: Phil Yang <phil.yang@arm.com>


> ---
>  app/test-pmd/config.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index fcbe6b6f7..30bee3324 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -1421,11 +1421,12 @@ rss_config_display(struct rte_flow_action_rss
> *rss_conf)
>  	}
> 
>  	printf("RSS:\n"
> -	       " queues: ");
> +	       " queues:");
>  	if (rss_conf->queue_num == 0)
> -		printf("none\n");
> +		printf(" none");
>  	for (i = 0; i < rss_conf->queue_num; i++)
> -		printf("%d\n", rss_conf->queue[i]);
> +		printf(" %d", rss_conf->queue[i]);
> +	printf("\n");
> 
>  	printf(" function: ");
>  	switch (rss_conf->func) {
> --
> 2.17.1


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

* Re: [dpdk-dev] [PATCH v2] app/testpmd: fix incorrect output format in flow query
  2020-07-14 10:06   ` Phil Yang
@ 2020-07-14 11:38     ` Ferruh Yigit
  0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2020-07-14 11:38 UTC (permalink / raw)
  To: Phil Yang, Chenxu Di, dev; +Cc: beilei.xing, david.marchand, wenzhuo.lu, nd

On 7/14/2020 11:06 AM, Phil Yang wrote:
>> -----Original Message-----
>> From: dev <dev-bounces@dpdk.org> On Behalf Of Chenxu Di
>> Sent: Tuesday, July 14, 2020 9:37 AM
>> To: dev@dpdk.org
>> Cc: beilei.xing@intel.com; david.marchand@redhat.com;
>> wenzhuo.lu@intel.com; Chenxu Di <chenxux.di@intel.com>
>> Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix incorrect output format in
>> flow query
>>
>> This patch fix the error line break in the output format of flow query
>>
>> Fixes: bdb1d61690f7 ("app/testpmd: support RSS config in flow query")
>>
>> Signed-off-by: Chenxu Di <chenxux.di@intel.com>
> 
> 
> Tested-by: Phil Yang <phil.yang@arm.com>
> 

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

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

end of thread, other threads:[~2020-07-14 11:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13  6:28 [dpdk-dev] [PATCH] app/testpmd: fix display issue in flow query Chenxu Di
2020-07-13  8:16 ` David Marchand
2020-07-13  8:23   ` Di, ChenxuX
2020-07-14  1:37 ` [dpdk-dev] [PATCH v2] app/testpmd: fix incorrect output format " Chenxu Di
2020-07-14 10:06   ` Phil Yang
2020-07-14 11:38     ` 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).