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: f8be1786b1 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This commit is contained in:
Pablo de Lara 2017-04-12 10:26:26 +01:00
parent 0091576132
commit ad674b4d4a

View File

@ -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) {