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: f8be1786b1
("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Signed-off-by: Ayuj Verma <ayuj.verma@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
This commit is contained in:
parent
109924e9f3
commit
c864167ce9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user