65 if (clib_cpu_supports_x86_aes () == 0)
73 "Intel IA32 ISA Optimized Crypto");
75 if (clib_cpu_supports_avx512f ())
77 else if (clib_cpu_supports_avx2 ())
85 if (clib_cpu_supports_pclmulqdq ())
87 if (clib_cpu_supports_avx512f ())
89 else if (clib_cpu_supports_avx2 ())
112 .runs_after =
VLIB_INITS (
"vnet_crypto_init"),
116 #include <vpp/app/version.h> 120 .version = VPP_BUILD_VER,
121 .description =
"Intel IA32 Software Crypto Engine",
clib_error_t * crypto_ia32_aesni_gcm_init_sse42(vlib_main_t *vm)
#define vec_validate_aligned(V, I, A)
Make sure vector is long enough for given index (no header, specified alignment)
void vnet_crypto_register_key_handler(vlib_main_t *vm, u32 engine_index, vnet_crypto_key_handler_t *key_handler)
crypto_ia32_main_t crypto_ia32_main
#define VLIB_INIT_FUNCTION(x)
clib_error_t * crypto_ia32_aesni_gcm_init_avx512(vlib_main_t *vm)
#define vec_free(V)
Free vector's memory (no header).
crypto_ia32_per_thread_data_t * per_thread_data
clib_error_t * crypto_ia32_aesni_cbc_init_avx2(vlib_main_t *vm)
u32 vnet_crypto_key_index_t
static void clib_mem_free_s(void *p)
static_always_inline vnet_crypto_key_t * vnet_crypto_get_key(vnet_crypto_key_index_t index)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
clib_error_t * crypto_ia32_init(vlib_main_t *vm)
clib_error_t * crypto_ia32_aesni_gcm_init_avx2(vlib_main_t *vm)
clib_error_t * crypto_ia32_aesni_cbc_init_sse42(vlib_main_t *vm)
crypto_ia32_key_fn_t * key_fn[VNET_CRYPTO_N_ALGS]
static vlib_thread_main_t * vlib_get_thread_main()
#define CLIB_CACHE_LINE_BYTES
u32 vnet_crypto_register_engine(vlib_main_t *vm, char *name, int prio, char *desc)
static void crypto_ia32_key_handler(vlib_main_t *vm, vnet_crypto_key_op_t kop, vnet_crypto_key_index_t idx)
clib_error_t * crypto_ia32_aesni_cbc_init_avx512(vlib_main_t *vm)