patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v2 1/9] test/bbdev: fix TB logic
       [not found] <20240624150237.47169-1-hernan.vargas@intel.com>
@ 2024-06-24 15:02 ` Hernan Vargas
  2024-06-24 15:02 ` [PATCH v2 2/9] test/bbdev: fix MLD output size computation Hernan Vargas
  2024-06-24 15:02 ` [PATCH v2 3/9] test/bbdev: fix interrupt tests Hernan Vargas
  2 siblings, 0 replies; 4+ messages in thread
From: Hernan Vargas @ 2024-06-24 15:02 UTC (permalink / raw)
  To: dev, gakhil, trix, maxime.coquelin
  Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas, stable

Fix discrepancy in logic when using large fake mbuf.

Fixes: fd96ef3787f1 ("test/bbdev: extend support for large TB")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 app/test-bbdev/test_bbdev_perf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index a21c9c7bddf5..6d9bf3a233ec 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -2131,7 +2131,8 @@ validate_op_chain(struct rte_bbdev_op_data *op,
 		uint16_t data_len = rte_pktmbuf_data_len(m) - offset;
 		total_data_size += orig_op->segments[i].length;
 
-		if (orig_op->segments[i].length > RTE_BBDEV_LDPC_E_MAX_MBUF)
+		if ((orig_op->segments[i].length + RTE_PKTMBUF_HEADROOM)
+				> RTE_BBDEV_LDPC_E_MAX_MBUF)
 			ignore_mbuf = true;
 		if (!ignore_mbuf)
 			TEST_ASSERT(orig_op->segments[i].length == data_len,
-- 
2.37.1


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

* [PATCH v2 2/9] test/bbdev: fix MLD output size computation
       [not found] <20240624150237.47169-1-hernan.vargas@intel.com>
  2024-06-24 15:02 ` [PATCH v2 1/9] test/bbdev: fix TB logic Hernan Vargas
@ 2024-06-24 15:02 ` Hernan Vargas
  2024-06-25  8:39   ` Maxime Coquelin
  2024-06-24 15:02 ` [PATCH v2 3/9] test/bbdev: fix interrupt tests Hernan Vargas
  2 siblings, 1 reply; 4+ messages in thread
From: Hernan Vargas @ 2024-06-24 15:02 UTC (permalink / raw)
  To: dev, gakhil, trix, maxime.coquelin
  Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas, stable

For perf tests, the operation size for the MLD-TS was incorrect.
Fixed so that the performance numbers are correct.
Largely cosmetic only.

Fixes: 95f192a40e35 ("test/bbdev: add MLD cases")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
 app/test-bbdev/test_bbdev_perf.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 6d9bf3a233ec..9841464922ac 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -94,6 +94,8 @@
 #define K0_2_2 25 /* K0 fraction numerator for rv 2 and BG 2 */
 #define K0_3_1 56 /* K0 fraction numerator for rv 3 and BG 1 */
 #define K0_3_2 43 /* K0 fraction numerator for rv 3 and BG 2 */
+#define NUM_SC_PER_RB (12) /* Number of subcarriers in a RB in 3GPP. */
+#define BITS_PER_LLR  (8)  /* Number of bits in a LLR. */
 
 #define HARQ_MEM_TOLERANCE 256
 static struct test_bbdev_vector test_vector;
@@ -2896,8 +2898,14 @@ calc_fft_size(struct rte_bbdev_fft_op *op)
 static uint32_t
 calc_mldts_size(struct rte_bbdev_mldts_op *op)
 {
-	uint32_t output_size;
-	output_size = op->mldts.num_layers * op->mldts.num_rbs * op->mldts.c_rep;
+	uint32_t output_size = 0;
+	uint16_t i;
+
+	for (i = 0; i < op->mldts.num_layers; i++)
+		output_size += op->mldts.q_m[i];
+
+	output_size *= NUM_SC_PER_RB * BITS_PER_LLR * op->mldts.num_rbs * (op->mldts.c_rep + 1);
+
 	return output_size;
 }
 
-- 
2.37.1


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

* [PATCH v2 3/9] test/bbdev: fix interrupt tests
       [not found] <20240624150237.47169-1-hernan.vargas@intel.com>
  2024-06-24 15:02 ` [PATCH v2 1/9] test/bbdev: fix TB logic Hernan Vargas
  2024-06-24 15:02 ` [PATCH v2 2/9] test/bbdev: fix MLD output size computation Hernan Vargas
@ 2024-06-24 15:02 ` Hernan Vargas
  2 siblings, 0 replies; 4+ messages in thread
From: Hernan Vargas @ 2024-06-24 15:02 UTC (permalink / raw)
  To: dev, gakhil, trix, maxime.coquelin
  Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas, stable

Fix possible error with regards to setting the burst size from the
enqueue thread.

