[dpdk-stable] patch 'app/testpmd: fix displaying RSS hash functions' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Wed Nov 21 17:48:05 CET 2018


Hi,

FYI, your patch has been queued to stable release 18.08.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/27/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 3cdd5423a6745cb3f5b69d6c4c237cd005798b8a Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Thu, 4 Oct 2018 20:24:44 +0100
Subject: [PATCH] app/testpmd: fix displaying RSS hash functions

[ upstream commit 5b4557ec8d16859215fafe9e24d3fb7722f43b8a ]

Command shouldn't ask RSS hash functions as argument to get supported
RSS hash function, those values will be overwritten by PMD anyway.

To display configured RSS hash functions
"show port (port_id) rss-hash"

To display configured RSS hash functions and hash key
"show port (port_id) rss-hash key"

Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands")

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger at intel.com>
---
 app/test-pmd/cmdline.c                      | 28 ++++-----------------
 app/test-pmd/config.c                       | 11 ++------
 app/test-pmd/testpmd.h                      |  3 +--
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  2 +-
 4 files changed, 9 insertions(+), 35 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 7a6fe5d33..4645c7840 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -176,9 +176,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 			" hardware supported reta size\n\n"
 
-			"show port rss-hash ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|"
-			"ipv4-sctp|ipv4-other|ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|"
-			"ipv6-other|l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex [key]\n"
-			"    Display the RSS hash functions and RSS hash key"
-			" of port X\n\n"
+			"show port (port_id) rss-hash [key]\n"
+			"    Display the RSS hash functions and RSS hash key of port\n\n"
 
 			"clear port (info|stats|xstats|fdir|stat_qmap) (port_id|all)\n"
@@ -2817,6 +2814,5 @@ static void cmd_showport_rss_hash_parsed(void *parsed_result,
 	struct cmd_showport_rss_hash *res = parsed_result;
 
-	port_rss_hash_conf_show(res->port_id, res->rss_type,
-				show_rss_key != NULL);
+	port_rss_hash_conf_show(res->port_id, show_rss_key != NULL);
 }
 
@@ -2830,10 +2826,4 @@ cmdline_parse_token_string_t cmd_showport_rss_hash_rss_hash =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_rss_hash, rss_hash,
 				 "rss-hash");
-cmdline_parse_token_string_t cmd_showport_rss_hash_rss_hash_info =
-	TOKEN_STRING_INITIALIZER(struct cmd_showport_rss_hash, rss_type,
-				 "ipv4#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#"
-				 "ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#"
-				 "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#"
-				 "ipv6-tcp-ex#ipv6-udp-ex");
 cmdline_parse_token_string_t cmd_showport_rss_hash_rss_key =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_rss_hash, key, "key");
