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

Xueming Li xuemingl at nvidia.com
Tue Jun 21 10:01:30 CEST 2022


Hi,

FYI, your patch has been queued to stable release 20.11.6

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

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5e7c16ee766246345f034695536598baa0b0c739

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 5e7c16ee766246345f034695536598baa0b0c739 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 d7bc0f0875..5fc759d3e8 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3597,13 +3597,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.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.431908924 +0800
+++ 0024-net-bonding-fix-RSS-key-config-with-extended-key-len.patch	2022-06-21 15:37:49.001117789 +0800
@@ -1 +1 @@
-From 94d9c7d45b43fd44af718b621fa52e556028aa3d Mon Sep 17 00:00:00 2001
+From 5e7c16ee766246345f034695536598baa0b0c739 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 94d9c7d45b43fd44af718b621fa52e556028aa3d ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index b305b6a35b..5cbe89031b 100644
+index d7bc0f0875..5fc759d3e8 100644
@@ -26 +28 @@
-@@ -3617,13 +3617,18 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3597,13 +3597,18 @@ bond_ethdev_configure(struct rte_eth_dev *dev)


More information about the stable mailing list