]> git.droids-corp.org - dpdk.git/commitdiff
app/crypto-perf: fix AEAD tests when AAD is zero
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 12 Apr 2017 09:26:26 +0000 (10:26 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 20 Apr 2017 09:32:45 +0000 (11:32 +0200)
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")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
app/test-crypto-perf/cperf_test_vectors.c

index f87bb8e1994f7c6c2ca305fafd6dc7bb202a1074..757957f78c418cb5d26c07c1dca7a772ba652f39 100644 (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) {