[dpdk-dev,2/3] app/testpmd: fix RSS structure initialisation

Message ID 441cee59d3e6f9d1af231ea0a770a2fb316a2e7a.1508750504.git.nelio.laranjeiro@6wind.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Nélio Laranjeiro Oct. 23, 2017, 9:45 a.m. UTC
  Struct rss_conf.rss_key_len is not initialised forcing the user to verify
the rss_conf.rss_key pointer to know if the key is present or not.
rss_conf.rss_key_len should have a valid length according to the size of
the rss_key pointed.

Fixes: 560e02ee5237 ("app/testpmd: configure RSS without restart")
Cc: ivan.boule@6wind.com
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index bb01e989a..7002ff2c1 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1750,7 +1750,7 @@  cmd_config_rss_parsed(void *parsed_result,
 			__attribute__((unused)) void *data)
 {
 	struct cmd_config_rss *res = parsed_result;
-	struct rte_eth_rss_conf rss_conf;
+	struct rte_eth_rss_conf rss_conf = { .rss_key_len = 0, };
 	int diag;
 	uint8_t i;