diff mbox series

[API-NEXT,v5,03/23] test: odp_crypto: update performance test to set auth_digest_length

Message ID 20170601090339.9313-4-dmitry.ereminsolenikov@linaro.org
State Accepted
Commit 93ee286c21a576c265463ca5dcd17b39ef80962b
Headers show
Series Major cryptography code rework | expand

Commit Message

Dmitry Eremin-Solenikov June 1, 2017, 9:03 a.m. UTC
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
 test/common_plat/performance/odp_crypto.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

-- 
2.11.0
diff mbox series

Patch

diff --git a/test/common_plat/performance/odp_crypto.c b/test/common_plat/performance/odp_crypto.c
index b3857973eee7..6a58294a25ff 100644
--- a/test/common_plat/performance/odp_crypto.c
+++ b/test/common_plat/performance/odp_crypto.c
@@ -50,7 +50,6 @@  static uint8_t test_key24[24] = { 0x01, 0x02, 0x03, 0x04, 0x05,
 typedef struct {
 	const char *name;		      /**< Algorithm name */
 	odp_crypto_session_param_t session;   /**< Prefilled crypto session params */
-	unsigned int hash_adjust;	      /**< Size of hash */
 } crypto_alg_config_t;
 
 /**
@@ -209,9 +208,9 @@  static crypto_alg_config_t algs_config[] = {
 			.auth_key = {
 				.data = test_key16,
 				.length = sizeof(test_key16)
-			}
+			},
+			.auth_digest_len = 12,
 		},
-		.hash_adjust = 12
 	},
 	{
 		.name = "null-hmac-md5-96",
@@ -221,9 +220,9 @@  static crypto_alg_config_t algs_config[] = {
 			.auth_key = {
 				.data = test_key16,
 				.length = sizeof(test_key16)
-			}
+			},
+			.auth_digest_len = 12,
 		},
-		.hash_adjust = 12
 	},
 };
 
@@ -578,7 +577,7 @@  run_measure_one(crypto_args_t *cargs,
 				mem = odp_packet_data(params.out_pkt);
 				print_mem("Immediately encrypted packet", mem,
 					  payload_length +
-					  config->hash_adjust);
+					  config->session.auth_digest_len);
 			}
 			if (!cargs->in_place) {
 				if (cargs->reuse_packet) {
@@ -611,7 +610,8 @@  run_measure_one(crypto_args_t *cargs,
 					print_mem("Receieved encrypted packet",
 						  mem,
 						  payload_length +
-						  config->hash_adjust);
+						  config->
+						  session.auth_digest_len);
 				}
 				if (cargs->reuse_packet) {
 					params.pkt = out_pkt;