patch 'hash: fix unaligned access for CRC' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Mar 19 11:02:07 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/23/26. 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/fdd757503bcb05ec4d4f3ef5b888852ca145f095
Thanks.
Kevin
---
>From fdd757503bcb05ec4d4f3ef5b888852ca145f095 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau at intel.com>
Date: Fri, 27 Feb 2026 13:59:32 +0000
Subject: [PATCH] hash: fix unaligned access for CRC
[ upstream commit 112c07c62a885c826d316d84d6e540fdc7860c41 ]
rte_hash_crc assumes input pointer address is 8 byte aligned
which may not be always the case.
This fix aligns the input pointer before proceeding to process it
in 8 byte chunks.
Bugzilla ID: 1892
Fixes: af75078fece3 ("first public release")
Signed-off-by: Radu Nicolau <radu.nicolau at intel.com>
Acked-by: Marat Khalili <marat.khalili at huawei.com>
Tested-by: Marat Khalili <marat.khalili at huawei.com>
---
lib/hash/rte_hash_crc.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/hash/rte_hash_crc.h b/lib/hash/rte_hash_crc.h
index fa07c97685..f60f4598d8 100644
--- a/lib/hash/rte_hash_crc.h
+++ b/lib/hash/rte_hash_crc.h
@@ -128,4 +128,14 @@ rte_hash_crc(const void *data, uint32_t data_len, uint32_t init_val)
uintptr_t pd = (uintptr_t) data;
+ /* align input to 8 byte boundary if needed */
+ if (pd & 0x7) {
+ unsigned int unaligned_bytes = RTE_MIN(8 - (pd & 0x7), data_len);
+ for (i = 0; i < unaligned_bytes; i++) {
+ init_val = rte_hash_crc_1byte(*(const uint8_t *)pd, init_val);
+ pd++;
+ data_len--;
+ }
+ }
+
for (i = 0; i < data_len / 8; i++) {
init_val = rte_hash_crc_8byte(*(const uint64_t *)pd, init_val);
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-03-19 10:01:07.398266750 +0000
+++ 0009-hash-fix-unaligned-access-for-CRC.patch 2026-03-19 10:01:07.062381337 +0000
@@ -1 +1 @@
-From 112c07c62a885c826d316d84d6e540fdc7860c41 Mon Sep 17 00:00:00 2001
+From fdd757503bcb05ec4d4f3ef5b888852ca145f095 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 112c07c62a885c826d316d84d6e540fdc7860c41 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list