Skip to contentSkip to conversation

bbdev: remove offload cost

PATCH In review Nicolas Chautru 2 participants 14 messages Dec 14, 2022 – Jan 10, 2023

lore
Share & tools
lore
#0 lore raw

cover 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(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/3 test/bbdev: explicit check for allocation failure

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: [email protected]

---
 app/test-bbdev/test_bbdev_perf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
app/test-bbdev/test_bbdev_perf.c +3 -3
index a922d69ada..b2096525ea 100644
@@ -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,
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v1 1/3] test/bbdev: explicit check for allocation failure

Hi Nicolas,

Quoted 5 lines · Nicolas Chautru

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.

Quoted 30 lines
---
  app/test-bbdev/test_bbdev_perf.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
app/test-bbdev/test_bbdev_perf.c +2 -2
index a922d69ada..b2096525ea 100644
@@ -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,

app/test-bbdev/test_bbdev_perf.c offload_latency_test_ldpc_dec(struct rte_mempool *mempool, · line 5134

Quoted 8 lines
app/test-bbdev/test_bbdev_perf.c +1 -1
@@ -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

#3 lore raw

RE: [PATCH v1 1/3] test/bbdev: explicit check for allocation failure

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

Quoted 79 lines

-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Friday, January 6, 2023 6:51 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: Vargas, Hernan <[email protected]>; [email protected]
Subject: Re: [PATCH v1 1/3] test/bbdev: explicit check for allocation failure

Hi Nicolas,

Quoted 5 lines · Nicolas Chautru

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.

app/test-bbdev/test_bbdev_perf.c offload_latency_test_fft(struct rte_mempool

Quoted 13 lines
---
  app/test-bbdev/test_bbdev_perf.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
app/test-bbdev/test_bbdev_perf.c +0 -0
index a922d69ada..b2096525ea 100644
@@ -4959,7 +4959,7 @@ offload_latency_test_fft(struct rte_mempool

*mempool, struct test_buffers *bufs,

app/test-bbdev/test_bbdev_perf.c offload_latency_test_fft(struct rte_mempool *mempool, struct test_buffers *bufs,

Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +0 -0
  			burst_sz = num_to_process - dequeued;
 
  		ret = rte_bbdev_fft_op_alloc_bulk(mempool, ops_enq,

burst_sz);

app/test-bbdev/test_bbdev_perf.c offload_latency_test_fft(struct rte_mempool · line 4962

Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0 -1
-		TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops",

ops_enq);

app/test-bbdev/test_bbdev_perf.c offload_latency_test_fft(struct rte_mempool · line 4962

Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1 -0
+		TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops",

burst_sz);

app/test-bbdev/test_bbdev_perf.c offload_latency_test_fft(struct rte_mempool · line 4964

Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0 -0
  		if (test_vector.op_type != RTE_BBDEV_OP_NONE)
  			copy_reference_fft_op(ops_enq, burst_sz,

dequeued,

app/test-bbdev/test_bbdev_perf.c offload_latency_test_dec(struct rte_mempool

Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0 -0
  					bufs->inputs,
@@ -5042,7 +5042,7 @@ offload_latency_test_dec(struct rte_mempool

*mempool, struct test_buffers *bufs,

app/test-bbdev/test_bbdev_perf.c offload_latency_test_fft(struct rte_mempool *mempool, struct test_buffers *bufs,

Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +0 -0
  			burst_sz = num_to_process - dequeued;
 
  		ret = rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq,

burst_sz);

app/test-bbdev/test_bbdev_perf.c offload_latency_test_dec(struct rte_mempool · line 5045

Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0 -1
-		TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops",

ops_enq);

app/test-bbdev/test_bbdev_perf.c offload_latency_test_dec(struct rte_mempool · line 5045

Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1 -0
+		TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops",

burst_sz);

app/test-bbdev/test_bbdev_perf.c offload_latency_test_dec(struct rte_mempool · line 5047

Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0 -0
  		if (test_vector.op_type != RTE_BBDEV_OP_NONE)
  			copy_reference_dec_op(ops_enq, burst_sz,

dequeued,

app/test-bbdev/test_bbdev_perf.c offload_latency_test_ldpc_dec(struct

Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0 -0
  					bufs->inputs,
@@ -5128,7 +5128,7 @@ offload_latency_test_ldpc_dec(struct

rte_mempool *mempool,

app/test-bbdev/test_bbdev_perf.c offload_latency_test_fft(struct rte_mempool *mempool, struct test_buffers *bufs,

Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +0 -0
  			burst_sz = num_to_process - dequeued;
 
  		ret = rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq,

burst_sz);

app/test-bbdev/test_bbdev_perf.c offload_latency_test_ldpc_dec(struct · line 5131

Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0 -1
-		TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops",

ops_enq);

app/test-bbdev/test_bbdev_perf.c offload_latency_test_ldpc_dec(struct · line 5131

Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1 -0
+		TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops",

burst_sz);

app/test-bbdev/test_bbdev_perf.c offload_latency_test_ldpc_dec(struct · line 5133

Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0 -0
  		if (test_vector.op_type != RTE_BBDEV_OP_NONE)
  			copy_reference_ldpc_dec_op(ops_enq, burst_sz,

dequeued,

app/test-bbdev/test_bbdev_perf.c offload_latency_test_ldpc_dec(struct · line 5134

Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0 -0
  					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

#4 lore raw

Re: [PATCH v1 1/3] test/bbdev: explicit check for allocation failure

In reply to Nicolas Chautru

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

Quoted 43 lines · Nicolas Chautru

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: [email protected]

---
  app/test-bbdev/test_bbdev_perf.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
app/test-bbdev/test_bbdev_perf.c +3 -3
index a922d69ada..b2096525ea 100644
@@ -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,
#5 lore raw

PATCH 2/3 drivers/baseband: remove offload cost optional build flag

In reply to Nicolas Chautru

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

---
 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(-)
drivers/baseband/acc/acc_common.h +2 -10
index c076dc72cc..84a428ee1d 100644
@@ -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;
drivers/baseband/acc/rte_acc100_pmd.c +0 -2
index ba8247d47e..b3164529dd 100644
@@ -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>
drivers/baseband/acc/rte_acc200_pmd.c +0 -2
index c5123cfef0..204f37349b 100644
@@ -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>
drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c +0 -10
index d520d5238f..f29565af8c 100644
@@ -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 */
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c +0 -10
index fc86f13bee..a4a963f74d 100644
@@ -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
drivers/baseband/turbo_sw/bbdev_turbo_software.c +12 -58

216 lines not on this page · raw message

Signature · 1 line
2.34.1
Reviewed-by on v1 2/3
#6 lore raw

Re: [PATCH v1 2/3] drivers/baseband: remove offload cost optional build flag

Quoted 5 lines · Nicolas Chautru

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

Quoted 9 lines
---
  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!

Thanks,
Maxime

#7 lore raw

PATCH 3/3 app/bbdev-test: remove offload cost optional build flag

In reply to 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.

---
 app/test-bbdev/test_bbdev_perf.c | 23 -----------------------
 1 file changed, 23 deletions(-)
app/test-bbdev/test_bbdev_perf.c +0 -23
index b2096525ea..3818b74c79 100644
@@ -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
Signature · 1 line
2.34.1
Reviewed-by on v1 3/3
#8 lore raw

Re: [PATCH v1 3/3] app/bbdev-test: remove offload cost optional build flag

Quoted 9 lines · 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.

---
  app/test-bbdev/test_bbdev_perf.c | 23 -----------------------
  1 file changed, 23 deletions(-)

Thanks,
Maxime

#9 lore raw
In reply to Nicolas Chautru

Hi Maxime,

Happy new year.

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

Thanks
Nic

Quoted 34 lines

-----Original Message-----
From: Chautru, Nicolas <[email protected]>
Sent: Wednesday, December 14, 2022 3:34 PM
To: [email protected]; [email protected]
Cc: Vargas, Hernan <[email protected]>; Chautru, Nicolas <[email protected]>
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

#10 lore raw

Hi Nicolas,

Quoted 3 lines · Nicolas

Hi Maxime,

Happy new year.

Happy new year.

Quoted 1 line

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

Quoted 40 lines

Thanks
Nic

Quoted 34 lines

-----Original Message-----
From: Chautru, Nicolas <[email protected]>
Sent: Wednesday, December 14, 2022 3:34 PM
To: [email protected]; [email protected]
Cc: Vargas, Hernan <[email protected]>; Chautru, Nicolas <[email protected]>
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

#11 lore raw

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

Quoted 70 lines

-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Wednesday, January 4, 2023 4:43 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v1 0/3] bbdev: remove offload cost

Hi Nicolas,

Quoted 3 lines · Nicolas

Hi Maxime,

Happy new year.

Happy new year.

Quoted 1 line

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

Quoted 20 lines

Thanks
Nic

Quoted 15 lines

-----Original Message-----
From: Chautru, Nicolas <[email protected]>
Sent: Wednesday, December 14, 2022 3:34 PM
To: [email protected]; [email protected]
Cc: Vargas, Hernan <[email protected]>; Chautru, Nicolas <[email protected]>
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.

Quoted 20 lines
Quoted 19 lines

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

#12 lore raw

Hi Nicolas,

Quoted 17 lines · Nicolas

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

Quoted 1 line

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

Quoted 75 lines

Thanks
Nic

Quoted 70 lines

-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Wednesday, January 4, 2023 4:43 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v1 0/3] bbdev: remove offload cost

Hi Nicolas,

Quoted 3 lines · Nicolas

Hi Maxime,

Happy new year.

Happy new year.

Quoted 1 line

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

Quoted 20 lines

Thanks
Nic

Quoted 15 lines

-----Original Message-----
From: Chautru, Nicolas <[email protected]>
Sent: Wednesday, December 14, 2022 3:34 PM
To: [email protected]; [email protected]
Cc: Vargas, Hernan <[email protected]>; Chautru, Nicolas <[email protected]>
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.

Quoted 20 lines
Quoted 19 lines

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

#13 lore raw
In reply to Nicolas Chautru
Quoted 16 lines · 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

Quoted 9 lines
  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/[email protected]/

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

Thanks,
Maxime