* [PATCH v1] examples/fips_validation: fix digest length in AES GCM
@ 2023-06-28 14:38 Samina Arshad
2023-06-30 14:03 ` Dooley, Brian
0 siblings, 1 reply; 4+ messages in thread
From: Samina Arshad @ 2023-06-28 14:38 UTC (permalink / raw)
To: Brian Dooley, Gowrishankar Muthukrishnan
Cc: dev, stable, Samina Arshad, marko.kovacevic
For AES GCM non JSON decrypt test cases the digest length
is being set incorrectly.The digest length is not being
cleared after test cases, causing an issue when running
tests individually without the --path-is-folder flag.
This fix adds the digest length correctly to the decrypt
cases and clears the digest length after each test file.
Fixes: 4aaad2995e13 ("examples/fips_validation: support GCM parsing")
Cc: marko.kovacevic@intel.com
Signed-off-by: Samina Arshad <samina.arshad@intel.com>
---
examples/fips_validation/main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index 4237224d9d..6518c959c4 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -834,7 +834,7 @@ prepare_aead_op(void)
RTE_LOG(ERR, USER1, "Not enough memory\n");
return -ENOMEM;
}
- env.digest_len = vec.cipher_auth.digest.len;
+ env.digest_len = vec.aead.digest.len;
sym->aead.data.length = vec.pt.len;
sym->aead.digest.data = env.digest;
@@ -843,7 +843,7 @@ prepare_aead_op(void)
ret = prepare_data_mbufs(&vec.ct);
if (ret < 0)
return ret;
-
+ env.digest_len = vec.aead.digest.len;
sym->aead.data.length = vec.ct.len;
sym->aead.digest.data = vec.aead.digest.val;
sym->aead.digest.phys_addr = rte_malloc_virt2iova(
@@ -2618,6 +2618,7 @@ fips_test_one_file(void)
if (env.digest) {
rte_free(env.digest);
env.digest = NULL;
+ env.digest_len = 0;
}
rte_pktmbuf_free(env.mbuf);
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v1] examples/fips_validation: fix digest length in AES GCM
2023-06-28 14:38 [PATCH v1] examples/fips_validation: fix digest length in AES GCM Samina Arshad
@ 2023-06-30 14:03 ` Dooley, Brian
2023-07-04 5:36 ` Gowrishankar Muthukrishnan
0 siblings, 1 reply; 4+ messages in thread
From: Dooley, Brian @ 2023-06-30 14:03 UTC (permalink / raw)
To: Arshad, Samina, Gowrishankar Muthukrishnan
Cc: dev, stable, Kovacevic, Marko, Akhil Goyal
Hey Samina,
> -----Original Message-----
> From: Arshad, Samina <samina.arshad@intel.com>
> Sent: Wednesday, June 28, 2023 3:39 PM
> To: Dooley, Brian <brian.dooley@intel.com>; Gowrishankar Muthukrishnan
> <gmuthukrishn@marvell.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Arshad, Samina
> <samina.arshad@intel.com>; Kovacevic, Marko <marko.kovacevic@intel.com>
> Subject: [PATCH v1] examples/fips_validation: fix digest length in AES GCM
>
> For AES GCM non JSON decrypt test cases the digest length is being set
> incorrectly.The digest length is not being cleared after test cases, causing an
> issue when running tests individually without the --path-is-folder flag.
> This fix adds the digest length correctly to the decrypt cases and clears the
> digest length after each test file.
>
> Fixes: 4aaad2995e13 ("examples/fips_validation: support GCM parsing")
> Cc: marko.kovacevic@intel.com
>
> Signed-off-by: Samina Arshad <samina.arshad@intel.com>
> ---
> examples/fips_validation/main.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/examples/fips_validation/main.c
> b/examples/fips_validation/main.c index 4237224d9d..6518c959c4 100644
> --- a/examples/fips_validation/main.c
> +++ b/examples/fips_validation/main.c
> @@ -834,7 +834,7 @@ prepare_aead_op(void)
> RTE_LOG(ERR, USER1, "Not enough memory\n");
> return -ENOMEM;
> }
> - env.digest_len = vec.cipher_auth.digest.len;
> + env.digest_len = vec.aead.digest.len;
>
> sym->aead.data.length = vec.pt.len;
> sym->aead.digest.data = env.digest;
> @@ -843,7 +843,7 @@ prepare_aead_op(void)
> ret = prepare_data_mbufs(&vec.ct);
> if (ret < 0)
> return ret;
> -
> + env.digest_len = vec.aead.digest.len;
> sym->aead.data.length = vec.ct.len;
> sym->aead.digest.data = vec.aead.digest.val;
> sym->aead.digest.phys_addr = rte_malloc_virt2iova( @@ -
> 2618,6 +2618,7 @@ fips_test_one_file(void)
> if (env.digest) {
> rte_free(env.digest);
> env.digest = NULL;
> + env.digest_len = 0;
> }
> rte_pktmbuf_free(env.mbuf);
>
> --
> 2.25.1
Acked-by: Brian Dooley <brian.dooley@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v1] examples/fips_validation: fix digest length in AES GCM
2023-06-30 14:03 ` Dooley, Brian
@ 2023-07-04 5:36 ` Gowrishankar Muthukrishnan
2023-07-04 5:43 ` Akhil Goyal
0 siblings, 1 reply; 4+ messages in thread
From: Gowrishankar Muthukrishnan @ 2023-07-04 5:36 UTC (permalink / raw)
To: Dooley, Brian, Arshad, Samina; +Cc: dev, stable, Kovacevic, Marko, Akhil Goyal
Acked-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v1] examples/fips_validation: fix digest length in AES GCM
2023-07-04 5:36 ` Gowrishankar Muthukrishnan
@ 2023-07-04 5:43 ` Akhil Goyal
0 siblings, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2023-07-04 5:43 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan, Dooley, Brian, Arshad, Samina
Cc: dev, stable, Kovacevic, Marko
> Subject: RE: [PATCH v1] examples/fips_validation: fix digest length in AES GCM
>
> Acked-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-04 5:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-28 14:38 [PATCH v1] examples/fips_validation: fix digest length in AES GCM Samina Arshad
2023-06-30 14:03 ` Dooley, Brian
2023-07-04 5:36 ` Gowrishankar Muthukrishnan
2023-07-04 5:43 ` Akhil Goyal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).