app/bbdev: dequeue full ring in offload test
authorNicolas Chautru <nicolas.chautru@intel.com>
Mon, 26 Oct 2020 17:48:10 +0000 (10:48 -0700)
committerAkhil Goyal <akhil.goyal@nxp.com>
Mon, 2 Nov 2020 08:24:41 +0000 (09:24 +0100)
update offload dequeue to retrieve the full ring to be
agnostic of implementation.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Aidan Goddard <aidan.goddard@accelercomm.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
app/test-bbdev/test_bbdev_perf.c

index 48783a0..59b37ed 100644 (file)
@@ -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,