From: Samina Arshad <samina.arshad@intel.com>
To: Brian Dooley <brian.dooley@intel.com>,
Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Cc: dev@dpdk.org, stable@dpdk.org,
Samina Arshad <samina.arshad@intel.com>,
marko.kovacevic@intel.com
Subject: [PATCH v1] examples/fips_validation: fix digest length in AES GCM
Date: Wed, 28 Jun 2023 14:38:36 +0000 [thread overview]
Message-ID: <20230628143836.968549-1-samina.arshad@intel.com> (raw)
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
next reply other threads:[~2023-06-28 14:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 14:38 Samina Arshad [this message]
2023-06-30 14:03 ` Dooley, Brian
2023-07-04 5:36 ` Gowrishankar Muthukrishnan
2023-07-04 5:43 ` Akhil Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230628143836.968549-1-samina.arshad@intel.com \
--to=samina.arshad@intel.com \
--cc=brian.dooley@intel.com \
--cc=dev@dpdk.org \
--cc=gmuthukrishn@marvell.com \
--cc=marko.kovacevic@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).