[dpdk-dev] app/crypto-perf: fix AEAD tests when AAD is zero
Checks
Commit Message
For AEAD algorithms, additional authenticated data (AAD)
can be passed, but it is optional, so its size can be zero.
Therefore, test can be run if no memory is allocated.
Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-crypto-perf/cperf_test_vectors.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Wednesday, April 12, 2017 10:26 AM
> To: dev@dpdk.org
> Cc: Doherty, Declan; stable@dpdk.org; De Lara Guarch, Pablo
> Subject: [PATCH] app/crypto-perf: fix AEAD tests when AAD is zero
>
> For AEAD algorithms, additional authenticated data (AAD)
> can be passed, but it is optional, so its size can be zero.
> Therefore, test can be run if no memory is allocated.
>
> Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test
> application")
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Applied to dpdk-next-crypto.
Pablo
@@ -463,7 +463,7 @@ cperf_test_vector_get_dummy(struct cperf_options *options)
break;
}
- if (aad_alloc) {
+ if (aad_alloc && options->auth_aad_sz) {
t_vec->aad.data = rte_malloc(NULL,
options->auth_aad_sz, 16);
if (t_vec->aad.data == NULL) {