From 80dfbfd6de3268adb5a0c10d5f03cb495c224cb2 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Wed, 27 May 2026 11:46:45 +0200 Subject: [PATCH] Be more clear when GFNI is really used --- raid/test/fulltest.c | 14 +++++++++----- raid/test/speedtest.c | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/raid/test/fulltest.c b/raid/test/fulltest.c index b2e5cdd3..e4c521a2 100644 --- a/raid/test/fulltest.c +++ b/raid/test/fulltest.c @@ -32,15 +32,19 @@ int main(void) #ifdef CONFIG_X86 if (raid_cpu_has_sse2()) - printf("Including x86 SSE2 functions\n"); + printf("Including x86 SSE2\n"); if (raid_cpu_has_ssse3()) - printf("Including x86 SSSE3 functions\n"); + printf("Including x86 SSSE3\n"); if (raid_cpu_has_avx2()) - printf("Including x86 AVX2 functions\n"); + printf("Including x86 AVX2\n"); if (raid_cpu_has_avx512bw()) - printf("Including x86 AVX512BW functions\n"); + printf("Including x86 AVX512BW\n"); if (raid_cpu_has_avx512gfni()) - printf("Including x86 AVX512GFNI functions\n"); +#ifdef USE_RAID_AES + printf("Including x86 AVX512GFNI\n"); +#else + printf("Excluding x86 AVX512GFNI due polynomial mismatch\n"); +#endif #endif #ifdef CONFIG_X86_64 printf("Including x64 extended SSE register set\n"); diff --git a/raid/test/speedtest.c b/raid/test/speedtest.c index c17e70ce..1b7e51f7 100644 --- a/raid/test/speedtest.c +++ b/raid/test/speedtest.c @@ -1123,15 +1123,19 @@ int main(void) #ifdef CONFIG_X86 if (raid_cpu_has_sse2()) - printf("Including x86 SSE2 functions\n"); + printf("Including x86 SSE2\n"); if (raid_cpu_has_ssse3()) - printf("Including x86 SSSE3 functions\n"); + printf("Including x86 SSSE3\n"); if (raid_cpu_has_avx2()) - printf("Including x86 AVX2 functions\n"); + printf("Including x86 AVX2\n"); if (raid_cpu_has_avx512bw()) - printf("Including x86 AVX512BW functions\n"); + printf("Including x86 AVX512BW\n"); if (raid_cpu_has_avx512gfni()) - printf("Including x86 AVX512GFNI functions\n"); +#ifdef USE_RAID_AES + printf("Including x86 AVX512GFNI\n"); +#else + printf("Including x86 AVX512GFNI (Performance reference only. Polynomial mismatch prevents use)\n"); +#endif #endif #ifdef CONFIG_X86_64 printf("Including x64 extended SSE register set\n");