Hi Pablo,
> -----Original Message-----
> From: Dooley, Brian <[email protected]>
> Sent: Monday, January 13, 2025 6:10 PM
> Cc: [email protected]; [email protected]; Ji, Kai <[email protected]>; De Lara
> Guarch, Pablo <[email protected]>; Dooley, Brian
> <[email protected]>
> 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 <[email protected]>
> ---
> 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.
> +
...