Hi Pablo,

> -----Original Message-----
> From: Dooley, Brian <brian.doo...@intel.com>
> Sent: Monday, January 13, 2025 6:10 PM
> Cc: dev@dpdk.org; gak...@marvell.com; Ji, Kai <kai...@intel.com>; De Lara
> Guarch, Pablo <pablo.de.lara.gua...@intel.com>; Dooley, Brian
> <brian.doo...@intel.com>
> Subject: [PATCH v3 2/2] app/test: add SM4 GCM tests
> 
> Added SM4-GCM tests for the AESNI MB PMD.
> 
> Signed-off-by: Brian Dooley <brian.doo...@intel.com>
> ---
>  app/test/test_cryptodev.c                   | 158 +++++
>  app/test/test_cryptodev_aead_test_vectors.h | 708
> ++++++++++++++++++++
>  2 files changed, 866 insertions(+)
> 

Just one comment below.

Thanks,
Pablo
...

> b/app/test/test_cryptodev_aead_test_vectors.h
> index 73bfb8dad4..aacefe5ea4 100644
> --- a/app/test/test_cryptodev_aead_test_vectors.h
> +++ b/app/test/test_cryptodev_aead_test_vectors.h
> @@ -50,6 +50,54 @@ static uint8_t ccm_aad_test_2[22] = {
>               0xA5, 0xB8, 0xFC, 0xBA, 0x00, 0x00
>  };
> 
> +static uint8_t sm4_gcm_aad_test_2[MAX_AAD_LENGTH] = {
> +             0x3f, 0x89, 0x42, 0x20
> +};

MAX_AAD_LENGTH is pretty much 64KB. This is allocating too much memory 
unnecessarily, so I would limit to the actual size .
You could use [] with no defined size, and that should work.
> +

...


Reply via email to