patch 'net/ice/base: fix sign extension' has been queued to stable release 21.11.8
Kevin Traynor
ktraynor at redhat.com
Fri Aug 23 18:18:32 CEST 2024
Hi,
FYI, your patch has been queued to stable release 21.11.8
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. 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/ae432145def90264490e3ba13f827372562346d2
Thanks.
Kevin
---
>From ae432145def90264490e3ba13f827372562346d2 Mon Sep 17 00:00:00 2001
From: Jesse Brandeburg <jesse.brandeburg at intel.com>
Date: Wed, 26 Jun 2024 12:41:03 +0100
Subject: [PATCH] net/ice/base: fix sign extension
[ upstream commit 4fe3f901f86243bf2dc5925e870030995f229888 ]
Fix a static analysis warning where if the 16-bit value in mask has the
high-bit set, it will be sign extended by the shift left (which converts
it to a signed integer). Avoid this by casting to a u32 to make sure the
conversion happens before the shift and that it stays unsigned.
Fixes: 9467486f179f ("net/ice/base: enable masking for RSS and FD field vectors")
Signed-off-by: Jesse Brandeburg <jesse.brandeburg at intel.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
drivers/net/ice/base/ice_flex_pipe.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index 3918169001..d1a1503631 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -3369,7 +3369,6 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,
case ICE_BLK_RSS:
offset = GLQF_HMASK(mask_idx);
- val = (idx << GLQF_HMASK_MSK_INDEX_S) &
- GLQF_HMASK_MSK_INDEX_M;
- val |= (mask << GLQF_HMASK_MASK_S) & GLQF_HMASK_MASK_M;
+ val = (idx << GLQF_HMASK_MSK_INDEX_S) & GLQF_HMASK_MSK_INDEX_M;
+ val |= ((u32)mask << GLQF_HMASK_MASK_S) & GLQF_HMASK_MASK_M;
break;
case ICE_BLK_FD:
@@ -3377,6 +3376,5 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,
val = (idx << GLQF_FDMASK_MSK_INDEX_S) &
GLQF_FDMASK_MSK_INDEX_M;
- val |= (mask << GLQF_FDMASK_MASK_S) &
- GLQF_FDMASK_MASK_M;
+ val |= ((u32)mask << GLQF_FDMASK_MASK_S) & GLQF_FDMASK_MASK_M;
break;
default:
--
2.46.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-08-23 17:18:12.223417612 +0100
+++ 0084-net-ice-base-fix-sign-extension.patch 2024-08-23 17:18:09.764430259 +0100
@@ -1 +1 @@
-From 4fe3f901f86243bf2dc5925e870030995f229888 Mon Sep 17 00:00:00 2001
+From ae432145def90264490e3ba13f827372562346d2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4fe3f901f86243bf2dc5925e870030995f229888 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index e06dbb0885..413b6f8ece 100644
+index 3918169001..d1a1503631 100644
@@ -25 +26 @@
-@@ -1535,7 +1535,6 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,
+@@ -3369,7 +3369,6 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,
@@ -35 +36 @@
-@@ -1543,6 +1542,5 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,
+@@ -3377,6 +3376,5 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,
More information about the stable
mailing list