aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Peltonen <janne.peltonen@nokia.com>2023-07-04 11:04:10 +0300
committerPetri Savolainen <petri.savolainen@nokia.com>2023-07-10 13:08:12 +0300
commitcbea6ef9d48c1140359ff5a4927f40d3427576c1 (patch)
treebfe1931bd300e254ad86cbd577f4bff3a606d6ec
parent2fdf01b70877a19a620e4c87daf6551a6b771ffa (diff)
test: performance: crypto: use byte mode with all algorithms
With new enough ODP API version use byte mode even with algorithms that support bit mode. With older API version do the range unit conversion as before. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
-rw-r--r--test/performance/odp_crypto.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/performance/odp_crypto.c b/test/performance/odp_crypto.c
index 52af6d2fc..fed3ebad8 100644
--- a/test/performance/odp_crypto.c
+++ b/test/performance/odp_crypto.c
@@ -1,5 +1,5 @@
/* Copyright (c) 2015-2018, Linaro Limited
- * Copyright (c) 2022, Nokia
+ * Copyright (c) 2023, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -1170,6 +1170,12 @@ static int run_measure_one_config(test_run_arg_t *arg)
rc = 1;
}
+#if ODP_VERSION_API >= ODP_VERSION_API_NUM(1, 42, 0)
+ /* Bit mode ciphers can now be used in byte mode. */
+ config->cipher_in_bit_mode = 0;
+ config->auth_in_bit_mode = 0;
+#endif
+
if (rc == 0)
rc = create_session_from_config(&session, config, cargs);
if (rc) {