DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2 0/2] coverity fixes for bbdev
@ 2019-08-06 14:08 Nicolas Chautru
  2019-08-06 14:08 ` [dpdk-dev] [PATCH v2 1/2] baseband/turbo_sw: remove logically dead code Nicolas Chautru
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nicolas Chautru @ 2019-08-06 14:08 UTC (permalink / raw)
  To: dev, akhil.goyal; +Cc: ferruh.yigit, thomas, john.mcnamara, Nicolas Chautru

Fixing a few coverity minor issues reported by Coverity for DPDK 19.08 RC : 344980, 344992, 345010. 
v2: Commit message update

Nicolas Chautru (2):
  baseband/turbo_sw: remove logically dead code
  app/bbdev: fix unchecked return valued

 app/test-bbdev/test_bbdev_perf.c                 |  6 ++++--
 drivers/baseband/turbo_sw/bbdev_turbo_software.c | 12 ------------
 2 files changed, 4 insertions(+), 14 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH v2 1/2] baseband/turbo_sw: remove logically dead code
  2019-08-06 14:08 [dpdk-dev] [PATCH v2 0/2] coverity fixes for bbdev Nicolas Chautru
@ 2019-08-06 14:08 ` Nicolas Chautru
  2019-08-06 14:09 ` [dpdk-dev] [PATCH v2 2/2] app/bbdev: fix unchecked return valued Nicolas Chautru
  2019-08-06 21:39 ` [dpdk-dev] [PATCH v2 0/2] coverity fixes for bbdev Thomas Monjalon
  2 siblings, 0 replies; 4+ messages in thread
From: Nicolas Chautru @ 2019-08-06 14:08 UTC (permalink / raw)
  To: dev, akhil.goyal; +Cc: ferruh.yigit, thomas, john.mcnamara, Nicolas Chautru

Error handling code cannot logically be reached.
Coverity issue : 344980, 344992

Fixes: c769c711757a ("baseband/turbo_sw: extend for 5G")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 drivers/baseband/turbo_sw/bbdev_turbo_software.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
index acb63a4..f2fe7a2 100644
--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
@@ -1610,12 +1610,6 @@ struct turbo_sw_queue {
 		}
 		r++;
 	}
-
-	if (mbuf_total_left != 0) {
-		op->status |= 1 << RTE_BBDEV_DATA_ERROR;
-		rte_bbdev_log(ERR,
-				"Mismatch between mbuf length and included Circular buffer sizes");
-	}
 }
 
 static inline void
@@ -1706,12 +1700,6 @@ struct turbo_sw_queue {
 		}
 		r++;
 	}
-
-	if (mbuf_total_left != 0) {
-		op->status |= 1 << RTE_BBDEV_DATA_ERROR;
-		rte_bbdev_log(ERR,
-				"Mismatch between mbuf length and included Circular buffer sizes");
-	}
 }
 
 static inline uint16_t
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH v2 2/2] app/bbdev: fix unchecked return valued
  2019-08-06 14:08 [dpdk-dev] [PATCH v2 0/2] coverity fixes for bbdev Nicolas Chautru
  2019-08-06 14:08 ` [dpdk-dev] [PATCH v2 1/2] baseband/turbo_sw: remove logically dead code Nicolas Chautru
@ 2019-08-06 14:09 ` Nicolas Chautru
  2019-08-06 21:39 ` [dpdk-dev] [PATCH v2 0/2] coverity fixes for bbdev Thomas Monjalon
  2 siblings, 0 replies; 4+ messages in thread
From: Nicolas Chautru @ 2019-08-06 14:09 UTC (permalink / raw)
  To: dev, akhil.goyal; +Cc: ferruh.yigit, thomas, john.mcnamara, Nicolas Chautru

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>
---
 app/test-bbdev/test_bbdev_perf.c | 6 ++++--
 1 file 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 @@ typedef int (test_case_function)(struct active_device *ad,
 		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 @@ typedef int (test_case_function)(struct active_device *ad,
 		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,
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/2] coverity fixes for bbdev
  2019-08-06 14:08 [dpdk-dev] [PATCH v2 0/2] coverity fixes for bbdev Nicolas Chautru
  2019-08-06 14:08 ` [dpdk-dev] [PATCH v2 1/2] baseband/turbo_sw: remove logically dead code Nicolas Chautru
  2019-08-06 14:09 ` [dpdk-dev] [PATCH v2 2/2] app/bbdev: fix unchecked return valued Nicolas Chautru
@ 2019-08-06 21:39 ` Thomas Monjalon
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2019-08-06 21:39 UTC (permalink / raw)
  To: Nicolas Chautru; +Cc: dev, akhil.goyal, ferruh.yigit, john.mcnamara

06/08/2019 16:08, Nicolas Chautru:
> Fixing a few coverity minor issues reported by Coverity for DPDK 19.08 RC : 344980, 344992, 345010. 
> v2: Commit message update
> 
> Nicolas Chautru (2):
>   baseband/turbo_sw: remove logically dead code
>   app/bbdev: fix unchecked return valued

Applied, thanks




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-06 21:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-06 14:08 [dpdk-dev] [PATCH v2 0/2] coverity fixes for bbdev Nicolas Chautru
2019-08-06 14:08 ` [dpdk-dev] [PATCH v2 1/2] baseband/turbo_sw: remove logically dead code Nicolas Chautru
2019-08-06 14:09 ` [dpdk-dev] [PATCH v2 2/2] app/bbdev: fix unchecked return valued Nicolas Chautru
2019-08-06 21:39 ` [dpdk-dev] [PATCH v2 0/2] coverity fixes for bbdev Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).