aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/crypto_ipsecmb/ipsecmb.c2
-rw-r--r--src/vppinfra/cpu.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/crypto_ipsecmb/ipsecmb.c b/src/plugins/crypto_ipsecmb/ipsecmb.c
index 3ceda1e3f9d..02e13456704 100644
--- a/src/plugins/crypto_ipsecmb/ipsecmb.c
+++ b/src/plugins/crypto_ipsecmb/ipsecmb.c
@@ -928,7 +928,7 @@ crypto_ipsecmb_init (vlib_main_t * vm)
#endif
if (clib_cpu_supports_avx512f ())
init_mb_mgr_avx512 (ptd->mgr);
- else if (clib_cpu_supports_avx2 ())
+ else if (clib_cpu_supports_avx2 () && clib_cpu_supports_bmi2 ())
init_mb_mgr_avx2 (ptd->mgr);
else
init_mb_mgr_sse (ptd->mgr);
diff --git a/src/vppinfra/cpu.h b/src/vppinfra/cpu.h
index 3c5e59e6e01..31049f5458c 100644
--- a/src/vppinfra/cpu.h
+++ b/src/vppinfra/cpu.h
@@ -123,6 +123,7 @@ _CLIB_MARCH_FN_REGISTRATION(fn)
_ (avx, 1, ecx, 28) \
_ (rdrand, 1, ecx, 30) \
_ (avx2, 7, ebx, 5) \
+ _ (bmi2, 7, ebx, 8) \
_ (rtm, 7, ebx, 11) \
_ (pqm, 7, ebx, 12) \
_ (pqe, 7, ebx, 15) \