DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1 0/3] bbdev: remove offload cost
@ 2022-12-14 23:33 Nicolas Chautru
  2022-12-14 23:33 ` [PATCH v1 1/3] test/bbdev: explicit check for allocation failure Nicolas Chautru
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Nicolas Chautru @ 2022-12-14 23:33 UTC (permalink / raw)
  To: dev, maxime.coquelin; +Cc: hernan.vargas, Nicolas Chautru

Removing the optional build flag RTE_BBDEV_OFFLOAD_COST
from Intel baseband PMDs and bbdev-test application.
This helps to simplify build variants complexity
causing compilation issues to be missed.

Maxime, the first commit is actually a miss related 
to last commit on top of tree, you may want to merge
these two commits together in the history.
Sorry for missing it earlier.


Nicolas Chautru (3):
  test/bbdev: explicit check for allocation failure
  drivers/baseband: remove offload cost optional build flag
  app/bbdev-test: remove offload cost optional build flag

 app/test-bbdev/test_bbdev_perf.c              | 29 +-------
 drivers/baseband/acc/acc_common.h             | 12 +---
 drivers/baseband/acc/rte_acc100_pmd.c         |  2 -
 drivers/baseband/acc/rte_acc200_pmd.c         |  2 -
 .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         | 10 ---
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  | 10 ---
 .../baseband/turbo_sw/bbdev_turbo_software.c  | 70 ++++---------------
 7 files changed, 17 insertions(+), 118 deletions(-)

-- 
2.34.1


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

* [PATCH v1 1/3] test/bbdev: explicit check for allocation failure
  2022-12-14 23:33 [PATCH v1 0/3] bbdev: remove offload cost Nicolas Chautru
@ 2022-12-14 23:33 ` Nicolas Chautru
  2023-01-06 14:51   ` Maxime Coquelin
  2023-01-10  8:32   ` Maxime Coquelin
  2022-12-14 23:33 ` [PATCH v1 2/3] drivers/baseband: remove offload cost optional build flag Nicolas Chautru
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 14+ messages in thread
From: Nicolas Chautru @ 2022-12-14 23:33 UTC (permalink / raw)
  To: dev, maxime.coquelin; +Cc: hernan.vargas, Nicolas Chautru, stable

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@dpdk.org

Signed-off-by: Nicolas Chautru <nicolas.chautru@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


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

* [PATCH v1 2/3] drivers/baseband: remove offload cost optional build flag
  2022-12-14 23:33 [PATCH v1 0/3] bbdev: remove offload cost Nicolas Chautru
  2022-12-14 23:33 ` [PATCH v1 1/3] test/bbdev: explicit check for allocation failure Nicolas Chautru
