[PATCH v3 2/2] app/test: add SM4 GCM tests
De Lara Guarch, Pablo
pablo.de.lara.guarch at intel.com
Tue Feb 18 12:01:04 CET 2025
Hi Pablo,
> -----Original Message-----
> From: Dooley, Brian <brian.dooley at intel.com>
> Sent: Monday, January 13, 2025 6:10 PM
> Cc: dev at dpdk.org; gakhil at marvell.com; Ji, Kai <kai.ji at intel.com>; De Lara
> Guarch, Pablo <pablo.de.lara.guarch at intel.com>; Dooley, Brian
> <brian.dooley at 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.dooley at 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.
> +
...
More information about the dev
mailing list