app/testpmd: fix RSS structure initialisation

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: 560e02ee52 ("app/testpmd: configure RSS without restart")
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
This commit is contained in:
Nélio Laranjeiro 2017-10-23 13:17:56 +02:00 committed by Ferruh Yigit
parent 643456761d
commit f3fb0e4625

View File

@ -1845,7 +1845,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;