DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: port info prints dynamically mapped flow types
@ 2017-09-01 16:23 Kirill Rybalchenko
  2017-09-07  8:26 ` Wu, Jingjing
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kirill Rybalchenko @ 2017-09-01 16:23 UTC (permalink / raw)
  To: dev; +Cc: kirill.rybalchenko, andrey.chilikin, beilei.xing, jingjing.wu

Port info command prints information about all supported flow types,
including dynamically mapped ones.

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
 app/test-pmd/config.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 3ae3e1c..bd5de92 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -498,12 +498,15 @@ port_infos_display(portid_t port_id)
 		char *p;
 
 		printf("Supported flow types:\n");
-		for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < RTE_ETH_FLOW_MAX;
-								i++) {
+		for (i = RTE_ETH_FLOW_UNKNOWN + 1;
+		     i < sizeof(dev_info.flow_type_rss_offloads) * 8; i++) {
 			if (!(dev_info.flow_type_rss_offloads & (1ULL << i)))
 				continue;
 			p = flowtype_to_str(i);
-			printf("  %s\n", (p ? p : "unknown"));
+			if (p)
+				printf("  %s\n", p);
+			else
+				printf("  user defined %d\n", i);
 		}
 	}
 
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH] app/testpmd: port info prints dynamically mapped flow types
  2017-09-01 16:23 [dpdk-dev] [PATCH] app/testpmd: port info prints dynamically mapped flow types Kirill Rybalchenko
@ 2017-09-07  8:26 ` Wu, Jingjing
  2017-09-20 11:19 ` Ferruh Yigit
  2017-09-20 15:06 ` [dpdk-dev] [PATCH v2] " Kirill Rybalchenko
  2 siblings, 0 replies; 5+ messages in thread
From: Wu, Jingjing @ 2017-09-07  8:26 UTC (permalink / raw)
  To: Rybalchenko, Kirill, dev; +Cc: Chilikin, Andrey, Xing, Beilei



> -----Original Message-----
> From: Rybalchenko, Kirill
> Sent: Saturday, September 2, 2017 12:23 AM
> To: dev@dpdk.org
> Cc: Rybalchenko, Kirill <kirill.rybalchenko@intel.com>; Chilikin, Andrey
> <andrey.chilikin@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>
> Subject: [PATCH] app/testpmd: port info prints dynamically mapped flow types
> 
> Port info command prints information about all supported flow types,
> including dynamically mapped ones.
> 
> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>

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

* Re: [dpdk-dev] [PATCH] app/testpmd: port info prints dynamically mapped flow types
  2017-09-01 16:23 [dpdk-dev] [PATCH] app/testpmd: port info prints dynamically mapped flow types Kirill Rybalchenko
  2017-09-07  8:26 ` Wu, Jingjing
@ 2017-09-20 11:19 ` Ferruh Yigit
  2017-09-20 15:06 ` [dpdk-dev] [PATCH v2] " Kirill Rybalchenko
  2 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2017-09-20 11:19 UTC (permalink / raw)
  To: Kirill Rybalchenko, dev; +Cc: andrey.chilikin, beilei.xing, jingjing.wu

On 9/1/2017 5:23 PM, Kirill Rybalchenko wrote:
> Port info command prints information about all supported flow types,
> including dynamically mapped ones.
> 
> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
> ---
>  app/test-pmd/config.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index 3ae3e1c..bd5de92 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -498,12 +498,15 @@ port_infos_display(portid_t port_id)
>  		char *p;
>  
>  		printf("Supported flow types:\n");
> -		for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < RTE_ETH_FLOW_MAX;
> -								i++) {
> +		for (i = RTE_ETH_FLOW_UNKNOWN + 1;
> +		     i < sizeof(dev_info.flow_type_rss_offloads) * 8; i++) {

What do you think using "CHAR_BIT" instead of "8" to stress the intention?

If you are OK to send new version, please keep JingJing's Review tag.

>  			if (!(dev_info.flow_type_rss_offloads & (1ULL << i)))
>  				continue;
>  			p = flowtype_to_str(i);
> -			printf("  %s\n", (p ? p : "unknown"));
> +			if (p)
> +				printf("  %s\n", p);
> +			else
> +				printf("  user defined %d\n", i);
>  		}
>  	}
>  
> 

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

* [dpdk-dev] [PATCH v2] app/testpmd: port info prints dynamically mapped flow types
  2017-09-01 16:23 [dpdk-dev] [PATCH] app/testpmd: port info prints dynamically mapped flow types Kirill Rybalchenko
  2017-09-07  8:26 ` Wu, Jingjing
  2017-09-20 11:19 ` Ferruh Yigit
@ 2017-09-20 15:06 ` Kirill Rybalchenko
  2017-10-02 23:44   ` Ferruh Yigit
  2 siblings, 1 reply; 5+ messages in thread
From: Kirill Rybalchenko @ 2017-09-20 15:06 UTC (permalink / raw)
  To: dev; +Cc: kirill.rybalchenko, andrey.chilikin, beilei.xing, jingjing.wu

Port info command prints information about all supported flow types,
including dynamically mapped ones.

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>

Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
---
 app/test-pmd/config.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index ca83eef..fa93032 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -498,12 +498,15 @@ port_infos_display(portid_t port_id)
 		char *p;
 
 		printf("Supported flow types:\n");
-		for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < RTE_ETH_FLOW_MAX;
-								i++) {
+		for (i = RTE_ETH_FLOW_UNKNOWN + 1;
+		     i < sizeof(dev_info.flow_type_rss_offloads) * CHAR_BIT; i++) {
 			if (!(dev_info.flow_type_rss_offloads & (1ULL << i)))
 				continue;
 			p = flowtype_to_str(i);
-			printf("  %s\n", (p ? p : "unknown"));
+			if (p)
+				printf("  %s\n", p);
+			else
+				printf("  user defined %d\n", i);
 		}
 	}
 
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH v2] app/testpmd: port info prints dynamically mapped flow types
  2017-09-20 15:06 ` [dpdk-dev] [PATCH v2] " Kirill Rybalchenko
@ 2017-10-02 23:44   ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2017-10-02 23:44 UTC (permalink / raw)
  To: Kirill Rybalchenko, dev; +Cc: andrey.chilikin, beilei.xing, jingjing.wu

On 9/20/2017 4:06 PM, Kirill Rybalchenko wrote:
> Port info command prints information about all supported flow types,
> including dynamically mapped ones.
> 
> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
> Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>

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

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

end of thread, other threads:[~2017-10-02 23:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-01 16:23 [dpdk-dev] [PATCH] app/testpmd: port info prints dynamically mapped flow types Kirill Rybalchenko
2017-09-07  8:26 ` Wu, Jingjing
2017-09-20 11:19 ` Ferruh Yigit
2017-09-20 15:06 ` [dpdk-dev] [PATCH v2] " Kirill Rybalchenko
2017-10-02 23:44   ` 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).