summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAmr Mokhtar <amr.mokhtar@intel.com>2019-01-02 14:09:02 +0000
committerPablo de Lara <pablo.de.lara.guarch@intel.com>2019-01-10 16:57:22 +0100
commit4280cd350bab73d06c454d259d782f3a68b581d6 (patch)
treebb1eced5484828147a547e74393033228735e8db /app
parent02dc5b7d58c76e70c66d867ef7750837f7b451c9 (diff)
downloaddpdk-next-eventdev-4280cd350bab73d06c454d259d782f3a68b581d6.zip
dpdk-next-eventdev-4280cd350bab73d06c454d259d782f3a68b581d6.tar.gz
dpdk-next-eventdev-4280cd350bab73d06c454d259d782f3a68b581d6.tar.xz
app/bbdev: fix return value check
Added assert check for rte_bbdev_*_op_alloc_bulk in bbdev test app Coverity issue: 328516, 328525 Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev") Cc: stable@dpdk.org Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Diffstat (limited to 'app')
-rw-r--r--app/test-bbdev/test_bbdev_perf.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 1c4a645..d18ddae 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -2104,7 +2104,10 @@ offload_latency_test_dec(struct rte_mempool *mempool, struct test_buffers *bufs,
if (unlikely(num_to_process - dequeued < burst_sz))
burst_sz = num_to_process - dequeued;
- rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz);
+ ret = rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz);
+ 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,
@@ -2186,7 +2189,10 @@ offload_latency_test_enc(struct rte_mempool *mempool, struct test_buffers *bufs,
if (unlikely(num_to_process - dequeued < burst_sz))
burst_sz = num_to_process - dequeued;
- rte_bbdev_enc_op_alloc_bulk(mempool, ops_enq, burst_sz);
+ ret = rte_bbdev_enc_op_alloc_bulk(mempool, ops_enq, burst_sz);
+ TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops",
+ burst_sz);
+
if (test_vector.op_type != RTE_BBDEV_OP_NONE)
copy_reference_enc_op(ops_enq, burst_sz, dequeued,
bufs->inputs,