Fixes: b2e2aec3239e ("app/bbdev: enhance interrupt test")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 app/test-bbdev/test_bbdev_perf.c | 98 ++++++++++++++++----------------
 1 file changed, 49 insertions(+), 49 deletions(-)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 9841464922ac..20cd8df19be7 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -3419,15 +3419,6 @@ throughput_intr_lcore_ldpc_dec(void *arg)
 			if (unlikely(num_to_process - enqueued < num_to_enq))
 				num_to_enq = num_to_process - enqueued;
 
-			enq = 0;
-			do {
-				enq += rte_bbdev_enqueue_ldpc_dec_ops(
-						tp->dev_id,
-						queue_id, &ops[enqueued],
-						num_to_enq);
-			} while (unlikely(num_to_enq != enq));
-			enqueued += enq;
-
 			/* Write to thread burst_sz current number of enqueued
 			 * descriptors. It ensures that proper number of
 			 * descriptors will be dequeued in callback
@@ -3438,6 +3429,15 @@ throughput_intr_lcore_ldpc_dec(void *arg)
 			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
 					rte_memory_order_relaxed);
 
+			enq = 0;
+			do {
+				enq += rte_bbdev_enqueue_ldpc_dec_ops(
+						tp->dev_id,
+						queue_id, &ops[enqueued],
+						num_to_enq);
+			} while (unlikely(num_to_enq != enq));
+			enqueued += enq;
+
 			/* Wait until processing of previous batch is
 			 * completed
 			 */
@@ -3514,14 +3514,6 @@ throughput_intr_lcore_dec(void *arg)
 			if (unlikely(num_to_process - enqueued < num_to_enq))
 				num_to_enq = num_to_process - enqueued;
 
-			enq = 0;
-			do {
-				enq += rte_bbdev_enqueue_dec_ops(tp->dev_id,
-						queue_id, &ops[enqueued],
-						num_to_enq);
-			} while (unlikely(num_to_enq != enq));
-			enqueued += enq;
-
 			/* Write to thread burst_sz current number of enqueued
 			 * descriptors. It ensures that proper number of
 			 * descriptors will be dequeued in callback
@@ -3532,6 +3524,14 @@ throughput_intr_lcore_dec(void *arg)
 			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
 					rte_memory_order_relaxed);
 
+			enq = 0;
+			do {
+				enq += rte_bbdev_enqueue_dec_ops(tp->dev_id,
+						queue_id, &ops[enqueued],
+						num_to_enq);
+			} while (unlikely(num_to_enq != enq));
+			enqueued += enq;
+
 			/* Wait until processing of previous batch is
 			 * completed
 			 */
@@ -3603,14 +3603,6 @@ throughput_intr_lcore_enc(void *arg)
 			if (unlikely(num_to_process - enqueued < num_to_enq))
 				num_to_enq = num_to_process - enqueued;
 
-			enq = 0;
-			do {
-				enq += rte_bbdev_enqueue_enc_ops(tp->dev_id,
-						queue_id, &ops[enqueued],
-						num_to_enq);
-			} while (unlikely(enq != num_to_enq));
-			enqueued += enq;
-
 			/* Write to thread burst_sz current number of enqueued
 			 * descriptors. It ensures that proper number of
 			 * descriptors will be dequeued in callback
@@ -3621,6 +3613,14 @@ throughput_intr_lcore_enc(void *arg)
 			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
 					rte_memory_order_relaxed);
 
+			enq = 0;
+			do {
+				enq += rte_bbdev_enqueue_enc_ops(tp->dev_id,
+						queue_id, &ops[enqueued],
+						num_to_enq);
+			} while (unlikely(enq != num_to_enq));
+			enqueued += enq;
+
 			/* Wait until processing of previous batch is
 			 * completed
 			 */
@@ -3694,15 +3694,6 @@ throughput_intr_lcore_ldpc_enc(void *arg)
 			if (unlikely(num_to_process - enqueued < num_to_enq))
 				num_to_enq = num_to_process - enqueued;
 
-			enq = 0;
-			do {
-				enq += rte_bbdev_enqueue_ldpc_enc_ops(
-						tp->dev_id,
-						queue_id, &ops[enqueued],
-						num_to_enq);
-			} while (unlikely(enq != num_to_enq));
-			enqueued += enq;
-
 			/* Write to thread burst_sz current number of enqueued
 			 * descriptors. It ensures that proper number of
 			 * descriptors will be dequeued in callback
@@ -3713,6 +3704,15 @@ throughput_intr_lcore_ldpc_enc(void *arg)
 			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
 					rte_memory_order_relaxed);
 
+			enq = 0;
+			do {
+				enq += rte_bbdev_enqueue_ldpc_enc_ops(
+						tp->dev_id,
+						queue_id, &ops[enqueued],
+						num_to_enq);
+			} while (unlikely(enq != num_to_enq));
+			enqueued += enq;
+
 			/* Wait until processing of previous batch is
 			 * completed
 			 */
@@ -3786,14 +3786,6 @@ throughput_intr_lcore_fft(void *arg)
 			if (unlikely(num_to_process - enqueued < num_to_enq))
 				num_to_enq = num_to_process - enqueued;
 
