> -----Original Message-----
> From: Power, Ciara <[email protected]>
> Sent: Wednesday, September 29, 2021 5:30 PM
> To: [email protected]
> Cc: Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX
> <[email protected]>; [email protected]; Power, Ciara
> <[email protected]>; Thomas Monjalon <[email protected]>; De Lara
> Guarch, Pablo <[email protected]>; Ray Kinsella
> <[email protected]>
> Subject: [PATCH v3 03/10] drivers/crypto: move aesni-mb PMD to IPsec-mb
> framework
> 
> From: Piotr Bronowski <[email protected]>
> 
> This patch removes the crypto/aesni_mb folder and gathers all
> aesni-mb PMD implementation specific details into a single file,
> pmd_aesni_mb.c in crypto/ipsec_mb.
> 
> Now that intel-ipsec-mb v1.0 is the minimum supported version, old
> macros can be replaced with the newer macros supported by this version.
> 
> Signed-off-by: Piotr Bronowski <[email protected]>
> Signed-off-by: Ciara Power <[email protected]>
> 

...

>  deps += ['bus_vdev', 'net', 'security']
> diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c

...

> +                     .xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,
> +                     {.aead = {
> +                             .algo =
> RTE_CRYPTO_AEAD_CHACHA20_POLY1305,
> +                             .block_size = 64,
> +                             .key_size = {
> +                                     .min = 32,
> +                                     .max = 32,
> +                                     .increment = 0
> +                             },
> +                             .digest_size = {
> +                                     .min = 16,
> +                                     .max = 16,
> +                                     .increment = 0
> +                             },
> +                             .aad_size = {
> +                                     .min = 0,
> +                                     .max = 240,

We support more than 240 bytes of AAD. I think we can support up to 1024 bytes.
Could you change it here?

> +                                     .increment = 1
> +                             },
> +                             .iv_size = {
> +                                     .min = 12,
> +                                     .max = 12,
> +                                     .increment = 0
> +                             },
> +                     }, }
> +             }, }
> +     },
> +     RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()

...

> +static int
> +aesni_mb_set_session_auth_parameters(const IMB_MGR *mb_mgr,
...

> +             case IMB_KEY_192_BYTES:
> +                     IMB_AES192_GCM_PRE(mb_mgr, xform-
> >auth.key.data,
> +                             &sess->cipher.gcm_key);
> +                     sess->cipher.key_length_in_bytes =
> IMB_KEY_192_BYTES;
> +                     break;
> +             case IMB_KEY_256_BYTES:
> +                     IMB_AES256_GCM_PRE(mb_mgr, xform-
> >auth.key.data,
> +                             &sess->cipher.gcm_key);
> +                     sess->cipher.key_length_in_bytes =
> IMB_KEY_256_BYTES;
> +                     break;
> +             default:
> +                     RTE_LOG(ERR, PMD, "failed to parse test type\n");

Wrong error message. This should say something like "Wrong authentication key 
length".
Also, the same message is present for the cipher key length, for GCM.

Thanks,
Pablo

Reply via email to