From: Ciara Power Date: Mon, 19 Oct 2020 13:48:54 +0000 (+0200) Subject: member: check max SIMD bitwidth X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c9cd5806f7835e73748c6bbb9cedcda63c797302;p=dpdk.git member: check max SIMD bitwidth When choosing a vector path to take, an extra condition must be satisfied to ensure the max SIMD bitwidth allows for the CPU enabled path. Signed-off-by: Ciara Power Acked-by: Yipeng Wang --- diff --git a/lib/librte_member/rte_member_ht.c b/lib/librte_member/rte_member_ht.c index 3ea293a094..a85561b472 100644 --- a/lib/librte_member/rte_member_ht.c +++ b/lib/librte_member/rte_member_ht.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "rte_member.h" #include "rte_member_ht.h" @@ -113,7 +114,8 @@ rte_member_create_ht(struct rte_member_setsum *ss, } #if defined(RTE_ARCH_X86) if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) && - RTE_MEMBER_BUCKET_ENTRIES == 16) + RTE_MEMBER_BUCKET_ENTRIES == 16 && + rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256) ss->sig_cmp_fn = RTE_MEMBER_COMPARE_AVX2; else #endif