From: Nicolas Chautru Date: Tue, 6 Aug 2019 14:09:00 +0000 (-0700) Subject: app/bbdev: fix bulk allocation checks X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=be840d083f61303ad58db486e22b2c24ab28ac55;p=dpdk.git app/bbdev: fix bulk allocation checks Returned value from rte_bbdev_enc_op_alloc_bulk not checked consistently. Coverity issue: 344986 Fixes: d819c08327f3 ("app/bbdev: update for 5GNR") Signed-off-by: Nicolas Chautru --- diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index a166eaf687..7ab61eff81 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -3163,7 +3163,8 @@ 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, "rte_bbdev_op_alloc_bulk() failed"); if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_enc_op(ops_enq, burst_sz, dequeued, bufs->inputs, @@ -3244,7 +3245,8 @@ offload_latency_test_ldpc_enc(struct rte_mempool *mempool, 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, "rte_bbdev_op_alloc_bulk() failed"); if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_ldpc_enc_op(ops_enq, burst_sz, dequeued, bufs->inputs,