[PATCH v5 3/7] hash: remove spurious warnings in CRC32 init
Stephen Hemminger
stephen at networkplumber.org
Fri Jan 30 21:21:53 CET 2026
The warnings in rte_hash_crc_set_alg() were misleading - they fired
when requesting a valid algorithm that would actually be used.
For example, requesting CRC32_SSE42 would trigger a warning even
though SSE4.2 instructions would be used successfully.
Remove the spurious warnings and only warn when the requested
algorithm is truly unavailable and falling back to software CRC.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
lib/hash/rte_hash_crc.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/lib/hash/rte_hash_crc.c b/lib/hash/rte_hash_crc.c
index 9fe90d6425..2e552331f5 100644
--- a/lib/hash/rte_hash_crc.c
+++ b/lib/hash/rte_hash_crc.c
@@ -38,9 +38,6 @@ rte_hash_crc_set_alg(uint8_t alg)
return;
#if defined RTE_ARCH_X86
- if (!(alg & CRC32_SSE42_x64))
- HASH_CRC_LOG(WARNING,
- "Unsupported CRC32 algorithm requested using CRC32_x64/CRC32_SSE42");
if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T) || alg == CRC32_SSE42)
rte_hash_crc32_alg = CRC32_SSE42;
else
@@ -48,16 +45,13 @@ rte_hash_crc_set_alg(uint8_t alg)
#endif
#if defined RTE_ARCH_ARM64
- if (!(alg & CRC32_ARM64))
- HASH_CRC_LOG(WARNING,
- "Unsupported CRC32 algorithm requested using CRC32_ARM64");
if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32))
rte_hash_crc32_alg = CRC32_ARM64;
#endif
if (rte_hash_crc32_alg == CRC32_SW)
HASH_CRC_LOG(WARNING,
- "Unsupported CRC32 algorithm requested using CRC32_SW");
+ "Unsupported CRC32 algorithm requested, using CRC32_SW");
}
/* Setting the best available algorithm */
--
2.51.0
More information about the dev
mailing list