@ 2022-12-14 23:33 ` Nicolas Chautru
  2023-01-06 14:54   ` Maxime Coquelin
  2022-12-14 23:33 ` [PATCH v1 3/3] app/bbdev-test: " Nicolas Chautru
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Nicolas Chautru @ 2022-12-14 23:33 UTC (permalink / raw)
  To: dev, maxime.coquelin; +Cc: hernan.vargas, Nicolas Chautru

Remove the optional build flag for intel PMDs so that
it is enabled by default and having to maintain single
build variant.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 drivers/baseband/acc/acc_common.h             | 12 +---
 drivers/baseband/acc/rte_acc100_pmd.c         |  2 -
 drivers/baseband/acc/rte_acc200_pmd.c         |  2 -
 .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         | 10 ---
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  | 10 ---
 .../baseband/turbo_sw/bbdev_turbo_software.c  | 70 ++++---------------
 6 files changed, 14 insertions(+), 92 deletions(-)

diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h
index c076dc72cc..84a428ee1d 100644
--- a/drivers/baseband/acc/acc_common.h
+++ b/drivers/baseband/acc/acc_common.h
@@ -917,12 +917,8 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,
 {
 	union acc_enqueue_reg_fmt enq_req;
 	union acc_dma_desc *desc;
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	uint64_t start_time = 0;
 	queue_stats->acc_offload_cycles = 0;
-#else
-	RTE_SET_USED(queue_stats);
-#endif
 
 	/* Set Sdone and IRQ enable bit on last descriptor. */
 	desc = acc_desc(q, n - 1);
@@ -964,17 +960,13 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,
 
 		rte_wmb();
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 		/* Start time measurement for enqueue function offload. */
 		start_time = rte_rdtsc_precise();
-#endif
+
 		rte_acc_log(DEBUG, "Debug : MMIO Enqueue");
 		mmio_write(q->mmio_reg_enqueue, enq_req.val);
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
-		queue_stats->acc_offload_cycles +=
-				rte_rdtsc_precise() - start_time;
-#endif
+		queue_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
 
 		q->aq_enqueued++;
 		q->sw_ring_head += enq_batch_size;
diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
index ba8247d47e..b3164529dd 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -15,9 +15,7 @@
 #include <rte_hexdump.h>
 #include <rte_pci.h>
 #include <bus_pci_driver.h>
-#ifdef RTE_BBDEV_OFFLOAD_COST
 #include <rte_cycles.h>
-#endif
 
 #include <rte_bbdev.h>
 #include <rte_bbdev_pmd.h>
diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index c5123cfef0..204f37349b 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -15,9 +15,7 @@
 #include <rte_hexdump.h>
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
-#ifdef RTE_BBDEV_OFFLOAD_COST
 #include <rte_cycles.h>
-#endif
 
 #include <rte_bbdev.h>
 #include <rte_bbdev_pmd.h>
diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index d520d5238f..f29565af8c 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -13,9 +13,7 @@
 #include <rte_pci.h>
 #include <bus_pci_driver.h>
 #include <rte_byteorder.h>
-#ifdef RTE_BBDEV_OFFLOAD_COST
 #include <rte_cycles.h>
-#endif
 
 #include <rte_bbdev.h>
 #include <rte_bbdev_pmd.h>
@@ -798,28 +796,20 @@ static inline void
 fpga_dma_enqueue(struct fpga_queue *q, uint16_t num_desc,
 		struct rte_bbdev_stats *queue_stats)
 {
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	uint64_t start_time = 0;
 	queue_stats->acc_offload_cycles = 0;
-#else
-	RTE_SET_USED(queue_stats);
-#endif
 
 	/* Update tail and shadow_tail register */
 	q->tail = (q->tail + num_desc) & q->sw_ring_wrap_mask;
 
 	rte_wmb();
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	/* Start time measurement for enqueue function offload. */
 	start_time = rte_rdtsc_precise();
-#endif
 	mmio_write_16(q->shadow_tail_addr, q->tail);
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	rte_wmb();
 	queue_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
-#endif
 }
 
 /* Read flag value 0/1/ from bitmap */
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index fc86f13bee..a4a963f74d 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -13,9 +13,7 @@
 #include <rte_pci.h>
 #include <bus_pci_driver.h>
 #include <rte_byteorder.h>
-#ifdef RTE_BBDEV_OFFLOAD_COST
 #include <rte_cycles.h>
-#endif
 
 #include <rte_bbdev.h>
 #include <rte_bbdev_pmd.h>
@@ -1073,28 +1071,20 @@ static inline void
 fpga_dma_enqueue(struct fpga_queue *q, uint16_t num_desc,
 		struct rte_bbdev_stats *queue_stats)
 {
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	uint64_t start_time = 0;
 	queue_stats->acc_offload_cycles = 0;
-#else
-	RTE_SET_USED(queue_stats);
-#endif
 
 	/* Update tail and shadow_tail register */
 	q->tail = (q->tail + num_desc) & q->sw_ring_wrap_mask;
 
 	rte_wmb();
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	/* Start time measurement for enqueue function offload. */
 	start_time = rte_rdtsc_precise();
-#endif
 	mmio_write_16(q->shadow_tail_addr, q->tail);
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	rte_wmb();
 	queue_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
-#endif
 }
 
 /* Calculates number of CBs in processed encoder TB based on 'r' and input
diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
index 7afa298848..8ddc7ff05f 100644
--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
@@ -584,11 +584,7 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op,
 	struct bblib_turbo_encoder_response turbo_resp;
 	struct bblib_rate_match_dl_request rm_req;
 	struct bblib_rate_match_dl_response rm_resp;
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	uint64_t start_time;
-#else
-	RTE_SET_USED(q_stats);
-#endif
 
 	k_idx = compute_idx(k);
 	in = rte_pktmbuf_mtod_offset(m_in, uint8_t *, in_offset);
@@ -622,14 +618,10 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op,
 		}
 
 		crc_resp.data = in;
-#ifdef RTE_BBDEV_OFFLOAD_COST
 		start_time = rte_rdtsc_precise();
-#endif
 		/* CRC24A generation */
 		bblib_lte_crc24a_gen(&crc_req, &crc_resp);
-#ifdef RTE_BBDEV_OFFLOAD_COST
 		q_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
-#endif
 	} else if (enc->op_flags & RTE_BBDEV_TURBO_CRC_24B_ATTACH) {
 		/* CRC24B */
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
@@ -658,14 +650,10 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op,
 		}
 
 		crc_resp.data = in;
-#ifdef RTE_BBDEV_OFFLOAD_COST
 		start_time = rte_rdtsc_precise();
-#endif
 		/* CRC24B generation */
 		bblib_lte_crc24b_gen(&crc_req, &crc_resp);
-#ifdef RTE_BBDEV_OFFLOAD_COST
 		q_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
-#endif
 	}
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
 	else {
@@ -717,18 +705,16 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op,
 	turbo_resp.output_win_1 = out1;
 	turbo_resp.output_win_2 = out2;
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	start_time = rte_rdtsc_precise();
-#endif
+
 	/* Turbo encoding */
 	if (bblib_turbo_encoder(&turbo_req, &turbo_resp) != 0) {
 		op->status |= 1 << RTE_BBDEV_DRV_ERROR;
 		rte_bbdev_log(ERR, "Turbo Encoder failed");
 		return;
 	}
-#ifdef RTE_BBDEV_OFFLOAD_COST
+
 	q_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
-#endif
 
 	/* Restore 3 first bytes of next CB if they were overwritten by CRC*/
 	if (first_3_bytes != 0)
@@ -791,18 +777,16 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op,
 		else
 			rm_req.bypass_rvidx = 0;
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 		start_time = rte_rdtsc_precise();
-#endif
+
 		/* Rate-Matching */
 		if (bblib_rate_match_dl(&rm_req, &rm_resp) != 0) {
 			op->status |= 1 << RTE_BBDEV_DRV_ERROR;
 			rte_bbdev_log(ERR, "Rate matching failed");
 			return;
 		}
-#ifdef RTE_BBDEV_OFFLOAD_COST
+
 		q_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
-#endif
 
 		/* SW fills an entire last byte even if E%8 != 0. Clear the
 		 * superfluous data bits for consistency with HW device.
@@ -873,11 +857,7 @@ process_ldpc_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op,
 	uint16_t in_length_in_bits = K - enc->n_filler;
 	uint16_t in_length_in_bytes = (in_length_in_bits + 7) >> 3;
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	uint64_t start_time = rte_rdtsc_precise();
-#else
-	RTE_SET_USED(q_stats);
-#endif
 
 	in = rte_pktmbuf_mtod_offset(m_in, uint8_t *, in_offset);
 
@@ -977,9 +957,7 @@ process_ldpc_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op,
 	rte_memcpy(rm_out, q->deint_output, out_len);
 	enc->output.length += out_len;
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	q_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
-#endif
 #else
 	RTE_SET_USED(q);
 	RTE_SET_USED(op);
@@ -1179,9 +1157,7 @@ enqueue_enc_all_ops(struct turbo_sw_queue *q, struct rte_bbdev_enc_op **ops,
 		uint16_t nb_ops, struct rte_bbdev_stats *queue_stats)
 {
 	uint16_t i;
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	queue_stats->acc_offload_cycles = 0;
-#endif
 
 	for (i = 0; i < nb_ops; ++i)
 		enqueue_enc_one_op(q, ops[i], queue_stats);
@@ -1196,9 +1172,7 @@ enqueue_ldpc_enc_all_ops(struct turbo_sw_queue *q,
 		uint16_t nb_ops, struct rte_bbdev_stats *queue_stats)
 {
 	uint16_t i;
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	queue_stats->acc_offload_cycles = 0;
-#endif
 
 	for (i = 0; i < nb_ops; ++i)
 		enqueue_ldpc_enc_one_op(q, ops[i], queue_stats);
@@ -1245,11 +1219,7 @@ process_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op,
 	struct bblib_turbo_decoder_request turbo_req;
 	struct bblib_turbo_decoder_response turbo_resp;
 	struct rte_bbdev_op_turbo_dec *dec = &op->turbo_dec;
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	uint64_t start_time;
-#else
-	RTE_SET_USED(q_stats);
-#endif
 
 	k_idx = compute_idx(k);
 
@@ -1274,14 +1244,11 @@ process_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op,
 		deint_req.ncb = ncb;
 		deint_resp.pinteleavebuffer = q->deint_output;
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
-	start_time = rte_rdtsc_precise();
-#endif
+		start_time = rte_rdtsc_precise();
 		/* Sub-block De-Interleaving */
 		bblib_deinterleave_ul(&deint_req, &deint_resp);
-#ifdef RTE_BBDEV_OFFLOAD_COST
-	q_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
-#endif
+
+		q_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
 	} else
 		move_padding_bytes(in, q->deint_output, k, ncb);
 
@@ -1301,14 +1268,12 @@ process_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op,
 	adapter_req.pinteleavebuffer = adapter_input;
 	adapter_resp.pharqout = q->adapter_output;
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	start_time = rte_rdtsc_precise();
-#endif
+
 	/* Turbo decode adaptation */
 	bblib_turbo_adapter_ul(&adapter_req, &adapter_resp);
-#ifdef RTE_BBDEV_OFFLOAD_COST
+
 	q_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
-#endif
 
 	out = (uint8_t *)mbuf_append(m_out_head, m_out,
 			((k - crc24_overlap) >> 3));
@@ -1335,14 +1300,12 @@ process_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op,
 	turbo_resp.cb_buf = q->code_block;
 	turbo_resp.output = out;
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	start_time = rte_rdtsc_precise();
-#endif
+
 	/* Turbo decode */
 	iter_cnt = bblib_turbo_decoder(&turbo_req, &turbo_resp);
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	q_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
-#endif
+
 	dec->hard_output.length += (k >> 3);
 
 	if (iter_cnt > 0) {
@@ -1405,11 +1368,7 @@ process_ldpc_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op,
 	K = sys_cols * dec->z_c;
 	parity_offset = K - 2 * dec->z_c;
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	uint64_t start_time = rte_rdtsc_precise();
-#else
-	RTE_SET_USED(q_stats);
-#endif
 
 	in = rte_pktmbuf_mtod_offset(m_in, uint8_t *, in_offset);
 
@@ -1524,9 +1483,8 @@ process_ldpc_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op,
 			op->status |= 1 << RTE_BBDEV_CRC_ERROR;
 	}
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	q_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
-#endif
+
 	if (check_bit(dec->op_flags, RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE)) {
 		harq_out = NULL;
 		if (m_harq_out != NULL) {
@@ -1757,9 +1715,7 @@ enqueue_dec_all_ops(struct turbo_sw_queue *q, struct rte_bbdev_dec_op **ops,
 		uint16_t nb_ops, struct rte_bbdev_stats *queue_stats)
 {
 	uint16_t i;
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	queue_stats->acc_offload_cycles = 0;
-#endif
 
 	for (i = 0; i < nb_ops; ++i)
 		enqueue_dec_one_op(q, ops[i], queue_stats);
@@ -1774,9 +1730,7 @@ enqueue_ldpc_dec_all_ops(struct turbo_sw_queue *q,
 		uint16_t nb_ops, struct rte_bbdev_stats *queue_stats)
 {
 	uint16_t i;
-#ifdef RTE_BBDEV_OFFLOAD_COST
 	queue_stats->acc_offload_cycles = 0;
-#endif
 
 	for (i = 0; i < nb_ops; ++i)
 		enqueue_ldpc_dec_one_op(q, ops[i], queue_stats);
-- 
2.34.1


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

* [PATCH v1 3/3] app/bbdev-test: remove offload cost optional build flag
  2022-12-14 23:33 [PATCH v1 0/3] bbdev: remove offload cost Nicolas Chautru
  2022-12-14 23:33 ` [PATCH v1 1/3] test/bbdev: explicit check for allocation failure Nicolas Chautru
  2022-12-14 23:33 ` [PATCH v1 2/3] drivers/baseband: remove offload cost optional build flag Nicolas Chautru
@ 2022-12-14 23:33 ` Nicolas Chautru
  2023-01-06 14:55   ` Maxime Coquelin
  2023-01-03 22:07 ` [PATCH v1 0/3] bbdev: remove offload cost Chautru, Nicolas
  2023-01-10  8:43 ` Maxime Coquelin
  4 siblings, 1 reply; 14+ messages in thread
From: Nicolas Chautru @ 2022-12-14 23:33 UTC (permalink / raw)
  To: dev, maxime.coquelin; +Cc: hernan.vargas, Nicolas Chautru

Remove the optional build flag for bbdev-test application
so that it is enabled by default and having to maintain single
build variant.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 app/test-bbdev/test_bbdev_perf.c | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index b2096525ea..3818b74c79 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -166,7 +166,6 @@ struct thread_params {
 	struct rte_bbdev_fft_op *fft_ops[MAX_BURST];
 };
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 /* Stores time statistics */
 struct test_time_stats {
 	/* Stores software enqueue total working time */
@@ -188,7 +187,6 @@ struct test_time_stats {
 	/* Stores maximum value of dequeue working time */
 	uint64_t deq_max_time;
 };
-#endif
 
 typedef int (test_case_function)(struct active_device *ad,
 		struct test_op_params *op_params);
@@ -4916,7 +4914,6 @@ validation_test(struct active_device *ad, struct test_op_params *op_params)
 	return validation_latency_test(ad, op_params, false);
 }
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 static int
 get_bbdev_queue_stats(uint16_t dev_id, uint16_t queue_id,
 		struct rte_bbdev_stats *stats)
@@ -5367,19 +5364,11 @@ offload_latency_test_ldpc_enc(struct rte_mempool *mempool,
 
 	return i;
 }
-#endif
 
 static int
 offload_cost_test(struct active_device *ad,
 		struct test_op_params *op_params)
 {
-#ifndef RTE_BBDEV_OFFLOAD_COST
-	RTE_SET_USED(ad);
-	RTE_SET_USED(op_params);
-	printf("Offload latency test is disabled.\n");
-	printf("Set RTE_BBDEV_OFFLOAD_COST to 'y' to turn the test on.\n");
-	return TEST_SKIPPED;
-#else
 	int iter;
 	uint16_t burst_sz = op_params->burst_sz;
 	const uint16_t num_to_process = op_params->num_to_process;
@@ -5492,10 +5481,8 @@ offload_cost_test(struct active_device *ad,
 			stats.dequeue_err_count);
 
 	return TEST_SUCCESS;
-#endif
 }
 
-#ifdef RTE_BBDEV_OFFLOAD_COST
 static int
 offload_latency_empty_q_test_dec(uint16_t dev_id, uint16_t queue_id,
 		const uint16_t num_to_process, uint16_t burst_sz,
@@ -5563,19 +5550,10 @@ offload_latency_empty_q_test_enc(uint16_t dev_id, uint16_t queue_id,
 	return i;
 }
 
-#endif
-
 static int
 offload_latency_empty_q_test(struct active_device *ad,
 		struct test_op_params *op_params)
 {
-#ifndef RTE_BBDEV_OFFLOAD_COST
-	RTE_SET_USED(ad);
-	RTE_SET_USED(op_params);
-	printf("Offload latency empty dequeue test is disabled.\n");
-	printf("Set RTE_BBDEV_OFFLOAD_COST to 'y' to turn the test on.\n");
-	return TEST_SKIPPED;
-#else
 	int iter;
 	uint64_t deq_total_time, deq_min_time, deq_max_time;
 	uint16_t burst_sz = op_params->burst_sz;
@@ -5625,7 +5603,6 @@ offload_latency_empty_q_test(struct active_device *ad,
 			rte_get_tsc_hz());
 
 	return TEST_SUCCESS;
-#endif
 }
 
 static int
-- 
2.34.1


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

* RE: [PATCH v1 0/3] bbdev: remove offload cost
  2022-12-14 23:33 [PATCH v1 0/3] bbdev: remove offload cost Nicolas Chautru
                   ` (2 preceding siblings ...)
  2022-12-14 23:33 ` [PATCH v1 3/3] app/bbdev-test: " Nicolas Chautru
@ 2023-01-03 22:07 ` Chautru, Nicolas
  2023-01-04 12:42   ` Maxime Coquelin
  2023-01-10  8:43 ` Maxime Coquelin
  4 siblings, 1 reply; 14+ messages in thread
