patch 'app/testpmd: fix RSS key length' has been queued to stable release 19.11.11
christian.ehrhardt at canonical.com
christian.ehrhardt at canonical.com
Tue Nov 30 17:35:15 CET 2021
Hi,
FYI, your patch has been queued to stable release 19.11.11
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. 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. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/cpaelzer/dpdk-stable-queue
This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/54e71837915480bef69fa2ab16241f40f2ce90f0
Thanks.
Christian Ehrhardt <christian.ehrhardt at canonical.com>
---
>From 54e71837915480bef69fa2ab16241f40f2ce90f0 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin at redhat.com>
Date: Wed, 27 Oct 2021 16:22:10 +0200
Subject: [PATCH] app/testpmd: fix RSS key length
[ upstream commit 8e1d0547d6ed6a28c5c80c832f7b259518b89735 ]
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")
Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Acked-by: Xiaoyun Li <xiaoyun.li at intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia at intel.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 bee9fa6dcf..a693960785 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2145,7 +2145,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
unsigned int i;
rss_conf.rss_key = NULL;
- rss_conf.rss_key_len = hash_key_len;
+ rss_conf.rss_key_len = 0;
rss_conf.rss_hf = 0;
for (i = 0; rss_type_table[i].str; i++) {
if (!strcmp(rss_type_table[i].str, rss_type))
@@ -2154,6 +2154,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
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;
diag = rte_eth_dev_rss_hash_update(port_id, &rss_conf);
}
if (diag == 0)
--
2.34.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-30 16:50:12.265332822 +0100
+++ 0111-app-testpmd-fix-RSS-key-length.patch 2021-11-30 16:50:05.918874469 +0100
@@ -1 +1 @@
-From 8e1d0547d6ed6a28c5c80c832f7b259518b89735 Mon Sep 17 00:00:00 2001
+From 54e71837915480bef69fa2ab16241f40f2ce90f0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8e1d0547d6ed6a28c5c80c832f7b259518b89735 ]
+
@@ -22 +23,0 @@
-Cc: stable at dpdk.org
@@ -32 +33 @@
-index 3b97164302..dde6cdcff1 100644
+index bee9fa6dcf..a693960785 100644
@@ -35 +36 @@
-@@ -3042,7 +3042,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
+@@ -2145,7 +2145,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
@@ -44 +45 @@
-@@ -3051,6 +3051,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
+@@ -2154,6 +2154,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
More information about the stable
mailing list