patch 'net/bonding: fix RSS key config with extended key length' has been queued to stable release 21.11.2
Kevin Traynor
ktraynor at redhat.com
Wed May 25 18:27:56 CEST 2022
Hi,
FYI, your patch has been queued to stable release 21.11.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/30/22. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8cf194f699b1476a8a2630cbf1e7e7a812e4dd0b
Thanks.
Kevin
---
>From 8cf194f699b1476a8a2630cbf1e7e7a812e4dd0b Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang at intel.com>
Date: Mon, 11 Apr 2022 05:40:03 +0000
Subject: [PATCH] net/bonding: fix RSS key config with extended key length
[ upstream commit 94d9c7d45b43fd44af718b621fa52e556028aa3d ]
When creating a bonding device, if the slave device's
RSS key length = standard_rss_key length + extended_hash_key length,
then bonding device will be same as slave,
in function bond_ethdev_configure(), the default_rss_key length is 40,
it is not matched, so it should calculate a new key for bonding device
if the default key could not be used.
Fixes: 6b1a001ec546 ("net/bonding: fix RSS key length")
Signed-off-by: Ke Zhang <ke1x.zhang at intel.com>
Acked-by: Min Hu (Connor) <humin29 at huawei.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 58dad0a0e3..e8a9341777 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3617,11 +3617,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
} else {
if (internals->rss_key_len > sizeof(default_rss_key)) {
- RTE_BOND_LOG(ERR,
- "There is no suitable default hash key");
- return -EINVAL;
+ /*
+ * If the rss_key includes standard_rss_key and
+ * extended_hash_key, the rss key length will be
+ * larger than default rss key length, so it should
+ * re-calculate the hash key.
+ */
+ for (i = 0; i < internals->rss_key_len; i++)
+ internals->rss_key[i] = (uint8_t)rte_rand();
+ } else {
+ memcpy(internals->rss_key, default_rss_key,
+ internals->rss_key_len);
}
-
- memcpy(internals->rss_key, default_rss_key,
- internals->rss_key_len);
}
--
2.34.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-05-25 17:26:58.744395694 +0100
+++ 0004-net-bonding-fix-RSS-key-config-with-extended-key-len.patch 2022-05-25 17:26:58.534828283 +0100
@@ -1 +1 @@
-From 94d9c7d45b43fd44af718b621fa52e556028aa3d Mon Sep 17 00:00:00 2001
+From 8cf194f699b1476a8a2630cbf1e7e7a812e4dd0b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 94d9c7d45b43fd44af718b621fa52e556028aa3d ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index b305b6a35b..5cbe89031b 100644
+index 58dad0a0e3..e8a9341777 100644
@@ -26 +27 @@
-@@ -3618,11 +3618,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3617,11 +3617,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
More information about the stable
mailing list