patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ciara Power <ciara.power@intel.com>
To: Akhil Goyal <gakhil@marvell.com>, Fan Zhang <fanzhang.oss@gmail.com>
Cc: dev@dpdk.org, kai.ji@intel.com, pablo.de.lara.guarch@intel.com,
	Ciara Power <ciara.power@intel.com>,
	vvelumuri@marvell.com, stable@dpdk.org,
	Brian Dooley <brian.dooley@intel.com>
Subject: [PATCH v2 2/5] test/crypto: fix ZUC digest length in comparison
Date: Fri,  3 Mar 2023 09:38:18 +0000	[thread overview]
Message-ID: <20230303093821.2367309-3-ciara.power@intel.com> (raw)
In-Reply-To: <20230303093821.2367309-1-ciara.power@intel.com>

The digest length used in ZUC tests for verifying the digest was
hardcoded at 4 bytes, which was suitable for ZUC128 only.
Now that ZUC256 is supported by these test functions, the digest length
can vary.

Using the test vector digest length directly in these
comparisons allows for variable digest length.

Fixes: 83397b9f0739 ("test/crypto: add further ZUC test cases")
Fixes: fa5bf9345d4e ("test/crypto: add ZUC cases with 256-bit keys")
Cc: vvelumuri@marvell.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
 app/test/test_cryptodev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index ca7f10557c..72d359dd91 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -4853,7 +4853,7 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata)
 	TEST_ASSERT_BUFFERS_ARE_EQUAL(
 			ut_params->digest,
 			tdata->digest.data,
-			4,
+			tdata->digest.len,
 			"ZUC Generated auth tag not as expected");
 	return 0;
 }
@@ -6499,7 +6499,7 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,
 		TEST_ASSERT_BUFFERS_ARE_EQUAL(
 			ut_params->digest,
 			tdata->digest.data,
-			DIGEST_BYTE_LENGTH_KASUMI_F9,
+			tdata->digest.len,
 			"ZUC Generated auth tag not as expected");
 	}
 	return 0;
@@ -6706,7 +6706,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,
 		TEST_ASSERT_BUFFERS_ARE_EQUAL(
 			digest,
 			tdata->digest.data,
-			DIGEST_BYTE_LENGTH_KASUMI_F9,
+			tdata->digest.len,
 			"ZUC Generated auth tag not as expected");
 	}
 	return 0;
-- 
2.25.1


  parent reply	other threads:[~2023-03-03  9:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230301163916.2248543-1-ciara.power@intel.com>
2023-03-01 16:39 ` [PATCH " Ciara Power
2023-03-01 16:39 ` [PATCH 4/5] test/crypto: fix capability check for ZUC cipher auth Ciara Power
     [not found] ` <20230303093821.2367309-1-ciara.power@intel.com>
2023-03-03  9:38   ` Ciara Power [this message]
2023-03-03  9:38   ` [PATCH v2 " Ciara Power

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=20230303093821.2367309-3-ciara.power@intel.com \
    --to=ciara.power@intel.com \
    --cc=brian.dooley@intel.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=kai.ji@intel.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=stable@dpdk.org \
    --cc=vvelumuri@marvell.com \
    /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).