From: Chautru, Nicolas @ 2023-01-03 22:07 UTC (permalink / raw)
  To: dev, maxime.coquelin; +Cc: Vargas, Hernan

Hi Maxime, 

Happy new year.

What does the state " Awaiting Upstream" mean in patchwork for that serie? Can this be applied? 

Thanks
Nic



> -----Original Message-----
> From: Chautru, Nicolas <nicolas.chautru@intel.com>
> Sent: Wednesday, December 14, 2022 3:34 PM
> To: dev@dpdk.org; maxime.coquelin@redhat.com
> Cc: Vargas, Hernan <hernan.vargas@intel.com>; Chautru, Nicolas
> <nicolas.chautru@intel.com>
> Subject: [PATCH v1 0/3] bbdev: remove offload cost
> 
> Removing the optional build flag RTE_BBDEV_OFFLOAD_COST from Intel
> baseband PMDs and bbdev-test application.
> This helps to simplify build variants complexity causing compilation issues to
> be missed.
> 
> Maxime, the first commit is actually a miss related to last commit on top of
> tree, you may want to merge these two commits together in the history.
> Sorry for missing it earlier.
> 
> 
> Nicolas Chautru (3):
>   test/bbdev: explicit check for allocation failure
>   drivers/baseband: remove offload cost optional build flag
>   app/bbdev-test: remove offload cost optional build flag
> 
>  app/test-bbdev/test_bbdev_perf.c              | 29 +-------
>  drivers/baseband/acc/acc_common.h             | 12 +---
>  drivers/baseband/acc/rte_acc100_pmd.c         |  2 -
>  drivers/baseband/acc/rte_acc200_pmd.c         |  2 -
>  .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         | 10 ---
>  drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  | 10 ---
>  .../baseband/turbo_sw/bbdev_turbo_software.c  | 70 ++++---------------
>  7 files changed, 17 insertions(+), 118 deletions(-)
> 
> --
> 2.34.1


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

