From: Ciara Power Date: Mon, 19 Oct 2020 13:48:53 +0000 (+0200) Subject: distributor: check max SIMD bitwidth X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=eec67546aa4b4e5569d1e37f1e89a242a64f0062;p=dpdk.git distributor: 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: David Hunt --- diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c index ef34facba6..07e385a259 100644 --- a/lib/librte_distributor/rte_distributor.c +++ b/lib/librte_distributor/rte_distributor.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "rte_distributor.h" #include "rte_distributor_single.h" @@ -762,7 +763,8 @@ rte_distributor_create(const char *name, d->dist_match_fn = RTE_DIST_MATCH_SCALAR; #if defined(RTE_ARCH_X86) - d->dist_match_fn = RTE_DIST_MATCH_VECTOR; + if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) + d->dist_match_fn = RTE_DIST_MATCH_VECTOR; #endif /*