* [dpdk-dev] [PATCH 1/3] app/test-crypto-perf: add checks for AEAD key
2018-09-14 9:24 [dpdk-dev] [PATCH 0/3] fix test vector checks Anoob Joseph
@ 2018-09-14 9:24 ` Anoob Joseph
2018-09-14 9:24 ` [dpdk-dev] [PATCH 2/3] app/test-crypto-perf: fix check for auth key Anoob Joseph
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Anoob Joseph @ 2018-09-14 9:24 UTC (permalink / raw)
To: Akhil Goyal, Declan Doherty, Pablo de Lara
Cc: Anoob Joseph, Jerin Jacob, Narayana Prasad, dev, Akash Saxena
Adding validation checks for AEAD key.
Signed-off-by: Akash Saxena <akash.saxena@caviumnetworks.com>
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
---
app/test-crypto-perf/main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 5c7dadb..c9f99a7 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -421,6 +421,10 @@ cperf_check_test_vector(struct cperf_options *opts,
return -1;
if (test_vec->ciphertext.length < opts->max_buffer_size)
return -1;
+ if (test_vec->aead_key.data == NULL)
+ return -1;
+ if (test_vec->aead_key.length != opts->aead_key_sz)
+ return -1;
if (test_vec->aead_iv.data == NULL)
return -1;
if (test_vec->aead_iv.length != opts->aead_iv_sz)
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH 2/3] app/test-crypto-perf: fix check for auth key
2018-09-14 9:24 [dpdk-dev] [PATCH 0/3] fix test vector checks Anoob Joseph
2018-09-14 9:24 ` [dpdk-dev] [PATCH 1/3] app/test-crypto-perf: add checks for AEAD key Anoob Joseph
@ 2018-09-14 9:24 ` Anoob Joseph
2018-09-14 9:24 ` [dpdk-dev] [PATCH 3/3] app/test-crypto-perf: fix check for cipher IV Anoob Joseph
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Anoob Joseph @ 2018-09-14 9:24 UTC (permalink / raw)
To: Akhil Goyal, Declan Doherty, Pablo de Lara
Cc: Anoob Joseph, Jerin Jacob, Narayana Prasad, dev, Ayuj Verma
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@caviumnetworks.com>
Signed-off-by: Ayuj Verma <ayuj.verma@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH 3/3] app/test-crypto-perf: fix check for cipher IV
2018-09-14 9:24 [dpdk-dev] [PATCH 0/3] fix test vector checks Anoob Joseph
2018-09-14 9:24 ` [dpdk-dev] [PATCH 1/3] app/test-crypto-perf: add checks for AEAD key Anoob Joseph
2018-09-14 9:24 ` [dpdk-dev] [PATCH 2/3] app/test-crypto-perf: fix check for auth key Anoob Joseph
@ 2018-09-14 9:24 ` Anoob Joseph
2018-09-25 14:23 ` [dpdk-dev] [PATCH 0/3] fix test vector checks Akhil Goyal
2018-09-26 12:26 ` Akhil Goyal
4 siblings, 0 replies; 6+ messages in thread
From: Anoob Joseph @ 2018-09-14 9:24 UTC (permalink / raw)
To: Akhil Goyal, Declan Doherty, Pablo de Lara
Cc: Anoob Joseph, Jerin Jacob, Narayana Prasad, dev, Akash Saxena
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@caviumnetworks.com>
Signed-off-by: Anoob Joseph <anoob.joseph@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH 0/3] fix test vector checks
2018-09-14 9:24 [dpdk-dev] [PATCH 0/3] fix test vector checks Anoob Joseph
` (2 preceding siblings ...)
2018-09-14 9:24 ` [dpdk-dev] [PATCH 3/3] app/test-crypto-perf: fix check for cipher IV Anoob Joseph
@ 2018-09-25 14:23 ` Akhil Goyal
2018-09-26 12:26 ` Akhil Goyal
4 siblings, 0 replies; 6+ messages in thread
From: Akhil Goyal @ 2018-09-25 14:23 UTC (permalink / raw)
To: Anoob Joseph, Declan Doherty, Pablo de Lara
Cc: Jerin Jacob, Narayana Prasad, dev, Akash Saxena, Ayuj Verma
On 9/14/2018 2:54 PM, Anoob Joseph wrote:
> Multiple fixes to the test vector checks.
>
> Anoob Joseph (3):
> app/test-crypto-perf: add checks for AEAD key
> app/test-crypto-perf: fix check for auth key
> app/test-crypto-perf: fix check for cipher IV
>
> app/test-crypto-perf/main.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
Series Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH 0/3] fix test vector checks
2018-09-14 9:24 [dpdk-dev] [PATCH 0/3] fix test vector checks Anoob Joseph
` (3 preceding siblings ...)
2018-09-25 14:23 ` [dpdk-dev] [PATCH 0/3] fix test vector checks Akhil Goyal
@ 2018-09-26 12:26 ` Akhil Goyal
4 siblings, 0 replies; 6+ messages in thread
From: Akhil Goyal @ 2018-09-26 12:26 UTC (permalink / raw)
To: Anoob Joseph, Declan Doherty, Pablo de Lara
Cc: Jerin Jacob, Narayana Prasad, dev, Akash Saxena, Ayuj Verma, stable
On 9/14/2018 2:54 PM, Anoob Joseph wrote:
> Multiple fixes to the test vector checks.
>
> Anoob Joseph (3):
> app/test-crypto-perf: add checks for AEAD key
> app/test-crypto-perf: fix check for auth key
> app/test-crypto-perf: fix check for cipher IV
>
> app/test-crypto-perf/main.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
patchset applied to dpdk-next-crypto
2/3 and 3/3 for cc: stable@dpdk.org
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread