From: Anoob Joseph Date: Fri, 14 Sep 2018 09:24:47 +0000 (+0530) Subject: app/test-crypto-perf: fix check for auth key X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c864167ce97d91ed95c68f8f85cf2dbaaae212d3;p=dpdk.git 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 Signed-off-by: Ayuj Verma Acked-by: Akhil Goyal --- diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c index c9f99a76d8..55d97c26b6 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;