From: Anoob Joseph Date: Fri, 14 Sep 2018 09:24:48 +0000 (+0530) Subject: app/test-crypto-perf: fix check for cipher IV X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3c78812b5082146f23af45784a04c37be9b90190;p=dpdk.git 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 --- 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;