summaryrefslogtreecommitdiffstats
path: root/src/plugins/crypto_ia32/main.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-12-19 13:27:28 +0100
committerFlorin Coras <florin.coras@gmail.com>2020-01-27 21:36:19 +0000
commite9595dba26b32abb673f74b777429ae5640dc325 (patch)
treef397ca1be176d8ad879e3c83cc84545bc3a7223d /src/plugins/crypto_ia32/main.c
parentbd5c49a1615e36260a86184d087b5b47a5e747be (diff)
crypto-ia32: add VAES support for AES-CBC
Type: feature Change-Id: Ic8aa6c48913677537301971469f9627b70c1cec8 Signed-off-by: Damjan Marion <damarion@cisco.com>
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);