When testing the async encryption performance of the AEAD algorithm, the same bd_pool may not be processed completely and is sent as a new request in the next loop. As a result, incorrect encrypted data is stored in the dst. When the incorrect encrypted data is stored for decryption, a decryption error occurs.
This problem can be solved by restricting the sending times of the first bd_pool only once and saving the dst data in the first bd_pool to a file for decryption.
Signed-off-by: Qi Tao taoqi10@huawei.com --- uadk_tool/benchmark/sec_uadk_benchmark.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/uadk_tool/benchmark/sec_uadk_benchmark.c b/uadk_tool/benchmark/sec_uadk_benchmark.c index 411d0c47..469ef8b3 100644 --- a/uadk_tool/benchmark/sec_uadk_benchmark.c +++ b/uadk_tool/benchmark/sec_uadk_benchmark.c @@ -1356,6 +1356,12 @@ static void *sec_uadk_aead_async(void *arg) break; try_cnt = 0; i = count % MAX_POOL_LENTH; + + if (i == 0 && count > 0) { + count++; + continue; + } + areq.src = uadk_pool->bds[i].src; areq.dst = uadk_pool->bds[i].dst; areq.mac = uadk_pool->bds[i].mac;