summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Chautru <nicolas.chautru@intel.com>2019-08-06 07:09:00 -0700
committerThomas Monjalon <thomas@monjalon.net>2019-08-06 23:36:34 +0200
commitbe840d083f61303ad58db486e22b2c24ab28ac55 (patch)
treedfd3dedab04a539a663c01b621f02ac5469e766f
parent4e8cd9041e408014bc799474fca1cce637ff340f (diff)
downloaddpdk-be840d083f61303ad58db486e22b2c24ab28ac55.zip
dpdk-be840d083f61303ad58db486e22b2c24ab28ac55.tar.gz
dpdk-be840d083f61303ad58db486e22b2c24ab28ac55.tar.xz
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 <nicolas.chautru@intel.com>
-rw-r--r--app/test-bbdev/test_bbdev_perf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index a166eaf..7ab61ef 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,