test: skip hash tests from other CPU
PATCH 1/1 test: skip hash tests from other CPU
When running hash tests there are lots of warnings about unsupported CRC32 algorithm requested. This because on x86 it is requesting ARM algorithm and vice/versa. The fallback is already tested elsewhere, so can be skipped.
--- app/test/test_hash.c | 4 ++++ 1 file changed, 4 insertions(+)
app/test/test_hash.c +4 -0
@@ -211,6 +211,7 @@ test_crc32_hash_alg_equiv(void)rte_hash_crc_set_alg (CRC32_SW ); hash_val =rte_hash_crc (data64, data_len, init_val); +#ifdef RTE_ARCH_X86 /* Check against 4-byte-operand sse4.2 CRC32 if available */ rte_hash_crc_set_alg (CRC32_SSE42 );if (hash_val !=rte_hash_crc (data64, data_len, init_val)) {
@@ -224,13 +225,16 @@ test_crc32_hash_alg_equiv(void)printf ("Failed checking CRC32_SW against CRC32_SSE42_x64\n" ); break; } +#endif +#if defined(RTE_ARCH_ARM64 ) && defined(__ARM_FEATURE_CRC32)/* Check against 8-byte-operand ARM64 CRC32 if available */ rte_hash_crc_set_alg (CRC32_ARM64 );if (hash_val !=rte_hash_crc (data64, data_len, init_val)) {printf ("Failed checking CRC32_SW against CRC32_ARM64\n" );break ; } +#endif }/* Resetting to best available algorithm */
Signature · 1 line
2.51.0
PATCH v2 1/1 test: skip hash tests from other CPU
When running hash tests there are lots of warnings about unsupported CRC32 algorithm requested. This because on x86 it is requesting ARM algorithm and vice/versa. The fallback is already tested elsewhere, so can be skipped.
--- app/test/test_hash.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
app/test/test_hash.c +8 -1
@@ -191,6 +191,7 @@ static struct rte_hash_parameters ut_params = {static int test_crc32_hash_alg_equiv (void ) { +#if defined(RTE_ARCH_ARM64 ) || defined(RTE_ARCH_X86 )uint32_t hash_val;uint32_t init_val;uint64_t data64[CRC32_DWORDS ];
@@ -211,6 +212,7 @@ test_crc32_hash_alg_equiv(void)rte_hash_crc_set_alg (CRC32_SW ); hash_val =rte_hash_crc (data64, data_len, init_val); +#ifdef RTE_ARCH_X86 /* Check against 4-byte-operand sse4.2 CRC32 if available */ rte_hash_crc_set_alg (CRC32_SSE42 );if (hash_val !=rte_hash_crc (data64, data_len, init_val)) {
@@ -224,13 +226,14 @@ test_crc32_hash_alg_equiv(void)printf ("Failed checking CRC32_SW against CRC32_SSE42_x64\n" ); break; } - +#elif defined(RTE_ARCH_ARM64)/* Check against 8-byte-operand ARM64 CRC32 if available */ rte_hash_crc_set_alg (CRC32_ARM64 );if (hash_val !=rte_hash_crc (data64, data_len, init_val)) {printf ("Failed checking CRC32_SW against CRC32_ARM64\n" );break ; } +#endif }/* Resetting to best available algorithm */
@@ -245,6 +248,10 @@ test_crc32_hash_alg_equiv(void) ((j+1) % 16 == 0 || j == data_len - 1) ? '\n' : ' ');return -1 ; +#else +/* No alternate algorithms on this platform */ +return 0 ; +#endif }/*
Signature · 1 line
2.51.0
Quoted 7 lines · On Fri, 5 Dec 2025 13:36:46 -0800 Stephen Hemminger…
When running hash tests there are lots of warnings about unsupported CRC32 algorithm requested. This because on x86 it is requesting ARM algorithm and vice/versa. The fallback is already tested elsewhere, so can be skipped.
Signed-off-by Stephen Hemminger <[email protected]>---
Recheck-request: iol-unit-amd64-testing