From 4cc960787f89c0d259f120ca7e6f0716afd42adb Mon Sep 17 00:00:00 2001 From: Lealem Amedie Date: Thu, 15 Feb 2024 12:51:22 -0700 Subject: [PATCH] Fix for AES-ECB benchmark livelock with Async --- wolfcrypt/benchmark/benchmark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index d3b331afd..3c5074a0f 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -4697,7 +4697,7 @@ static void bench_aesecb_internal(int useDeviceID, /* while free pending slots in queue, submit ops */ for (i = 0; i < BENCH_MAX_PENDING; i++) { if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&enc[i]), 0, - ×, numBlocks, &pending)) { + ×, outer_loop_limit, &pending)) { #ifdef HAVE_FIPS wc_AesEncryptDirect(&enc[i], bench_cipher, bench_plain); #else @@ -4748,7 +4748,7 @@ exit_aes_enc: /* while free pending slots in queue, submit ops */ for (i = 0; i < BENCH_MAX_PENDING; i++) { if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&enc[i]), 0, - ×, numBlocks, &pending)) { + ×, outer_loop_limit, &pending)) { #ifdef HAVE_FIPS wc_AesDecryptDirect(&enc[i], bench_plain, bench_cipher); #else