[PATCH] hash: fix build error due to missing include

Bruce Richardson bruce.richardson at intel.com
Wed Sep 24 17:48:21 CEST 2025


The file "rte_thash.c" uses the rte_cpu_get_flag_enabled() API but does
not include "rte_cpuflags.h". Add the include to fix build issues this
causes:

../lib/hash/rte_thash.c: In function ‘rte_thash_gfni_supported’:
../lib/hash/rte_thash.c:79:13: error: implicit declaration of function
‘rte_cpu_get_flag_enabled’ [-Wimplicit-function-declaration]
   79 |         if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_GFNI) &&
         |             ^~~~~~~~~~~~~~~~~~~~~~~~

Fixes: d8f0f514428e ("eal/x86: remove useless include from spinlock header")

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 lib/hash/rte_thash.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c
index 0f9ed20d0d..fcd41248b9 100644
--- a/lib/hash/rte_thash.c
+++ b/lib/hash/rte_thash.c
@@ -14,6 +14,7 @@
 #include <rte_eal_memconfig.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
+#include <rte_cpuflags.h>
 
 RTE_LOG_REGISTER_SUFFIX(thash_logtype, thash, INFO);
 #define RTE_LOGTYPE_HASH thash_logtype
-- 
2.48.1



More information about the dev mailing list