* Re: [PATCH v1 0/3] bbdev: remove offload cost
  2023-01-03 22:07 ` [PATCH v1 0/3] bbdev: remove offload cost Chautru, Nicolas
@ 2023-01-04 12:42   ` Maxime Coquelin
  2023-01-04 18:01     ` Chautru, Nicolas
  0 siblings, 1 reply; 14+ messages in thread
From: Maxime Coquelin @ 2023-01-04 12:42 UTC (permalink / raw)
  To: Chautru, Nicolas, dev; +Cc: Vargas, Hernan

Hi Nicolas,

On 1/3/23 23:07, Chautru, Nicolas wrote:
> Hi Maxime,
> 
> Happy new year.

Happy new year.

> What does the state " Awaiting Upstream" mean in patchwork for that serie? Can this be applied?

It means it is the the bbdev tree, and is awaiting being pulled into the
main tree.

So it is applied, but only in the bbdev tree for now.
This should not be an issue since you shold base your work on top of the
bbdev tree.

Regards,
Maxime

> Thanks
> Nic
> 
> 
> 
>> -----Original Message-----
>> From: Chautru, Nicolas <nicolas.chautru@intel.com>
>> Sent: Wednesday, December 14, 2022 3:34 PM
>> To: dev@dpdk.org; maxime.coquelin@redhat.com
>> Cc: Vargas, Hernan <hernan.vargas@intel.com>; Chautru, Nicolas
>> <nicolas.chautru@intel.com>
>> Subject: [PATCH v1 0/3] bbdev: remove offload cost
>>
>> Removing the optional build flag RTE_BBDEV_OFFLOAD_COST from Intel
>> baseband PMDs and bbdev-test application.
>> This helps to simplify build variants complexity causing compilation issues to
>> be missed.
>>
>> Maxime, the first commit is actually a miss related to last commit on top of
>> tree, you may want to merge these two commits together in the history.
>> Sorry for missing it earlier.
>>
>>
>> Nicolas Chautru (3):
>>    test/bbdev: explicit check for allocation failure
>>    drivers/baseband: remove offload cost optional build flag
>>    app/bbdev-test: remove offload cost optional build flag
>>
>>   app/test-bbdev/test_bbdev_perf.c              | 29 +-------
>>   drivers/baseband/acc/acc_common.h             | 12 +---
>>   drivers/baseband/acc/rte_acc100_pmd.c         |  2 -
>>   drivers/baseband/acc/rte_acc200_pmd.c         |  2 -
>>   .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         | 10 ---
>>   drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  | 10 ---
>>   .../baseband/turbo_sw/bbdev_turbo_software.c  | 70 ++++---------------
>>   7 files changed, 17 insertions(+), 118 deletions(-)
>>
>> --
>> 2.34.1
> 


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

* RE: [PATCH v1 0/3] bbdev: remove offload cost
  2023-01-04 12:42   ` Maxime Coquelin
