patch 'net/ice/base: fix masking when reading context' has been queued to stable release 21.11.8

Kevin Traynor ktraynor at redhat.com
Fri Aug 23 18:18:39 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/9e978c32852e55b760329865d50bb8be44222e9d

Thanks.

Kevin

---
>From 9e978c32852e55b760329865d50bb8be44222e9d Mon Sep 17 00:00:00 2001
From: Yahui Cao <yahui.cao at intel.com>
Date: Wed, 26 Jun 2024 12:42:14 +0100
Subject: [PATCH] net/ice/base: fix masking when reading context

[ upstream commit 045ff68c49244d998933ef74a719b96db0e43988 ]

No need to invert mask since we only reserve the masked bits instead of
clear them.

Fixes: a03c714bfe0b ("net/ice/base: add two helper functions")

Signed-off-by: Yahui Cao <yahui.cao 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_common.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index c6fc32fbc6..49bbf3b461 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -4675,5 +4675,5 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
 	ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA);
 
-	dest_byte &= ~(mask);
+	dest_byte &= mask;
 
 	dest_byte >>= shift_width;
@@ -4715,5 +4715,5 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
 	 * correctly
 	 */
-	src_word &= ~(CPU_TO_LE16(mask));
+	src_word &= CPU_TO_LE16(mask);
 
 	/* get the data back into host order before shifting */
@@ -4766,5 +4766,5 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
 	 * correctly
 	 */
-	src_dword &= ~(CPU_TO_LE32(mask));
+	src_dword &= CPU_TO_LE32(mask);
 
 	/* get the data back into host order before shifting */
@@ -4817,5 +4817,5 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
 	 * correctly
 	 */
-	src_qword &= ~(CPU_TO_LE64(mask));
+	src_qword &= CPU_TO_LE64(mask);
 
 	/* get the data back into host order before shifting */
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.408228473 +0100
+++ 0091-net-ice-base-fix-masking-when-reading-context.patch	2024-08-23 17:18:09.791430353 +0100
@@ -1 +1 @@
-From 045ff68c49244d998933ef74a719b96db0e43988 Mon Sep 17 00:00:00 2001
+From 9e978c32852e55b760329865d50bb8be44222e9d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 045ff68c49244d998933ef74a719b96db0e43988 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index c14f66d55b..9a9c8f86e5 100644
+index c6fc32fbc6..49bbf3b461 100644
@@ -23,2 +24,2 @@
-@@ -5015,5 +5015,5 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
- 	ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_NONDMA_TO_NONDMA);
+@@ -4675,5 +4675,5 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
+ 	ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA);
@@ -30 +31 @@
-@@ -5055,5 +5055,5 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4715,5 +4715,5 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
@@ -37 +38 @@
-@@ -5106,5 +5106,5 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4766,5 +4766,5 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
@@ -44 +45 @@
-@@ -5157,5 +5157,5 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4817,5 +4817,5 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)



More information about the stable mailing list