aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/crypto_ia32/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/crypto_ia32/main.c')
-rw-r--r--src/plugins/crypto_ia32/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/crypto_ia32/main.c b/src/plugins/crypto_ia32/main.c
index 194182fd57a..bcfd7fa6ffd 100644
--- a/src/plugins/crypto_ia32/main.c
+++ b/src/plugins/crypto_ia32/main.c
@@ -72,7 +72,9 @@ crypto_ia32_init (vlib_main_t * vm)
vnet_crypto_register_engine (vm, "ia32", 100,
"Intel IA32 ISA Optimized Crypto");
- if (clib_cpu_supports_avx512f ())
+ if (clib_cpu_supports_vaes ())
+ error = crypto_ia32_aesni_cbc_init_vaes (vm);
+ else if (clib_cpu_supports_avx512f ())
error = crypto_ia32_aesni_cbc_init_avx512 (vm);
else if (clib_cpu_supports_avx2 ())
error = crypto_ia32_aesni_cbc_init_avx2 (vm);
@@ -84,7 +86,9 @@ crypto_ia32_init (vlib_main_t * vm)
if (clib_cpu_supports_pclmulqdq ())
{
- if (clib_cpu_supports_avx512f ())
+ if (clib_cpu_supports_vaes ())
+ error = crypto_ia32_aesni_gcm_init_vaes (vm);
+ else if (clib_cpu_supports_avx512f ())
error = crypto_ia32_aesni_gcm_init_avx512 (vm);
else if (clib_cpu_supports_avx2 ())
error = crypto_ia32_aesni_gcm_init_avx2 (vm);