patch 'net/igc/base: fix MAC address hash bit shift' has been queued to stable release 24.11.2

Kevin Traynor ktraynor at redhat.com
Thu Feb 13 10:58:53 CET 2025


Hi,

FYI, your patch has been queued to stable release 24.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 02/17/25. 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/4e2a4f3e7c6ae7510829ce54884d98e3c3c0cbe1

Thanks.

Kevin

---
>From 4e2a4f3e7c6ae7510829ce54884d98e3c3c0cbe1 Mon Sep 17 00:00:00 2001
From: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
Date: Thu, 6 Feb 2025 16:08:34 +0000
Subject: [PATCH] net/igc/base: fix MAC address hash bit shift

[ upstream commit bccccacfb6f6f2e84a24c6733c7e3d4af05f73b5 ]

In e1000_hash_mc_addr_generic() the expression:

"mc_addr[4] >> 8 - bit_shift", right shifting "mc_addr[4]"

shift by more than 7 bits always yields zero, so hash becomes not so
different. Add initialization with bit_shift = 1, and add a loop
condition to ensure bit_shift will be always in [1..8] range.

Fixes: 8cb7c57d9b3c ("net/igc: support device initialization")

Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/igc/base/igc_mac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/igc/base/igc_mac.c b/drivers/net/igc/base/igc_mac.c
index 3cd6506e5e..c69f8ac73b 100644
--- a/drivers/net/igc/base/igc_mac.c
+++ b/drivers/net/igc/base/igc_mac.c
@@ -487,5 +487,5 @@ u32 igc_hash_mc_addr_generic(struct igc_hw *hw, u8 *mc_addr)
 {
 	u32 hash_value, hash_mask;
-	u8 bit_shift = 0;
+	u8 bit_shift = 1;
 
 	DEBUGFUNC("igc_hash_mc_addr_generic");
@@ -497,5 +497,5 @@ u32 igc_hash_mc_addr_generic(struct igc_hw *hw, u8 *mc_addr)
 	 * where 0xFF would still fall within the hash mask.
 	 */
-	while (hash_mask >> bit_shift != 0xFF)
+	while (hash_mask >> bit_shift != 0xFF && bit_shift < 4)
 		bit_shift++;
 
-- 
2.48.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-02-12 17:29:43.792290417 +0000
+++ 0086-net-igc-base-fix-MAC-address-hash-bit-shift.patch	2025-02-12 17:29:34.538947051 +0000
@@ -1 +1 @@
-From bccccacfb6f6f2e84a24c6733c7e3d4af05f73b5 Mon Sep 17 00:00:00 2001
+From 4e2a4f3e7c6ae7510829ce54884d98e3c3c0cbe1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bccccacfb6f6f2e84a24c6733c7e3d4af05f73b5 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
- drivers/net/intel/igc/base/igc_mac.c | 4 ++--
+ drivers/net/igc/base/igc_mac.c | 4 ++--
@@ -24 +25 @@
-diff --git a/drivers/net/intel/igc/base/igc_mac.c b/drivers/net/intel/igc/base/igc_mac.c
+diff --git a/drivers/net/igc/base/igc_mac.c b/drivers/net/igc/base/igc_mac.c
@@ -26,2 +27,2 @@
---- a/drivers/net/intel/igc/base/igc_mac.c
-+++ b/drivers/net/intel/igc/base/igc_mac.c
+--- a/drivers/net/igc/base/igc_mac.c
++++ b/drivers/net/igc/base/igc_mac.c



More information about the stable mailing list