[dpdk-dev] [PATCH 2/3] app/test-crypto-perf: fix check for auth key
Anoob Joseph
anoob.joseph at caviumnetworks.com
Fri Sep 14 11:24:47 CEST 2018
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")
Signed-off-by: Anoob Joseph <anoob.joseph at caviumnetworks.com>
Signed-off-by: Ayuj Verma <ayuj.verma 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 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;
--
2.7.4
More information about the dev
mailing list