DPDK patches and discussions
 help / color / mirror / Atom feed
From: Fan Zhang <roy.fan.zhang@intel.com>
To: dev@dpdk.org
Cc: akhil.goyal@nxp.com, Fan Zhang <roy.fan.zhang@intel.com>
Subject: [dpdk-dev] [PATCH 2/2] fips_validation: fix gcm test
Date: Thu, 22 Oct 2020 10:57:58 +0100
Message-ID: <20201022095758.587755-3-roy.fan.zhang@intel.com> (raw)
In-Reply-To: <20201022095758.587755-1-roy.fan.zhang@intel.com>

This patch fixes FIPS GCM test of the redundant plaintext string
write and insufficient test case support check for some corner
cases.

Fixes: d09abf2d1007 ("examples/fips_validation: update GCM test")
Cc: roy.fan.zhang@intel.com

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 examples/fips_validation/fips_validation_gcm.c |  1 -
 examples/fips_validation/main.c                | 10 +++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/examples/fips_validation/fips_validation_gcm.c b/examples/fips_validation/fips_validation_gcm.c
index df3caa267..250d09bf9 100644
--- a/examples/fips_validation/fips_validation_gcm.c
+++ b/examples/fips_validation/fips_validation_gcm.c
@@ -175,7 +175,6 @@ parse_test_gcm_writeback(struct fips_val *val)
 		if (vec.status == RTE_CRYPTO_OP_STATUS_SUCCESS) {
 			fprintf(info.fp_wr, "%s", PT_STR);
 			if (!info.interim_info.gcm_data.is_gmac) {
-				fprintf(info.fp_wr, "%s", PT_STR);
 				tmp_val.val = val->val;
 				tmp_val.len = vec.pt.len;
 
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index 07532c956..f3678f056 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -927,10 +927,14 @@ prepare_gmac_xform(struct rte_crypto_sym_xform *xform)
 
 	if (rte_cryptodev_sym_capability_check_auth(cap,
 			auth_xform->key.length,
-			auth_xform->digest_length, 0) != 0) {
-		RTE_LOG(ERR, USER1, "PMD %s key length %u IV length %u\n",
+			auth_xform->digest_length,
+			auth_xform->iv.length) != 0) {
+
+		RTE_LOG(ERR, USER1,
+			"PMD %s key length %u Digest length %u IV length %u\n",
 				info.device_name, auth_xform->key.length,
-				auth_xform->digest_length);
+				auth_xform->digest_length,
+				auth_xform->iv.length);
 		return -EPERM;
 	}
 
-- 
2.26.2


  parent reply	other threads:[~2020-10-22  9:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22  9:57 [dpdk-dev] [PATCH 0/2] fips_validation: fix issues Fan Zhang
2020-10-22  9:57 ` [dpdk-dev] [PATCH 1/2] fips_validation: fix missed version line Fan Zhang
2020-10-22  9:57 ` Fan Zhang [this message]
2021-01-14 15:12   ` [dpdk-dev] [PATCH 2/2] fips_validation: fix gcm test Akhil Goyal
2020-10-28 11:44 ` [dpdk-dev] [PATCH 0/2] fips_validation: fix issues 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=20201022095758.587755-3-roy.fan.zhang@intel.com \
    --to=roy.fan.zhang@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git