@ 2023-01-04 18:01     ` Chautru, Nicolas
  2023-01-05  9:53       ` Maxime Coquelin
  0 siblings, 1 reply; 14+ messages in thread
From: Chautru, Nicolas @ 2023-01-04 18:01 UTC (permalink / raw)
  To: Maxime Coquelin, dev; +Cc: Vargas, Hernan

Hi Maxime, 

I don’t see them on the baseband tree  dpdk-next-baseband

I did a clean clone, these are the last 3 commits
  dc0a5a0d2a (HEAD -> for-main, origin/for-main) test/bbdev: explicit check for allocation failure
  0e927787a3 test/bbdev: fix build issue with optional build flag
  51d49ccd23 test/bbdev: fix build issue with optional build flag

I don’t see the last 3 commits from patchwork (ie. the serie from that email)
  [v1,3/3] app/bbdev-test: remove offload cost optional build flag	bbdev: remove offload cost	- - -	3--	2022-12-14	Chautru, Nicolas	mcoquelin	Awaiting Upstream
  [v1,2/3] drivers/baseband: remove offload cost optional build flag	bbdev: remove offload cost	- - -	1--	2022-12-14	Chautru, Nicolas	mcoquelin	Awaiting Upstream
  [v1,1/3] test/bbdev: explicit check for allocation failure	bbdev: remove offload cost	- - -	11-	2022-12-14	Chautru, Nicolas	mcoquelin	Awaiting Upstream
[v3,3/3] test/bbdev: explicit check for allocation failure	test/bbdev: fix build issues with optional build flag	- 1 -	10--	2022-12-13	Chautru, Nicolas	mcoquelin	Awaiting Upstream
[v3,2/3] test/bbdev: fix build issue with optional build flag	test/bbdev: fix build issues with optional build flag	- 1 -	1--	2022-12-13	Chautru, Nicolas	mcoquelin	Awaiting Upstream
[v3,1/3] test/bbdev: fix build issue with optional build flag	test/bbdev: fix build issues with optional build flag	- 1 -	11-	2022-12-13	Chautru, Nicolas	mcoquelin	Awaiting Upstream

