]> git.droids-corp.org - dpdk.git/commit
app/testpmd: fix RSS key length
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Wed, 27 Oct 2021 14:22:10 +0000 (16:22 +0200)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 29 Oct 2021 09:23:10 +0000 (11:23 +0200)
commit8e1d0547d6ed6a28c5c80c832f7b259518b89735
tree1363d69f1f379b620aed95e8918ea76fb52f1864
parent0c9d662070547189b65a532d6318de6d793e3155
app/testpmd: fix RSS key length

port_rss_hash_key_update() initializes rss_conf with the
RSS key configuration provided  by the user, but it calls
rte_eth_dev_rss_hash_conf_get() before calling
rte_eth_dev_rss_hash_update(), which overrides the parsed
RSS config.

While the RSS key value is set again after, this is not
the case of the key length. It could cause out of bounds
access if the key length parsed is smaller than the one
read from rte_eth_dev_rss_hash_conf_get().

This patch restores the key length before the
rte_eth_dev_rss_hash_update() call to ensure the RSS key
value/length pair is consistent.

Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
app/test-pmd/config.c