>       case ODP_AUTH_ALG_AES128_GCM:
>               if (param->cipher_alg == ODP_CIPHER_ALG_AES128_GCM)
>                       aes_gcm = 1;
> +             session->p.auth_digest_len = 128 / 8;
>               /* Fallthrough */
>  #endif
>       case ODP_AUTH_ALG_AES_GCM:
>               /* AES-GCM requires to do both auth and
>                * cipher at the same time */
> -             if (param->cipher_alg == ODP_CIPHER_ALG_AES_GCM ||
> aes_gcm) {
> +             if ((param->cipher_alg == ODP_CIPHER_ALG_AES_GCM ||
> aes_gcm) &&
> +                 session->p.auth_digest_len == 128 / 8) {


The patch set adds 128/8 or 96/8 on quite many places. It would be good add a 
define for those in the first patch needing those, and use the same define 
throughout the patch set.

E.g. #define AES_GCM_DIGEST_LEN  (128 / 8)

-Petri

Reply via email to