patch 'net/igc/base: fix data type in MAC hash' has been queued to stable release 23.11.4
Xueming Li
xuemingl at nvidia.com
Tue Feb 18 13:34:51 CET 2025
Hi,
FYI, your patch has been queued to stable release 23.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e5a7115f56331726dbfdc910e5b333ac8ff12c5a
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From e5a7115f56331726dbfdc910e5b333ac8ff12c5a Mon Sep 17 00:00:00 2001
From: Barbara Skobiej <barbara.skobiej at intel.com>
Date: Thu, 6 Feb 2025 16:08:35 +0000
Subject: [PATCH] net/igc/base: fix data type in MAC hash
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit cad5c51ec3a0e965d6d4bb98166890499597f23a ]
One of the bit shifts in MAC hash calculation triggers a static analysis
warning about a potential overflow. Fix the data type to avoid this.
Fixes: 8cb7c57d9b3c ("net/igc: support device initialization")
Signed-off-by: Barbara Skobiej <barbara.skobiej 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 | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/igc/base/igc_mac.c b/drivers/net/igc/base/igc_mac.c
index c69f8ac73b..cfb74a6443 100644
--- a/drivers/net/igc/base/igc_mac.c
+++ b/drivers/net/igc/base/igc_mac.c
@@ -539,8 +539,10 @@ u32 igc_hash_mc_addr_generic(struct igc_hw *hw, u8 *mc_addr)
break;
}
- hash_value = hash_mask & (((mc_addr[4] >> (8 - bit_shift)) |
- (((u16)mc_addr[5]) << bit_shift)));
+ hash_value = (u32)mc_addr[4];
+ hash_value = hash_value >> (8 - bit_shift);
+ hash_value |= (((u32)mc_addr[5]) << bit_shift);
+ hash_value &= hash_mask;
return hash_value;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-02-18 19:39:02.705312790 +0800
+++ 0056-net-igc-base-fix-data-type-in-MAC-hash.patch 2025-02-18 19:39:00.648244044 +0800
@@ -1 +1 @@
-From cad5c51ec3a0e965d6d4bb98166890499597f23a Mon Sep 17 00:00:00 2001
+From e5a7115f56331726dbfdc910e5b333ac8ff12c5a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit cad5c51ec3a0e965d6d4bb98166890499597f23a ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -16 +18 @@
- drivers/net/intel/igc/base/igc_mac.c | 6 ++++--
+ drivers/net/igc/base/igc_mac.c | 6 ++++--
@@ -19 +21 @@
-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
@@ -21,2 +23,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