From 3c78812b5082146f23af45784a04c37be9b90190 Mon Sep 17 00:00:00 2001 From: Anoob Joseph Date: Fri, 14 Sep 2018 14:54:48 +0530 Subject: [PATCH] app/test-crypto-perf: fix check for cipher IV IV is not required for all ciphers. Making sure the null check is done only when 'cipher_iv_sz' is non-zero. Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application") Cc: stable@dpdk.org Signed-off-by: Akash Saxena Signed-off-by: Anoob Joseph Acked-by: Akhil Goyal --- app/test-crypto-perf/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c index 55d97c26b6..953e058c99 100644 --- a/app/test-crypto-perf/main.c +++ b/app/test-crypto-perf/main.c @@ -342,7 +342,9 @@ cperf_check_test_vector(struct cperf_options *opts, return -1; if (test_vec->ciphertext.length < opts->max_buffer_size) return -1; - if (test_vec->cipher_iv.data == NULL) + /* Cipher IV is only required for some algorithms */ + if (opts->cipher_iv_sz && + test_vec->cipher_iv.data == NULL) return -1; if (test_vec->cipher_iv.length != opts->cipher_iv_sz) return -1; -- 2.20.1