+static_always_inline void *
+aesni_cbc_key_exp (vnet_crypto_key_t * key, aesni_key_size_t ks)
+{
+ aes_cbc_key_data_t *kd;
+ kd = clib_mem_alloc_aligned (sizeof (*kd), CLIB_CACHE_LINE_BYTES);
+ aes_key_expand (kd->encrypt_key, key->data, ks);
+ aes_key_expand (kd->decrypt_key, key->data, ks);
+ aes_key_enc_to_dec (kd->decrypt_key, ks);
+ return kd;
+}
+