[PATCH v1 1/3] test/bbdev: explicit check for allocation failure
Nicolas Chautru
nicolas.chautru at intel.com
Thu Dec 15 00:33:44 CET 2022
Adding check for error on return of the
rte_bbdev_*_op_alloc_bulk calls in bbdev-test.
Fixes: f714a18885a6 ("app/testbbdev: add test application for
bbdev")
Cc: stable at dpdk.org
Signed-off-by: Nicolas Chautru <nicolas.chautru at intel.com>
---
app/test-bbdev/test_bbdev_perf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index a922d69ada..b2096525ea 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -4959,7 +4959,7 @@ offload_latency_test_fft(struct rte_mempool *mempool, struct test_buffers *bufs,
burst_sz = num_to_process - dequeued;
ret = rte_bbdev_fft_op_alloc_bulk(mempool, ops_enq, burst_sz);
- TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", ops_enq);
+ TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", burst_sz);
if (test_vector.op_type != RTE_BBDEV_OP_NONE)
copy_reference_fft_op(ops_enq, burst_sz, dequeued,
bufs->inputs,
@@ -5042,7 +5042,7 @@ offload_latency_test_dec(struct rte_mempool *mempool, struct test_buffers *bufs,
burst_sz = num_to_process - dequeued;
ret = rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz);
- TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", ops_enq);
+ TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", burst_sz);
if (test_vector.op_type != RTE_BBDEV_OP_NONE)
copy_reference_dec_op(ops_enq, burst_sz, dequeued,
bufs->inputs,
@@ -5128,7 +5128,7 @@ offload_latency_test_ldpc_dec(struct rte_mempool *mempool,
burst_sz = num_to_process - dequeued;
ret = rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz);
- TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", ops_enq);
+ TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", burst_sz);
if (test_vector.op_type != RTE_BBDEV_OP_NONE)
copy_reference_ldpc_dec_op(ops_enq, burst_sz, dequeued,
bufs->inputs,
--
2.34.1
More information about the dev
mailing list