Do I miss something? This last serie doesn’t look applied on the remote repo. Could you double check?
Thanks
Nic


> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Wednesday, January 4, 2023 4:43 AM
> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org
> Cc: Vargas, Hernan <hernan.vargas@intel.com>
> Subject: Re: [PATCH v1 0/3] bbdev: remove offload cost
> 
> Hi Nicolas,
> 
> On 1/3/23 23:07, Chautru, Nicolas wrote:
> > Hi Maxime,
> >
> > Happy new year.
> 
> Happy new year.
> 
> > What does the state " Awaiting Upstream" mean in patchwork for that
> serie? Can this be applied?
> 
> It means it is the the bbdev tree, and is awaiting being pulled into the main
> tree.
> 
> So it is applied, but only in the bbdev tree for now.
> This should not be an issue since you shold base your work on top of the
> bbdev tree.
> 
> Regards,
> Maxime
> 
> > Thanks
> > Nic
> >
> >
> >
> >> -----Original Message-----
> >> From: Chautru, Nicolas <nicolas.chautru@intel.com>
> >> Sent: Wednesday, December 14, 2022 3:34 PM
> >> To: dev@dpdk.org; maxime.coquelin@redhat.com
> >> Cc: Vargas, Hernan <hernan.vargas@intel.com>; Chautru, Nicolas
> >> <nicolas.chautru@intel.com>
> >> Subject: [PATCH v1 0/3] bbdev: remove offload cost
> >>
> >> Removing the optional build flag RTE_BBDEV_OFFLOAD_COST from Intel
> >> baseband PMDs and bbdev-test application.
> >> This helps to simplify build variants complexity causing compilation
> >> issues to be missed.
> >>
> >> Maxime, the first commit is actually a miss related to last commit on
> >> top of tree, you may want to merge these two commits together in the
> history.
> >> Sorry for missing it earlier.
> >>
> >>
> >> Nicolas Chautru (3):
> >>    test/bbdev: explicit check for allocation failure
> >>    drivers/baseband: remove offload cost optional build flag
> >>    app/bbdev-test: remove offload cost optional build flag
> >>
> >>   app/test-bbdev/test_bbdev_perf.c              | 29 +-------
> >>   drivers/baseband/acc/acc_common.h             | 12 +---
> >>   drivers/baseband/acc/rte_acc100_pmd.c         |  2 -
> >>   drivers/baseband/acc/rte_acc200_pmd.c         |  2 -
> >>   .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         | 10 ---
> >>   drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  | 10 ---
> >>   .../baseband/turbo_sw/bbdev_turbo_software.c  | 70 ++++---------------
> >>   7 files changed, 17 insertions(+), 118 deletions(-)
> >>
> >> --
> >> 2.34.1
> >


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

* Re: [PATCH v1 0/3] bbdev: remove offload cost
  2023-01-04 18:01     ` Chautru, Nicolas
@ 2023-01-05  9:53       ` Maxime Coquelin
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Coquelin @ 2023-01-05  9:53 UTC (permalink / raw)
  To: Chautru, Nicolas, dev; +Cc: Vargas, Hernan

Hi Nicolas,

On 1/4/23 19:01, Chautru, Nicolas wrote:
> Hi Maxime,
> 
> I don’t see them on the baseband tree  dpdk-next-baseband
> 
> I did a clean clone, these are the last 3 commits
>    dc0a5a0d2a (HEAD -> for-main, origin/for-main) test/bbdev: explicit check for allocation failure
>    0e927787a3 test/bbdev: fix build issue with optional build flag
>    51d49ccd23 test/bbdev: fix build issue with optional build flag
> 
> I don’t see the last 3 commits from patchwork (ie. the serie from that email)
>    [v1,3/3] app/bbdev-test: remove offload cost optional build flag	bbdev: remove offload cost	- - -	3--	2022-12-14	Chautru, Nicolas	mcoquelin	Awaiting Upstream
>    [v1,2/3] drivers/baseband: remove offload cost optional build flag	bbdev: remove offload cost	- - -	1--	2022-12-14	Chautru, Nicolas	mcoquelin	Awaiting Upstream
>    [v1,1/3] test/bbdev: explicit check for allocation failure	bbdev: remove offload cost	- - -	11-	2022-12-14	Chautru, Nicolas	mcoquelin	Awaiting Upstream
> [v3,3/3] test/bbdev: explicit check for allocation failure	test/bbdev: fix build issues with optional build flag	- 1 -	10--	2022-12-13	Chautru, Nicolas	mcoquelin	Awaiting Upstream
> [v3,2/3] test/bbdev: fix build issue with optional build flag	test/bbdev: fix build issues with optional build flag	- 1 -	1--	2022-12-13	Chautru, Nicolas	mcoquelin	Awaiting Upstream
> [v3,1/3] test/bbdev: fix build issue with optional build flag	test/bbdev: fix build issues with optional build flag	- 1 -	11-	2022-12-13	Chautru, Nicolas	mcoquelin	Awaiting Upstream
> 
> Do I miss something? This last serie doesn’t look applied on the remote repo. Could you double check?

Hmm OK, I think I got mislead by the similarity of the commit titles
between the two series when I changed the state of the first series.

I'm reverting back the state of this series from "Awaiting upstream" to
"New" since I have not reviewed this one yet. I'll try to review it
before end of week.

Thanks for the heads-up!
Maxime

