DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] test/crypto: fix cipher offset for ZUC tests
@ 2022-06-21 11:41 Ciara Power
  2022-06-21 14:03 ` Ji, Kai
  0 siblings, 1 reply; 3+ messages in thread
From: Ciara Power @ 2022-06-21 11:41 UTC (permalink / raw)
  To: Akhil Goyal, Fan Zhang
  Cc: dev, kai.ji, Ciara Power, pablo.de.lara.guarch, stable

The cipher offset in bits was not being used in ZUC encryption test
functions when creating the operation, it was hardcoded to 0.
This is fixed to use the offset from the test vector as intended.

Fixes: fd01a9be38d5 ("test/crypto: move IV to crypto op private data")
Cc: pablo.de.lara.guarch@intel.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test/test_cryptodev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 2766e0cc10..49424496b0 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6035,7 +6035,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
 	retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
 					tdata->cipher_iv.len,
 					tdata->plaintext.len,
-					0);
+					tdata->validCipherOffsetInBits.len);
 	if (retval < 0)
 		return retval;
 
@@ -6130,7 +6130,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
 	/* Create ZUC operation */
 	retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
 			tdata->cipher_iv.len, tdata->plaintext.len,
-			0);
+			tdata->validCipherOffsetInBits.len);
 	if (retval < 0)
 		return retval;
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-21 17:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21 11:41 [PATCH] test/crypto: fix cipher offset for ZUC tests Ciara Power
2022-06-21 14:03 ` Ji, Kai
2022-06-21 17:19   ` 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).