summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAnoob Joseph <anoob.joseph@caviumnetworks.com>2018-09-14 14:54:47 +0530
committerAkhil Goyal <akhil.goyal@nxp.com>2018-09-25 17:57:25 +0200
commitc864167ce97d91ed95c68f8f85cf2dbaaae212d3 (patch)
treedf5dd1b102c938051083fca2adefbdd0cf6315b7 /app
parent109924e9f3b627eb8d5a92bab92f4ad29077bbaa (diff)
downloaddpdk-c864167ce97d91ed95c68f8f85cf2dbaaae212d3.zip
dpdk-c864167ce97d91ed95c68f8f85cf2dbaaae212d3.tar.gz
dpdk-c864167ce97d91ed95c68f8f85cf2dbaaae212d3.tar.xz
app/test-crypto-perf: fix check for auth key
Authentication key is not required for all algorithms. Making sure the null check is done only when 'auth_key_sz' is non-zero. Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application") Cc: stable@dpdk.org Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com> Signed-off-by: Ayuj Verma <ayuj.verma@caviumnetworks.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Diffstat (limited to 'app')
-rw-r--r--app/test-crypto-perf/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index c9f99a7..55d97c2 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -357,7 +357,9 @@ cperf_check_test_vector(struct cperf_options *opts,
return -1;
if (test_vec->plaintext.length < opts->max_buffer_size)
return -1;
- if (test_vec->auth_key.data == NULL)
+ /* Auth key is only required for some algorithms */
+ if (opts->auth_key_sz &&
+ test_vec->auth_key.data == NULL)
return -1;
if (test_vec->auth_key.length != opts->auth_key_sz)
return -1;