From f32e93b18fb769f75977a67666f3f95b1db724af Mon Sep 17 00:00:00 2001 From: Nicolas Chautru Date: Mon, 26 Oct 2020 10:48:10 -0700 Subject: [PATCH] app/bbdev: dequeue full ring in offload test update offload dequeue to retrieve the full ring to be agnostic of implementation. Signed-off-by: Nicolas Chautru Acked-by: Aidan Goddard Acked-by: Dave Burley --- app/test-bbdev/test_bbdev_perf.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index 48783a0b30..59b37ede4a 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -4400,8 +4400,8 @@ offload_latency_test_dec(struct rte_mempool *mempool, struct test_buffers *bufs, /* Dequeue one operation */ do { deq += rte_bbdev_dequeue_dec_ops(dev_id, queue_id, - &ops_deq[deq], 1); - } while (unlikely(deq != 1)); + &ops_deq[deq], enq); + } while (unlikely(deq == 0)); deq_last_time = rte_rdtsc_precise() - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st->deq_max_time, @@ -4491,8 +4491,8 @@ offload_latency_test_ldpc_dec(struct rte_mempool *mempool, /* Dequeue one operation */ do { deq += rte_bbdev_dequeue_ldpc_dec_ops(dev_id, queue_id, - &ops_deq[deq], 1); - } while (unlikely(deq != 1)); + &ops_deq[deq], enq); + } while (unlikely(deq == 0)); deq_last_time = rte_rdtsc_precise() - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st->deq_max_time, @@ -4579,8 +4579,8 @@ offload_latency_test_enc(struct rte_mempool *mempool, struct test_buffers *bufs, /* Dequeue one operation */ do { deq += rte_bbdev_dequeue_enc_ops(dev_id, queue_id, - &ops_deq[deq], 1); - } while (unlikely(deq != 1)); + &ops_deq[deq], enq); + } while (unlikely(deq == 0)); deq_last_time = rte_rdtsc_precise() - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st->deq_max_time, @@ -4662,8 +4662,8 @@ offload_latency_test_ldpc_enc(struct rte_mempool *mempool, /* Dequeue one operation */ do { deq += rte_bbdev_dequeue_ldpc_enc_ops(dev_id, queue_id, - &ops_deq[deq], 1); - } while (unlikely(deq != 1)); + &ops_deq[deq], enq); + } while (unlikely(deq == 0)); deq_last_time = rte_rdtsc_precise() - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st->deq_max_time, -- 2.20.1