From: Akhil Goyal <akhil.go...@nxp.com> While enqueue/dequeue operations in test_perf_aes_sha, the underlying implementation may not be able to dequeue the same number of buffers as enqueued. So, it may be necessary to perform more dequeue operations if the gap is more than pparams->burst_size * NUM_MBUF_SETS.
Other algos may also need to update the logic if required. Signed-off-by: Akhil Goyal <akhil.go...@nxp.com> --- test/test/test_cryptodev_perf.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/test/test/test_cryptodev_perf.c b/test/test/test_cryptodev_perf.c index 9cdbc39..70ee5bc 100644 --- a/test/test/test_cryptodev_perf.c +++ b/test/test/test_cryptodev_perf.c @@ -3229,17 +3229,21 @@ test_perf_aes_sha(uint8_t dev_id, uint16_t queue_id, total_enqueued += burst_enqueued; } - /* dequeue burst */ - burst_dequeued = rte_cryptodev_dequeue_burst(dev_id, queue_id, - proc_ops, pparams->burst_size); - if (burst_dequeued == 0) - failed_polls++; - else { - processed += burst_dequeued; + do { + /* dequeue burst */ + burst_dequeued = rte_cryptodev_dequeue_burst(dev_id, + queue_id, proc_ops, + pparams->burst_size); + if (burst_dequeued == 0) + failed_polls++; + else { + processed += burst_dequeued; - for (l = 0; l < burst_dequeued; l++) - rte_crypto_op_free(proc_ops[l]); - } + for (l = 0; l < burst_dequeued; l++) + rte_crypto_op_free(proc_ops[l]); + } + } while ((total_enqueued - processed) > + (pparams->burst_size * NUM_MBUF_SETS)); j++; } -- 2.9.3