patch 'net/bonding: fix RSS key config with extended key length' has been queued to stable release 19.11.13

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Thu Jul 7 09:54:10 CEST 2022


Hi,

FYI, your patch has been queued to stable release 19.11.13

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/09/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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/b1355507e2197eff20d646146f4236f7e5b0cb11

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From b1355507e2197eff20d646146f4236f7e5b0cb11 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 5b1507e817..2c55621740 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3577,13 +3577,18 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 			       internals->rss_key_len);
 		} 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);
 		}
 
 		for (i = 0; i < RTE_DIM(internals->reta_conf); i++) {
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.842701445 +0200
+++ 0015-net-bonding-fix-RSS-key-config-with-extended-key-len.patch	2022-07-07 09:54:10.813823679 +0200
@@ -1 +1 @@
-From 94d9c7d45b43fd44af718b621fa52e556028aa3d Mon Sep 17 00:00:00 2001
+From b1355507e2197eff20d646146f4236f7e5b0cb11 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 5b1507e817..2c55621740 100644
@@ -26 +27 @@
-@@ -3617,13 +3617,18 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3577,13 +3577,18 @@ bond_ethdev_configure(struct rte_eth_dev *dev)


More information about the stable mailing list