* [PATCH] app/testpmd: fix hash key update problem
@ 2025-04-01 7:48 Chaoyong He
0 siblings, 0 replies; only message in thread
From: Chaoyong He @ 2025-04-01 7:48 UTC (permalink / raw)
To: dev
Cc: oss-drivers, Chaoyong He, nelio.laranjeiro, stable, Long Wu, Peng Zhang
There has logic problem in 'port_rss_hash_key_update()', the user input
will be overwritten by the call to 'rte_eth_dev_rss_hash_conf_get()',
so the RSS functions will not get update as expected.
------
testpmd> show port 0 rss-hash key
RSS functions:
ipv4 ipv6
RSS key:
6D5A56DA255B0EC24167253D43A38FB0D0CA2BCBAE7B30B477CB2DA38030F20C6A42B7
3BBEAC01FA
testpmd> port config 0 rss-hash-key ipv6-tcp 6D5A56DA255B0EC24167253D
43A38FB0D0CA2BCBAE7B30B477CB2DA38030F20C6A42B73BBEAC01FA
testpmd> show port 0 rss-hash key
RSS functions:
ipv4 ipv6
RSS key:
6D5A56DA255B0EC24167253D43A38FB0D0CA2BCBAE7B30B477CB2DA38030F20C6A42B7
3BBEAC01FA
testpmd>
------
Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands")
Cc: nelio.laranjeiro@6wind.com
Cc: stable@dpdk.org
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
app/test-pmd/config.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e89af21cec..c32e011fa6 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4806,11 +4806,12 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
rss_conf.rss_key = NULL;
rss_conf.rss_key_len = 0;
- rss_conf.rss_hf = str_to_rsstypes(rss_type);
+ rss_conf.rss_hf = 0;
diag = rte_eth_dev_rss_hash_conf_get(port_id, &rss_conf);
if (diag == 0) {
rss_conf.rss_key = hash_key;
rss_conf.rss_key_len = hash_key_len;
+ rss_conf.rss_hf = str_to_rsstypes(rss_type);
diag = rte_eth_dev_rss_hash_update(port_id, &rss_conf);
}
if (diag == 0)
--
2.43.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-01 7:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-01 7:48 [PATCH] app/testpmd: fix hash key update problem Chaoyong He
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).