X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fcrypto_native%2Faes.h;h=c2c22c6bd160f1a79760cfbe3e3019e3c78cdf19;hb=e84e9d708e0a7571bc24ae2f443462ed8cddbb84;hp=b914088e94d20cc62c799041505b6fdb4f5068f8;hpb=3be33f17ecd14a12738a44f9c0e09cb3778b1345;p=vpp.git diff --git a/src/plugins/crypto_native/aes.h b/src/plugins/crypto_native/aes.h index b914088e94d..c2c22c6bd16 100644 --- a/src/plugins/crypto_native/aes.h +++ b/src/plugins/crypto_native/aes.h @@ -48,6 +48,32 @@ aes_enc_round (u8x16 a, u8x16 k) #endif } +#if defined (__VAES__) +static_always_inline u8x64 +aes_enc_round_x4 (u8x64 a, u8x64 k) +{ + return (u8x64) _mm512_aesenc_epi128 ((__m512i) a, (__m512i) k); +} + +static_always_inline u8x64 +aes_enc_last_round_x4 (u8x64 a, u8x64 k) +{ + return (u8x64) _mm512_aesenclast_epi128 ((__m512i) a, (__m512i) k); +} + +static_always_inline u8x64 +aes_dec_round_x4 (u8x64 a, u8x64 k) +{ + return (u8x64) _mm512_aesdec_epi128 ((__m512i) a, (__m512i) k); +} + +static_always_inline u8x64 +aes_dec_last_round_x4 (u8x64 a, u8x64 k) +{ + return (u8x64) _mm512_aesdeclast_epi128 ((__m512i) a, (__m512i) k); +} +#endif + static_always_inline u8x16 aes_enc_last_round (u8x16 a, u8x16 k) {