> Thanks
> Nic
> 
> 
>> -----Original Message-----
>> From: Maxime Coquelin <maxime.coquelin@redhat.com>
>> Sent: Wednesday, January 4, 2023 4:43 AM
>> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org
>> Cc: Vargas, Hernan <hernan.vargas@intel.com>
>> Subject: Re: [PATCH v1 0/3] bbdev: remove offload cost
>>
>> Hi Nicolas,
>>
>> On 1/3/23 23:07, Chautru, Nicolas wrote:
>>> Hi Maxime,
>>>
>>> Happy new year.
>>
>> Happy new year.
>>
>>> What does the state " Awaiting Upstream" mean in patchwork for that
>> serie? Can this be applied?
>>
>> It means it is the the bbdev tree, and is awaiting being pulled into the main
>> tree.
>>
>> So it is applied, but only in the bbdev tree for now.
>> This should not be an issue since you shold base your work on top of the
>> bbdev tree.
>>
>> Regards,
>> Maxime
>>
>>> Thanks
>>> Nic
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: Chautru, Nicolas <nicolas.chautru@intel.com>
>>>> Sent: Wednesday, December 14, 2022 3:34 PM
>>>> To: dev@dpdk.org; maxime.coquelin@redhat.com
>>>> Cc: Vargas, Hernan <hernan.vargas@intel.com>; Chautru, Nicolas
>>>> <nicolas.chautru@intel.com>
>>>> Subject: [PATCH v1 0/3] bbdev: remove offload cost
>>>>
>>>> Removing the optional build flag RTE_BBDEV_OFFLOAD_COST from Intel
>>>> baseband PMDs and bbdev-test application.
>>>> This helps to simplify build variants complexity causing compilation
>>>> issues to be missed.
>>>>
>>>> Maxime, the first commit is actually a miss related to last commit on
>>>> top of tree, you may want to merge these two commits together in the
>> history.
>>>> Sorry for missing it earlier.
>>>>
>>>>
>>>> Nicolas Chautru (3):
>>>>     test/bbdev: explicit check for allocation failure
>>>>     drivers/baseband: remove offload cost optional build flag
>>>>     app/bbdev-test: remove offload cost optional build flag
>>>>
>>>>    app/test-bbdev/test_bbdev_perf.c              | 29 +-------
>>>>    drivers/baseband/acc/acc_common.h             | 12 +---
>>>>    drivers/baseband/acc/rte_acc100_pmd.c         |  2 -
>>>>    drivers/baseband/acc/rte_acc200_pmd.c         |  2 -
>>>>    .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         | 10 ---
>>>>    drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  | 10 ---
>>>>    .../baseband/turbo_sw/bbdev_turbo_software.c  | 70 ++++---------------
>>>>    7 files changed, 17 insertions(+), 118 deletions(-)
>>>>
>>>> --
>>>> 2.34.1
>>>
> 


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

* Re: [PATCH v1 1/3] test/bbdev: explicit check for allocation failure
  2022-12-14 23:33 ` [PATCH v1 1/3] test/bbdev: explicit check for allocation failure Nicolas Chautru
@ 2023-01-06 14:51   ` Maxime Coquelin
  2023-01-06 15:37     ` Chautru, Nicolas
  2023-01-10  8:32   ` Maxime Coquelin
  1 sibling, 1 reply; 14+ messages in thread
From: Maxime Coquelin @ 2023-01-06 14:51 UTC (permalink / raw)
  To: Nicolas Chautru, dev; +Cc: hernan.vargas, stable

Hi Nicolas,

On 12/15/22 00:33, Nicolas Chautru wrote:
> 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")

Above line should not be breaked, can be fixed while applying if no
other comments on the series.

> Cc: stable@dpdk.org
> 
> Signed-off-by: Nicolas Chautru <nicolas.chautru@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,

The title and commit message does not seem to relate to the content of
the patch. Is it actually fixing the patch I already merged?

Thanks,
Maxime


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

* Re: [PATCH v1 2/3] drivers/baseband: remove offload cost optional build flag
  2022-12-14 23:33 ` [PATCH v1 2/3] drivers/baseband: remove offload cost optional build flag Nicolas Chautru
@ 2023-01-06 14:54   ` Maxime Coquelin
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Coquelin @ 2023-01-06 14:54 UTC (permalink / raw)
  To: Nicolas Chautru, dev; +Cc: hernan.vargas



On 12/15/22 00:33, Nicolas Chautru wrote:
> Remove the optional build flag for intel PMDs so that
> it is enabled by default and having to maintain single
> build variant.
> 
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> ---
>   drivers/baseband/acc/acc_common.h             | 12 +---
>   drivers/baseband/acc/rte_acc100_pmd.c         |  2 -
>   drivers/baseband/acc/rte_acc200_pmd.c         |  2 -
>   .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         | 10 ---
>   drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  | 10 ---
>   .../baseband/turbo_sw/bbdev_turbo_software.c  | 70 ++++---------------
>   6 files changed, 14 insertions(+), 92 deletions(-)
> 

Nice!

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


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

* Re: [PATCH v1 3/3] app/bbdev-test: remove offload cost optional build flag
  2022-12-14 23:33 ` [PATCH v1 3/3] app/bbdev-test: " Nicolas Chautru
@ 2023-01-06 14:55   ` Maxime Coquelin
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Coquelin @ 2023-01-06 14:55 UTC (permalink / raw)
  To: Nicolas Chautru, dev; +Cc: hernan.vargas



On 12/15/22 00:33, Nicolas Chautru wrote:
> Remove the optional build flag for bbdev-test application
> so that it is enabled by default and having to maintain single
> build variant.
> 
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> ---
>   app/test-bbdev/test_bbdev_perf.c | 23 -----------------------
>   1 file changed, 23 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


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

