> a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
> b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
> index a2f7f9abf8..dc07d96aad 100644
> --- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
> +++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
> @@ -18,11 +18,18 @@ struct aesni_mb_op_buf_data { static inline int
> is_aead_algo(IMB_HASH_ALG hash_alg, IMB_CIPHER_MODE cipher_mode) {
> - return (hash_alg == IMB_AUTH_CHACHA20_POLY1305 ||
> - hash_alg == IMB_AUTH_AES_CCM ||
> - cipher_mode == IMB_CIPHER_GCM
> + return (hash_alg == IMB_AUTH_CHACHA20_POLY1305
> + || hash_alg == IMB_AUTH_AES_CCM
> + || cipher_mode == IMB_CIPHER_GCM
> #if IMB_VERSION(1, 5, 0) < IMB_VERSION_NUM
> || cipher_mode == IMB_CIPHER_SM4_GCM
> + || cipher_mode == IMB_CIPHER_GCM
> + || cipher_mode == IMB_CIPHER_SM4_GCM
> +#endif
> +#if IMB_VERSION(3, 0, 0) <= IMB_VERSION_NUM
> + || cipher_mode == IMB_CIPHER_SNOW5G_NCA4
> + || cipher_mode == IMB_CIPHER_AES_NCA5
> + || cipher_mode == IMB_CIPHER_ZUC_NCA6
> #endif
> );
GCM and SM4_GCM are checked twice here in the 1.5 block.
> @@ -1793,6 +1968,29 @@ set_mb_job_params(IMB_JOB *job, struct
> ipsec_mb_qp *qp,
> session->iv.offset);
> break;
> #endif
> +#if IMB_VERSION(3, 0, 0) <= IMB_VERSION_NUM
> + case IMB_AUTH_SNOW5G_NCA4:
> + case IMB_AUTH_AES_NCA5:
> + case IMB_AUTH_ZUC_NCA6:
> + job->hash_start_src_offset_in_bytes =
> + op->sym->aead.data.offset;
> + job->msg_len_to_hash_in_bytes =
> + op->sym->aead.data.length;
> + job->cipher_start_src_offset_in_bytes =
> + op->sym->aead.data.offset;
> + job->msg_len_to_cipher_in_bytes = op->sym->aead.data.length;
> + job->iv = rte_crypto_op_ctod_offset(op, uint8_t *,
> + session->iv.offset);
> + break;
> + case IMB_AUTH_SNOW5G_NIA4:
> + case IMB_AUTH_AES_NIA5:
> + case IMB_AUTH_ZUC_NIA6:
> + job->hash_start_src_offset_in_bytes =
> + op->sym->auth.data.offset >> 3;
> + job->msg_len_to_hash_in_bytes =
> + op->sym->auth.data.length >> 3;
> + break;
Should NEA be added here? Is it falling into the default case and not
converting to bytes?
> +#endif
> @@ -1058,6 +1285,13 @@ struct __rte_cache_aligned aesni_mb_session {
> /* *< Expanded GCM key */
> uint8_t zuc_cipher_key[32];
> /* *< ZUC cipher key */
> + uint8_t nxa_cipher_key[32];
> + /* *< NxA cipher key */
> + struct {
> + alignas(16) uint32_t encode[60];
> + alignas(16) uint32_t decode[60];
> + } expanded_nxa5_keys;
> + /* *< expanded NxA5 keys */
Should there be identical buffers in the auth struct for NIA5? Will this be
overwritten with NEA5+NIA5 combo?
> snow3g_key_schedule_t pKeySched_snow3g_cipher;
> /* *< SNOW3G scheduled cipher key */
> kasumi_key_sched_t pKeySched_kasumi_cipher; @@ -
> 1113,6 +1347,8 @@ struct __rte_cache_aligned aesni_mb_session {
> /* *< Expanded XCBC authentication keys */
> uint8_t zuc_auth_key[32];
> /* *< ZUC authentication key */
> + uint8_t snow5g_auth_key[32];
> + /* *< SNOW5G authentication key */
> snow3g_key_schedule_t pKeySched_snow3g_auth;
> /* *< SNOW3G scheduled authentication key */
> kasumi_key_sched_t pKeySched_kasumi_auth;
One other note that features/aesni_mb.ini still has "Non-Byte aligned data = Y".
Should that be changed to N now?
Regards,
Marcel