From 1e314891340d9b964f2da975936974b09912c225 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Fri, 9 Jul 2021 15:58:24 +0000 Subject: dpcls-avx512: Enable avx512 vector popcount instruction. This commit enables the AVX512-VPOPCNTDQ Vector Popcount instruction. This instruction is not available on every CPU that supports the AVX512-F Foundation ISA, hence it is enabled only when the additional VPOPCNTDQ ISA check is passed. The vector popcount instruction is used instead of the AVX512 popcount emulation code present in the avx512 optimized DPCLS today. It provides higher performance in the SIMD miniflow processing as that requires the popcount to calculate the miniflow block indexes. Signed-off-by: Harry van Haaren Acked-by: Flavio Leitner Signed-off-by: Ian Stokes --- lib/dpdk.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/dpdk.c') diff --git a/lib/dpdk.c b/lib/dpdk.c index 8807de54a..9de2af58e 100644 --- a/lib/dpdk.c +++ b/lib/dpdk.c @@ -706,6 +706,7 @@ dpdk_get_cpu_has_isa(const char *arch, const char *feature) #if __x86_64__ /* CPU flags only defined for the architecture that support it. */ CHECK_CPU_FEATURE(feature, "avx512f", RTE_CPUFLAG_AVX512F); + CHECK_CPU_FEATURE(feature, "avx512vpopcntdq", RTE_CPUFLAG_AVX512VPOPCNTDQ); CHECK_CPU_FEATURE(feature, "bmi2", RTE_CPUFLAG_BMI2); #endif -- cgit v1.2.1