[dpdk-dev] [PATCH 3/3] app/test-crypto-perf: fix check for cipher IV
Anoob Joseph
anoob.joseph at caviumnetworks.com
Fri Sep 14 11:24:48 CEST 2018
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")
Signed-off-by: Akash Saxena <akash.saxena at caviumnetworks.com>
Signed-off-by: Anoob Joseph <anoob.joseph at caviumnetworks.com>
---
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 55d97c2..953e058 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.7.4
More information about the dev
mailing list