patch 'net/ice/base: fix masking when reading context' has been queued to stable release 22.11.6
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jul 15 17:26:32 CEST 2024
Hi,
FYI, your patch has been queued to stable release 22.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 07/17/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e804d4471528425931bd578192ab115780a3ecd6
Thanks.
Luca Boccassi
---
>From e804d4471528425931bd578192ab115780a3ecd6 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 ac67411ebd..92a520daf2 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -4819,7 +4819,7 @@ 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;
@@ -4859,7 +4859,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
/* the data in the memory is stored as little endian so mask it
* correctly
*/
- src_word &= ~(CPU_TO_LE16(mask));
+ src_word &= CPU_TO_LE16(mask);
/* get the data back into host order before shifting */
dest_word = LE16_TO_CPU(src_word);
@@ -4910,7 +4910,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
/* the data in the memory is stored as little endian so mask it
* correctly
*/
- src_dword &= ~(CPU_TO_LE32(mask));
+ src_dword &= CPU_TO_LE32(mask);
/* get the data back into host order before shifting */
dest_dword = LE32_TO_CPU(src_dword);
@@ -4961,7 +4961,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
/* the data in the memory is stored as little endian so mask it
* correctly
*/
- src_qword &= ~(CPU_TO_LE64(mask));
+ src_qword &= CPU_TO_LE64(mask);
/* get the data back into host order before shifting */
dest_qword = LE64_TO_CPU(src_qword);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.350738786 +0100
+++ 0054-net-ice-base-fix-masking-when-reading-context.patch 2024-07-15 16:19:34.624207659 +0100
@@ -1 +1 @@
-From 045ff68c49244d998933ef74a719b96db0e43988 Mon Sep 17 00:00:00 2001
+From e804d4471528425931bd578192ab115780a3ecd6 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 ac67411ebd..92a520daf2 100644
@@ -23 +24 @@
-@@ -5014,7 +5014,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4819,7 +4819,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
@@ -25 +26 @@
- ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_NONDMA_TO_NONDMA);
+ ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA);
@@ -32 +33 @@
-@@ -5054,7 +5054,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4859,7 +4859,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
@@ -41 +42 @@
-@@ -5105,7 +5105,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4910,7 +4910,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
@@ -50 +51 @@
-@@ -5156,7 +5156,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4961,7 +4961,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
More information about the stable
mailing list