* RE: [PATCH v1 1/3] test/bbdev: explicit check for allocation failure
  2023-01-06 14:51   ` Maxime Coquelin
@ 2023-01-06 15:37     ` Chautru, Nicolas
  0 siblings, 0 replies; 14+ messages in thread
From: Chautru, Nicolas @ 2023-01-06 15:37 UTC (permalink / raw)
  To: Maxime Coquelin, dev; +Cc: Vargas, Hernan, stable

Hi Maxime, 
Yes this new commit fixes the last commit on the tree. You might want to merge these 2 commits into one or not. 
I mentioned this in the cover letter I believe.
Thanks
Nic

> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Friday, January 6, 2023 6:51 AM
> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org
> Cc: Vargas, Hernan <hernan.vargas@intel.com>; stable@dpdk.org
> Subject: Re: [PATCH v1 1/3] test/bbdev: explicit check for allocation failure
> 
> Hi Nicolas,
> 
> On 12/15/22 00:33, Nicolas Chautru wrote:
> > 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")
> 
> Above line should not be breaked, can be fixed while applying if no other
> comments on the series.
> 
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Nicolas Chautru <nicolas.chautru@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,
> 
> The title and commit message does not seem to relate to the content of the
> patch. Is it actually fixing the patch I already merged?
> 
> Thanks,
> Maxime


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

* Re: [PATCH v1 1/3] test/bbdev: explicit check for allocation failure
  2022-12-14 23:33 ` [PATCH v1 1/3] test/bbdev: explicit check for allocation failure Nicolas Chautru
  2023-01-06 14:51   ` Maxime Coquelin
@ 2023-01-10  8:32   ` Maxime Coquelin
  1 sibling, 0 replies; 14+ messages in thread
From: Maxime Coquelin @ 2023-01-10  8:32 UTC (permalink / raw)
  To: Nicolas Chautru, dev, Thomas Monjalon, David Marchand
  Cc: hernan.vargas, stable

Hi Thomas & David,

Below patch is a fix for a patch you didn't pulled yet.
I will squash it to the faulty commit.

Regards,
Maxime

On 12/15/22 00:33, Nicolas Chautru wrote:
> 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@dpdk.org
> 
> Signed-off-by: Nicolas Chautru <nicolas.chautru@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,


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

* Re: [PATCH v1 0/3] bbdev: remove offload cost
  2022-12-14 23:33 [PATCH v1 0/3] bbdev: remove offload cost Nicolas Chautru
                   ` (3 preceding siblings ...)
  2023-01-03 22:07 ` [PATCH v1 0/3] bbdev: remove offload cost Chautru, Nicolas
@ 2023-01-10  8:43 ` Maxime Coquelin
  4 siblings, 0 replies; 14+ messages in thread
From: Maxime Coquelin @ 2023-01-10  8:43 UTC (permalink / raw)
  To: Nicolas Chautru, dev; +Cc: hernan.vargas



On 12/15/22 00:33, Nicolas Chautru wrote:
> Removing the optional build flag RTE_BBDEV_OFFLOAD_COST
> from Intel baseband PMDs and bbdev-test application.
> This helps to simplify build variants complexity
> causing compilation issues to be missed.
> 
> Maxime, the first commit is actually a miss related
> to last commit on top of tree, you may want to merge
> these two commits together in the history.
> Sorry for missing it earlier.
> 
> 
> Nicolas Chautru (3):
>    test/bbdev: explicit check for allocation failure
>    drivers/baseband: remove offload cost optional build flag
>    app/bbdev-test: remove offload cost optional build flag
> 
>   app/test-bbdev/test_bbdev_perf.c              | 29 +-------
>   drivers/baseband/acc/acc_common.h             | 12 +---
>   drivers/baseband/acc/rte_acc100_pmd.c         |  2 -
>   drivers/baseband/acc/rte_acc200_pmd.c         |  2 -
>   .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         | 10 ---
>   drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  | 10 ---
>   .../baseband/turbo_sw/bbdev_turbo_software.c  | 70 ++++---------------
>   7 files changed, 17 insertions(+), 118 deletions(-)
> 

Patch 1 squashed in:

http://patches.dpdk.org/project/dpdk/patch/20221213161855.12970-4-nicolas.chautru@intel.com/

Patches 2 & 3 applied to dpdk-next-baseband/for-main.

Thanks,
Maxime


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

end of thread, other threads:[~2023-01-10  8:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-14 23:33 [PATCH v1 0/3] bbdev: remove offload cost Nicolas Chautru
2022-12-14 23:33 ` [PATCH v1 1/3] test/bbdev: explicit check for allocation failure Nicolas Chautru
2023-01-06 14:51   ` Maxime Coquelin
2023-01-06 15:37     ` Chautru, Nicolas
2023-01-10  8:32   ` Maxime Coquelin
2022-12-14 23:33 ` [PATCH v1 2/3] drivers/baseband: remove offload cost optional build flag Nicolas Chautru
2023-01-06 14:54   ` Maxime Coquelin
2022-12-14 23:33 ` [PATCH v1 3/3] app/bbdev-test: " Nicolas Chautru
2023-01-06 14:55   ` Maxime Coquelin
2023-01-03 22:07 ` [PATCH v1 0/3] bbdev: remove offload cost Chautru, Nicolas
2023-01-04 12:42   ` Maxime Coquelin
2023-01-04 18:01     ` Chautru, Nicolas
2023-01-05  9:53       ` Maxime Coquelin
2023-01-10  8:43 ` Maxime Coquelin

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).