Skip to content

Commit 4cc9607

Browse files
author
Lealem Amedie
committed
Fix for AES-ECB benchmark livelock with Async
1 parent 375415d commit 4cc9607

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wolfcrypt/benchmark/benchmark.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4697,7 +4697,7 @@ static void bench_aesecb_internal(int useDeviceID,
46974697
/* while free pending slots in queue, submit ops */
46984698
for (i = 0; i < BENCH_MAX_PENDING; i++) {
46994699
if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&enc[i]), 0,
4700-
&times, numBlocks, &pending)) {
4700+
&times, outer_loop_limit, &pending)) {
47014701
#ifdef HAVE_FIPS
47024702
wc_AesEncryptDirect(&enc[i], bench_cipher, bench_plain);
47034703
#else
@@ -4748,7 +4748,7 @@ static void bench_aesecb_internal(int useDeviceID,
47484748
/* while free pending slots in queue, submit ops */
47494749
for (i = 0; i < BENCH_MAX_PENDING; i++) {
47504750
if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&enc[i]), 0,
4751-
&times, numBlocks, &pending)) {
4751+
&times, outer_loop_limit, &pending)) {
47524752
#ifdef HAVE_FIPS
47534753
wc_AesDecryptDirect(&enc[i], bench_plain, bench_cipher);
47544754
#else

0 commit comments

Comments
 (0)