@@ -2842,8 +2832,5 @@ cmdline_parse_inst_t cmd_showport_rss_hash = {
 	.f = cmd_showport_rss_hash_parsed,
 	.data = NULL,
-	.help_str = "show port <port_id> rss-hash "
-		"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
-		"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|"
-		"l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex",
+	.help_str = "show port <port_id> rss-hash",
 	.tokens = {
 		(void *)&cmd_showport_rss_hash_show,
@@ -2851,5 +2838,4 @@ cmdline_parse_inst_t cmd_showport_rss_hash = {
 		(void *)&cmd_showport_rss_hash_port_id,
 		(void *)&cmd_showport_rss_hash_rss_hash,
-		(void *)&cmd_showport_rss_hash_rss_hash_info,
 		NULL,
 	},
@@ -2859,8 +2845,5 @@ cmdline_parse_inst_t cmd_showport_rss_hash_key = {
 	.f = cmd_showport_rss_hash_parsed,
 	.data = (void *)1,
-	.help_str = "show port <port_id> rss-hash "
-		"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
-		"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|"
-		"l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex key",
+	.help_str = "show port <port_id> rss-hash key",
 	.tokens = {
 		(void *)&cmd_showport_rss_hash_show,
@@ -2868,5 +2851,4 @@ cmdline_parse_inst_t cmd_showport_rss_hash_key = {
 		(void *)&cmd_showport_rss_hash_port_id,
 		(void *)&cmd_showport_rss_hash_rss_hash,
-		(void *)&cmd_showport_rss_hash_rss_hash_info,
 		(void *)&cmd_showport_rss_hash_rss_key,
 		NULL,
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 21d5e4ae4..a08a4a5d9 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1929,7 +1929,7 @@ port_rss_reta_info(portid_t port_id,
  */
 void
-port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key)
+port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
 {
-	struct rte_eth_rss_conf rss_conf;
+	struct rte_eth_rss_conf rss_conf = {0};
 	uint8_t rss_key[RSS_HASH_KEY_LENGTH];
 	uint64_t rss_hf;
@@ -1942,5 +1942,4 @@ port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key)
 		return;
 
-	memset(&dev_info, 0, sizeof(dev_info));
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if (dev_info.hash_key_size > 0 &&
@@ -1952,10 +1951,4 @@ port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key)
 	}
 
-	rss_conf.rss_hf = 0;
-	for (i = 0; rss_type_table[i].str; i++) {
-		if (!strcmp(rss_info, rss_type_table[i].str))
-			rss_conf.rss_hf = rss_type_table[i].rss_type;
-	}
-
 	/* Get RSS hash key if asked to display it */
 	rss_conf.rss_key = (show_rss_key) ? rss_key : NULL;
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index a1f661472..150b9ae2c 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -709,6 +709,5 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,
 				uint64_t q_msk);
 
-void port_rss_hash_conf_show(portid_t port_id, char rss_info[],
-			     int show_rss_key);
+void port_rss_hash_conf_show(portid_t port_id, int show_rss_key);
 void port_rss_hash_key_update(portid_t port_id, char rss_type[],
 			      uint8_t *hash_key, uint hash_key_len);
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index dde205a2b..c3e4005d6 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -232,5 +232,5 @@ show port rss-hash
 Display the RSS hash functions and RSS hash key of a port::
 
-   testpmd> show port (port_id) rss-hash ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex [key]
+   testpmd> show port (port_id) rss-hash [key]
 
 clear port
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 16:44:32.328862016 +0000
+++ 0051-app-testpmd-fix-displaying-RSS-hash-functions.patch	2018-11-21 16:44:30.000000000 +0000
@@ -1,8 +1,10 @@
-From 5b4557ec8d16859215fafe9e24d3fb7722f43b8a Mon Sep 17 00:00:00 2001
+From 3cdd5423a6745cb3f5b69d6c4c237cd005798b8a Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit at intel.com>
 Date: Thu, 4 Oct 2018 20:24:44 +0100
 Subject: [PATCH] app/testpmd: fix displaying RSS hash functions
 
+[ upstream commit 5b4557ec8d16859215fafe9e24d3fb7722f43b8a ]
+
 Command shouldn't ask RSS hash functions as argument to get supported
 RSS hash function, those values will be overwritten by PMD anyway.
 
@@ -13,7 +15,6 @@
 "show port (port_id) rss-hash key"
 
 Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands")
-Cc: stable at dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
 Acked-by: Bernard Iremonger <bernard.iremonger at intel.com>
@@ -25,7 +26,7 @@
  4 files changed, 9 insertions(+), 35 deletions(-)
 
 diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
-index 3376a665c..6a769bb82 100644
+index 7a6fe5d33..4645c7840 100644
 --- a/app/test-pmd/cmdline.c
 +++ b/app/test-pmd/cmdline.c
 @@ -176,9 +176,6 @@ static void cmd_help_long_parsed(void *parsed_result,
@@ -40,7 +41,7 @@
 +			"    Display the RSS hash functions and RSS hash key of port\n\n"
  
  			"clear port (info|stats|xstats|fdir|stat_qmap) (port_id|all)\n"
-@@ -2905,6 +2902,5 @@ static void cmd_showport_rss_hash_parsed(void *parsed_result,
+@@ -2817,6 +2814,5 @@ static void cmd_showport_rss_hash_parsed(void *parsed_result,
  	struct cmd_showport_rss_hash *res = parsed_result;
  
 -	port_rss_hash_conf_show(res->port_id, res->rss_type,
@@ -48,7 +49,7 @@
 +	port_rss_hash_conf_show(res->port_id, show_rss_key != NULL);
  }
  
-@@ -2918,10 +2914,4 @@ cmdline_parse_token_string_t cmd_showport_rss_hash_rss_hash =
+@@ -2830,10 +2826,4 @@ cmdline_parse_token_string_t cmd_showport_rss_hash_rss_hash =
  	TOKEN_STRING_INITIALIZER(struct cmd_showport_rss_hash, rss_hash,
  				 "rss-hash");
 -cmdline_parse_token_string_t cmd_showport_rss_hash_rss_hash_info =
@@ -59,7 +60,7 @@
 -				 "ipv6-tcp-ex#ipv6-udp-ex");
  cmdline_parse_token_string_t cmd_showport_rss_hash_rss_key =
  	TOKEN_STRING_INITIALIZER(struct cmd_showport_rss_hash, key, "key");
-@@ -2930,8 +2920,5 @@ cmdline_parse_inst_t cmd_showport_rss_hash = {
+@@ -2842,8 +2832,5 @@ cmdline_parse_inst_t cmd_showport_rss_hash = {
  	.f = cmd_showport_rss_hash_parsed,
  	.data = NULL,
 -	.help_str = "show port <port_id> rss-hash "
@@ -69,13 +70,13 @@
 +	.help_str = "show port <port_id> rss-hash",
  	.tokens = {
  		(void *)&cmd_showport_rss_hash_show,
-@@ -2939,5 +2926,4 @@ cmdline_parse_inst_t cmd_showport_rss_hash = {
+@@ -2851,5 +2838,4 @@ cmdline_parse_inst_t cmd_showport_rss_hash = {
  		(void *)&cmd_showport_rss_hash_port_id,
  		(void *)&cmd_showport_rss_hash_rss_hash,
 -		(void *)&cmd_showport_rss_hash_rss_hash_info,
  		NULL,
  	},
-@@ -2947,8 +2933,5 @@ cmdline_parse_inst_t cmd_showport_rss_hash_key = {
+@@ -2859,8 +2845,5 @@ cmdline_parse_inst_t cmd_showport_rss_hash_key = {
  	.f = cmd_showport_rss_hash_parsed,
  	.data = (void *)1,
 -	.help_str = "show port <port_id> rss-hash "
@@ -85,17 +86,17 @@
 +	.help_str = "show port <port_id> rss-hash key",
  	.tokens = {
  		(void *)&cmd_showport_rss_hash_show,
-@@ -2956,5 +2939,4 @@ cmdline_parse_inst_t cmd_showport_rss_hash_key = {
+@@ -2868,5 +2851,4 @@ cmdline_parse_inst_t cmd_showport_rss_hash_key = {
  		(void *)&cmd_showport_rss_hash_port_id,
  		(void *)&cmd_showport_rss_hash_rss_hash,
 -		(void *)&cmd_showport_rss_hash_rss_hash_info,
  		(void *)&cmd_showport_rss_hash_rss_key,
  		NULL,
 diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
-index 057457a81..5bd14bce0 100644
+index 21d5e4ae4..a08a4a5d9 100644
 --- a/app/test-pmd/config.c
 +++ b/app/test-pmd/config.c
-@@ -1680,7 +1680,7 @@ port_rss_reta_info(portid_t port_id,
+@@ -1929,7 +1929,7 @@ port_rss_reta_info(portid_t port_id,
   */
  void
 -port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key)
@@ -105,13 +106,13 @@
 +	struct rte_eth_rss_conf rss_conf = {0};
  	uint8_t rss_key[RSS_HASH_KEY_LENGTH];
  	uint64_t rss_hf;
-@@ -1693,5 +1693,4 @@ port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key)
+@@ -1942,5 +1942,4 @@ port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key)
  		return;
  
 -	memset(&dev_info, 0, sizeof(dev_info));
  	rte_eth_dev_info_get(port_id, &dev_info);
  	if (dev_info.hash_key_size > 0 &&
-@@ -1703,10 +1702,4 @@ port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key)
+@@ -1952,10 +1951,4 @@ port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key)
  	}
  
 -	rss_conf.rss_hf = 0;
@@ -123,10 +124,10 @@
  	/* Get RSS hash key if asked to display it */
  	rss_conf.rss_key = (show_rss_key) ? rss_key : NULL;
 diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
-index ae6a5bd4e..3cd4bbb3e 100644
+index a1f661472..150b9ae2c 100644
 --- a/app/test-pmd/testpmd.h
 +++ b/app/test-pmd/testpmd.h
-@@ -717,6 +717,5 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,
+@@ -709,6 +709,5 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,
  				uint64_t q_msk);
  
 -void port_rss_hash_conf_show(portid_t port_id, char rss_info[],
@@ -135,7 +136,7 @@
  void port_rss_hash_key_update(portid_t port_id, char rss_type[],
  			      uint8_t *hash_key, uint hash_key_len);
 diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
-index 3a73000a6..9ef2aca9b 100644
+index dde205a2b..c3e4005d6 100644
 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
 +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
 @@ -232,5 +232,5 @@ show port rss-hash


More information about the stable mailing list