* [PATCH] fib6: add runtime checks for vector lookup
@ 2024-10-08 17:31 Vladimir Medvedkin
0 siblings, 0 replies; only message in thread
From: Vladimir Medvedkin @ 2024-10-08 17:31 UTC (permalink / raw)
To: dev; +Cc: david.marchand, stable
AVX512 lookup function requires CPU to support RTE_CPUFLAG_AVX512DQ and
RTE_CPUFLAG_AVX512BW. Add runtime checks of these two flags when deciding
if vector function can be used.
Fixes: c3e12e0f0354 ("fib: add dataplane algorithm for IPv6")
Cc: stable@dpdk.org
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
lib/fib/trie.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/fib/trie.c b/lib/fib/trie.c
index 09470e7287..805e21d090 100644
--- a/lib/fib/trie.c
+++ b/lib/fib/trie.c
@@ -47,6 +47,8 @@ get_vector_fn(enum rte_fib_trie_nh_sz nh_sz)
{
#ifdef CC_TRIE_AVX512_SUPPORT
if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) <= 0) ||
+ (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512DQ) <= 0) ||
+ (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512BW) <= 0) ||
(rte_vect_get_max_simd_bitwidth() < RTE_VECT_SIMD_512))
return NULL;
switch (nh_sz) {
--
2.34.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-08 17:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-08 17:31 [PATCH] fib6: add runtime checks for vector lookup Vladimir Medvedkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).