-			enq = 0;
-			do {
-				enq += rte_bbdev_enqueue_fft_ops(tp->dev_id,
-						queue_id, &ops[enqueued],
-						num_to_enq);
-			} while (unlikely(enq != num_to_enq));
-			enqueued += enq;
-
 			/* Write to thread burst_sz current number of enqueued
 			 * descriptors. It ensures that proper number of
 			 * descriptors will be dequeued in callback
@@ -3804,6 +3796,14 @@ throughput_intr_lcore_fft(void *arg)
 			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
 					rte_memory_order_relaxed);
 
+			enq = 0;
+			do {
+				enq += rte_bbdev_enqueue_fft_ops(tp->dev_id,
+						queue_id, &ops[enqueued],
+						num_to_enq);
+			} while (unlikely(enq != num_to_enq));
+			enqueued += enq;
+
 			/* Wait until processing of previous batch is
 			 * completed
 			 */
@@ -3872,13 +3872,6 @@ throughput_intr_lcore_mldts(void *arg)
 			if (unlikely(num_to_process - enqueued < num_to_enq))
 				num_to_enq = num_to_process - enqueued;
 
-			enq = 0;
-			do {
-				enq += rte_bbdev_enqueue_mldts_ops(tp->dev_id,
-						queue_id, &ops[enqueued], num_to_enq);
-			} while (unlikely(enq != num_to_enq));
-			enqueued += enq;
-
 			/* Write to thread burst_sz current number of enqueued
 			 * descriptors. It ensures that proper number of
 			 * descriptors will be dequeued in callback
@@ -3889,6 +3882,13 @@ throughput_intr_lcore_mldts(void *arg)
 			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
 					rte_memory_order_relaxed);
 
+			enq = 0;
+			do {
+				enq += rte_bbdev_enqueue_mldts_ops(tp->dev_id,
+						queue_id, &ops[enqueued], num_to_enq);
+			} while (unlikely(enq != num_to_enq));
+			enqueued += enq;
+
 			/* Wait until processing of previous batch is
 			 * completed
 			 */
-- 
2.37.1


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

* Re: [PATCH v2 2/9] test/bbdev: fix MLD output size computation
  2024-06-24 15:02 ` [PATCH v2 2/9] test/bbdev: fix MLD output size computation Hernan Vargas
@ 2024-06-25  8:39   ` Maxime Coquelin
  0 siblings, 0 replies; 4+ messages in thread
From: Maxime Coquelin @ 2024-06-25  8:39 UTC (permalink / raw)
  To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, stable



On 6/24/24 17:02, Hernan Vargas wrote:
> For perf tests, the operation size for the MLD-TS was incorrect.
> Fixed so that the performance numbers are correct.
> Largely cosmetic only.
> 
> Fixes: 95f192a40e35 ("test/bbdev: add MLD cases")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
>   app/test-bbdev/test_bbdev_perf.c | 12 ++++++++++--
>   1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
> index 6d9bf3a233ec..9841464922ac 100644
> --- a/app/test-bbdev/test_bbdev_perf.c
> +++ b/app/test-bbdev/test_bbdev_perf.c
> @@ -94,6 +94,8 @@
>   #define K0_2_2 25 /* K0 fraction numerator for rv 2 and BG 2 */
>   #define K0_3_1 56 /* K0 fraction numerator for rv 3 and BG 1 */
>   #define K0_3_2 43 /* K0 fraction numerator for rv 3 and BG 2 */
> +#define NUM_SC_PER_RB (12) /* Number of subcarriers in a RB in 3GPP. */
> +#define BITS_PER_LLR  (8)  /* Number of bits in a LLR. */
>   
>   #define HARQ_MEM_TOLERANCE 256
>   static struct test_bbdev_vector test_vector;
> @@ -2896,8 +2898,14 @@ calc_fft_size(struct rte_bbdev_fft_op *op)
>   static uint32_t
>   calc_mldts_size(struct rte_bbdev_mldts_op *op)
>   {
> -	uint32_t output_size;
> -	output_size = op->mldts.num_layers * op->mldts.num_rbs * op->mldts.c_rep;
> +	uint32_t output_size = 0;
> +	uint16_t i;
> +
> +	for (i = 0; i < op->mldts.num_layers; i++)
> +		output_size += op->mldts.q_m[i];
> +
> +	output_size *= NUM_SC_PER_RB * BITS_PER_LLR * op->mldts.num_rbs * (op->mldts.c_rep + 1);
> +
>   	return output_size;
>   }
>   

Thanks for the change, much clearer now!

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

Maxime


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

end of thread, other threads:[~2024-06-25  8:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20240624150237.47169-1-hernan.vargas@intel.com>
2024-06-24 15:02 ` [PATCH v2 1/9] test/bbdev: fix TB logic Hernan Vargas
2024-06-24 15:02 ` [PATCH v2 2/9] test/bbdev: fix MLD output size computation Hernan Vargas
2024-06-25  8:39   ` Maxime Coquelin
2024-06-24 15:02 ` [PATCH v2 3/9] test/bbdev: fix interrupt tests Hernan Vargas

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