diff options
Diffstat (limited to 'lib/dpif-netdev-avx512.c')
-rw-r--r-- | lib/dpif-netdev-avx512.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/dpif-netdev-avx512.c b/lib/dpif-netdev-avx512.c index f59c1bbe0..1ae66ca6c 100644 --- a/lib/dpif-netdev-avx512.c +++ b/lib/dpif-netdev-avx512.c @@ -24,6 +24,7 @@ #include "dpif-netdev-perf.h" #include "dpif-netdev-private.h" +#include <errno.h> #include <immintrin.h> #include "dp-packet.h" @@ -58,6 +59,19 @@ struct dpif_userdata { }; int32_t +dp_netdev_input_outer_avx512_probe(void) +{ + bool avx512f_available = dpdk_get_cpu_has_isa("x86_64", "avx512f"); + bool bmi2_available = dpdk_get_cpu_has_isa("x86_64", "bmi2"); + + if (!avx512f_available || !bmi2_available) { + return -ENOTSUP; + } + + return 0; +} + +int32_t dp_netdev_input_outer_avx512(struct dp_netdev_pmd_thread *pmd, struct dp_packet_batch *packets, odp_port_t in_port) |