patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v1 1/9] test/bbdev: fix TB logic
       [not found] <20240422190800.123027-1-hernan.vargas@intel.com>
@ 2024-04-22 19:07 ` Hernan Vargas
  2024-04-22 19:07 ` [PATCH v1 2/9] test/bbdev: fix MLD output size computation Hernan Vargas
  2024-04-22 19:07 ` [PATCH v1 3/9] test/bbdev: fix interrupt tests Hernan Vargas
  2 siblings, 0 replies; 3+ messages in thread
From: Hernan Vargas @ 2024-04-22 19:07 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>
---
 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 dcce00aa0a17..efd046984d58 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] 3+ messages in thread

* [PATCH v1 2/9] test/bbdev: fix MLD output size computation
       [not found] <20240422190800.123027-1-hernan.vargas@intel.com>
  2024-04-22 19:07 ` [PATCH v1 1/9] test/bbdev: fix TB logic Hernan Vargas
@ 2024-04-22 19:07 ` Hernan Vargas
  2024-04-22 19:07 ` [PATCH v1 3/9] test/bbdev: fix interrupt tests Hernan Vargas
  2 siblings, 0 replies; 3+ messages in thread
From: Hernan Vargas @ 2024-04-22 19:07 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 | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index efd046984d58..9ed0c4648d24 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -2896,8 +2896,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 *= 12 * 8 * op->mldts.num_rbs * (op->mldts.c_rep + 1);
+
 	return output_size;
 }
 
-- 
2.37.1


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

* [PATCH v1 3/9] test/bbdev: fix interrupt tests
       [not found] <20240422190800.123027-1-hernan.vargas@intel.com>
  2024-04-22 19:07 ` [PATCH v1 1/9] test/bbdev: fix TB logic Hernan Vargas
  2024-04-22 19:07 ` [PATCH v1 2/9] test/bbdev: fix MLD output size computation Hernan Vargas
@ 2024-04-22 19:07 ` Hernan Vargas
  2 siblings, 0 replies; 3+ messages in thread
From: Hernan Vargas @ 2024-04-22 19:07 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>
---
 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 9ed0c4648d24..28d78e73a9c1 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -3406,15 +3406,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
@@ -3424,6 +3415,15 @@ throughput_intr_lcore_ldpc_dec(void *arg)
 			 */
 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_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
 			 */
@@ -3498,14 +3498,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
@@ -3515,6 +3507,14 @@ throughput_intr_lcore_dec(void *arg)
 			 */
 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_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
 			 */
@@ -3584,14 +3584,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
@@ -3601,6 +3593,14 @@ throughput_intr_lcore_enc(void *arg)
 			 */
 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_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
 			 */
@@ -3672,15 +3672,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
@@ -3690,6 +3681,15 @@ throughput_intr_lcore_ldpc_enc(void *arg)
 			 */
 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_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
 			 */
@@ -3761,14 +3761,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
@@ -3778,6 +3770,14 @@ throughput_intr_lcore_fft(void *arg)
 			 */
 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_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
 			 */
@@ -3844,13 +3844,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
@@ -3860,6 +3853,13 @@ throughput_intr_lcore_mldts(void *arg)
 			 */
 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_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] 3+ messages in thread

end of thread, other threads:[~2024-04-22 19:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20240422190800.123027-1-hernan.vargas@intel.com>
2024-04-22 19:07 ` [PATCH v1 1/9] test/bbdev: fix TB logic Hernan Vargas
2024-04-22 19:07 ` [PATCH v1 2/9] test/bbdev: fix MLD output size computation Hernan Vargas
2024-04-22 19:07 ` [PATCH v1 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).