DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1 0/9] test-bbdev fixes and improvements for 24.07
@ 2024-04-22 19:07 Hernan Vargas
  2024-04-22 19:07 ` [PATCH v1 1/9] test/bbdev: fix TB logic Hernan Vargas
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ 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

This series targets test-bbdev changes for 24.07.
It includes test fixes, iter-max argument change (after deprecation notice in previous releases) and general test improvements.

Hernan Vargas (9):
  test/bbdev: fix TB logic
  test/bbdev: fix MLD output size computation
  test/bbdev: fix interrupt tests
  test/bbdev: change iter-max argument
  test/bbdev: improve timeout message format
  test/bbdev: add soft output parsing capability
  test/bbdev: check assumptions on fft window
  test/bbdev: update fft measurement output
  test/bbdev: remove unnecessary line

 app/test-bbdev/test-bbdev.py       |  38 +++---
 app/test-bbdev/test_bbdev.c        |   1 -
 app/test-bbdev/test_bbdev_perf.c   | 189 ++++++++++++++++++++---------
 app/test-bbdev/test_bbdev_vector.c |  18 +++
 app/test-bbdev/test_bbdev_vector.h |   2 +
 5 files changed, 175 insertions(+), 73 deletions(-)

-- 
2.37.1


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

* [PATCH v1 1/9] test/bbdev: fix TB logic
  2024-04-22 19:07 [PATCH v1 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
@ 2024-04-22 19:07 ` Hernan Vargas
  2024-06-12  9:18   ` Maxime Coquelin
  2024-04-22 19:07 ` [PATCH v1 2/9] test/bbdev: fix MLD output size computation Hernan Vargas
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 21+ 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] 21+ messages in thread

* [PATCH v1 2/9] test/bbdev: fix MLD output size computation
  2024-04-22 19:07 [PATCH v1 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
  2024-04-22 19:07 ` [PATCH v1 1/9] test/bbdev: fix TB logic Hernan Vargas
@ 2024-04-22 19:07 ` Hernan Vargas
  2024-06-12  9:25   ` Maxime Coquelin
  2024-04-22 19:07 ` [PATCH v1 3/9] test/bbdev: fix interrupt tests Hernan Vargas
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 21+ 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] 21+ messages in thread

* [PATCH v1 3/9] test/bbdev: fix interrupt tests
  2024-04-22 19:07 [PATCH v1 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
  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
  2024-06-12  9:27   ` Maxime Coquelin
  2024-04-22 19:07 ` [PATCH v1 4/9] test/bbdev: change iter-max argument Hernan Vargas
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 21+ 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] 21+ messages in thread

* [PATCH v1 4/9] test/bbdev: change iter-max argument
  2024-04-22 19:07 [PATCH v1 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
                   ` (2 preceding siblings ...)
  2024-04-22 19:07 ` [PATCH v1 3/9] test/bbdev: fix interrupt tests Hernan Vargas
@ 2024-04-22 19:07 ` Hernan Vargas
  2024-06-12  9:37   ` Maxime Coquelin
  2024-04-22 19:07 ` [PATCH v1 5/9] test/bbdev: improve timeout message format Hernan Vargas
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 21+ 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

-t --iter-max used for max number of iterations.
-T --timeout used for test timeout value.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
 app/test-bbdev/test-bbdev.py | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py
index 65a34390548d..9ddca9e78d3b 100755
--- a/app/test-bbdev/test-bbdev.py
+++ b/app/test-bbdev/test-bbdev.py
@@ -27,16 +27,10 @@ def kill(process):
 parser.add_argument("-e", "--eal-params",
                     help="EAL arguments which must be passed to the test app",
                     default="--vdev=baseband_null0 -a00:00.0")
-# Until deprecated in next release keep -t as an valid argument for timeout, then use -T
-parser.add_argument("-t", "--timeout",
+parser.add_argument("-T", "--timeout",
                     type=int,
                     help="Timeout in seconds",
                     default=600)
-# This will become -t option for iter_max in next release
-parser.add_argument("--iter-max",
-                    type=int,
-                    help="Max iterations",
-                    default=6)
 parser.add_argument("-c", "--test-cases",
                     nargs="+",
                     help="Defines test cases to run. Run all if not specified")
@@ -58,6 +52,10 @@ def kill(process):
                     type=int,
                     help="SNR in dB for BLER tests",
                     default=0)
+parser.add_argument("-t", "--iter-max",
+                    type=int,
+                    help="Max iterations",
+                    default=6)
 parser.add_argument("-l", "--num-lcores",
                     type=int,
                     help="Number of lcores to run.",
@@ -83,10 +81,6 @@ def kill(process):
 
 if args.iter_max:
     params.extend(["-t", str(args.iter_max)])
-    print("The argument for iter_max will be -t in next release")
-
-if args.timeout:
-    print("The argument for timeout will be -T in next release")
 
 if args.num_ops:
     params.extend(["-n", str(args.num_ops)])
-- 
2.37.1


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

* [PATCH v1 5/9] test/bbdev: improve timeout message format
  2024-04-22 19:07 [PATCH v1 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
                   ` (3 preceding siblings ...)
  2024-04-22 19:07 ` [PATCH v1 4/9] test/bbdev: change iter-max argument Hernan Vargas
@ 2024-04-22 19:07 ` Hernan Vargas
  2024-06-12 10:36   ` Maxime Coquelin
  2024-04-22 19:07 ` [PATCH v1 6/9] test/bbdev: add soft output parsing capability Hernan Vargas
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 21+ 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

Print more info and format message for test timeouts.
No functional impact.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
 app/test-bbdev/test-bbdev.py | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py
index 9ddca9e78d3b..d5b679f7867f 100755
--- a/app/test-bbdev/test-bbdev.py
+++ b/app/test-bbdev/test-bbdev.py
@@ -108,15 +108,29 @@ def kill(process):
         try:
             output = subprocess.run(call_params, timeout=args.timeout, universal_newlines=True)
         except subprocess.TimeoutExpired as e:
+            print("===========================================================")
             print("Starting Test Suite : BBdev TimeOut Tests")
+            print("INFO: One of the tests timed out {}".format(e))
+            print("INFO: Unexpected Error")
+            print("+ ------------------------------------------------------- +")
             print("== test: timeout")
-            print("TestCase [ 0] : timeout passed")
-            print(" + Tests Failed :       1")
             print("Unexpected Error")
+            print("TestCase [ 0] : timeout failed")
+            print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
+            print(" + Tests Failed :       1")
+            print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
+            exit_status = 1
         if output.returncode < 0:
+            print("===========================================================")
             print("Starting Test Suite : BBdev Exception Tests")
+            print("INFO: One of the tests returned {}".format(output.returncode))
+            print("INFO: Unexpected Error")
+            print("+ ------------------------------------------------------- +")
             print("== test: exception")
-            print("TestCase [ 0] : exception passed")
-            print(" + Tests Failed :       1")
             print("Unexpected Error")
+            print("TestCase [ 0] : exception failed")
+            print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
+            print(" + Tests Failed :       1")
+            print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
+            exit_status = 1
 sys.exit(exit_status)
-- 
2.37.1


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

* [PATCH v1 6/9] test/bbdev: add soft output parsing capability
  2024-04-22 19:07 [PATCH v1 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
                   ` (4 preceding siblings ...)
  2024-04-22 19:07 ` [PATCH v1 5/9] test/bbdev: improve timeout message format Hernan Vargas
@ 2024-04-22 19:07 ` Hernan Vargas
  2024-06-12 11:09   ` Maxime Coquelin
  2024-04-22 19:07 ` [PATCH v1 7/9] test/bbdev: check assumptions on fft window Hernan Vargas
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 21+ 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

Add vector parsing capability for soft output vectors.

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

diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c
index 42fa630041e9..b3e9d4bb7504 100644
--- a/app/test-bbdev/test_bbdev_vector.c
+++ b/app/test-bbdev/test_bbdev_vector.c
@@ -837,6 +837,10 @@ parse_ldpc_decoder_params(const char *key_token, char *token,
 		ret = parse_data_entry(key_token, token, vector,
 				DATA_HARQ_OUTPUT,
 				op_data_prefixes[DATA_HARQ_OUTPUT]);
+	else if (starts_with(key_token, op_data_prefixes[DATA_SOFT_OUTPUT]))
+		ret = parse_data_entry(key_token, token, vector,
+				DATA_SOFT_OUTPUT,
+				op_data_prefixes[DATA_SOFT_OUTPUT]);
 	else if (!strcmp(key_token, "e")) {
 		vector->mask |= TEST_BBDEV_VF_E;
 		ldpc_dec->cb_params.e = (uint32_t) strtoul(token, &err, 0);
-- 
2.37.1


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

* [PATCH v1 7/9] test/bbdev: check assumptions on fft window
  2024-04-22 19:07 [PATCH v1 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
                   ` (5 preceding siblings ...)
  2024-04-22 19:07 ` [PATCH v1 6/9] test/bbdev: add soft output parsing capability Hernan Vargas
@ 2024-04-22 19:07 ` Hernan Vargas
  2024-06-12 11:11   ` Maxime Coquelin
  2024-04-22 19:07 ` [PATCH v1 8/9] test/bbdev: update fft measurement output Hernan Vargas
  2024-04-22 19:08 ` [PATCH v1 9/9] test/bbdev: remove unnecessary line Hernan Vargas
  8 siblings, 1 reply; 21+ 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

Add check for FFT window width.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
 app/test-bbdev/test_bbdev_perf.c   | 26 ++++++++++++++++++++++----
 app/test-bbdev/test_bbdev_vector.c | 14 ++++++++++++++
 app/test-bbdev/test_bbdev_vector.h |  2 ++
 3 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 28d78e73a9c1..57b21730cab2 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -106,6 +106,8 @@ static int ldpc_llr_decimals;
 static int ldpc_llr_size;
 /* Keep track of the LDPC decoder device capability flag */
 static uint32_t ldpc_cap_flags;
+/* FFT window width predefined on device and on vector. */
+static int fft_window_width_dev;
 
 /* Represents tested active devices */
 static struct active_device {
@@ -881,6 +883,13 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info,
 	rte_bbdev_info_get(dev_id, info);
 	if (info->drv.device_status == RTE_BBDEV_DEV_FATAL_ERR)
 		printf("Device Status %s\n", rte_bbdev_device_status_str(info->drv.device_status));
+	if (info->drv.fft_window_width != NULL)
+		fft_window_width_dev = info->drv.fft_window_width[0];
+	else
+		fft_window_width_dev = 0;
+	if (fft_window_width_dev != 0)
+		printf("  FFT Window0 width %d\n", fft_window_width_dev);
+
 	nb_queues = RTE_MIN(rte_lcore_count(), info->drv.max_num_queues);
 	nb_queues = RTE_MIN(nb_queues, (unsigned int) MAX_QUEUES);
 
@@ -2583,7 +2592,8 @@ validate_ldpc_enc_op(struct rte_bbdev_enc_op **ops, const uint16_t n,
 }
 
 static inline int
-validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig_op)
+validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig_op,
+		bool skip_validate_output)
 {
 	struct rte_mbuf *m = op->data;
 	uint8_t i, nb_dst_segments = orig_op->nb_segments;
@@ -2613,7 +2623,7 @@ validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig
 			abs_delt = delt > 0 ? delt : -delt;
 			error_num += (abs_delt > thres_hold ? 1 : 0);
 		}
-		if (error_num > 0) {
+		if ((error_num > 0) && !skip_validate_output) {
 			rte_memdump(stdout, "Buffer A", ref_out, data_len);
 			rte_memdump(stdout, "Buffer B", op_out, data_len);
 			TEST_ASSERT(error_num == 0,
@@ -2686,16 +2696,24 @@ validate_fft_op(struct rte_bbdev_fft_op **ops, const uint16_t n,
 	int ret;
 	struct op_data_entries *fft_data_orig = &test_vector.entries[DATA_HARD_OUTPUT];
 	struct op_data_entries *fft_pwr_orig = &test_vector.entries[DATA_SOFT_OUTPUT];
+	bool skip_validate_output = false;
+
+	if ((test_vector.fft_window_width_vec > 0) &&
+			(test_vector.fft_window_width_vec != fft_window_width_dev)) {
+		printf("The vector FFT width doesn't match with device - skip %d %d\n",
+				test_vector.fft_window_width_vec, fft_window_width_dev);
+		skip_validate_output = true;
+	}
 
 	for (i = 0; i < n; ++i) {
 		ret = check_fft_status_and_ordering(ops[i], i, ref_op->status);
 		TEST_ASSERT_SUCCESS(ret, "Checking status and ordering for FFT failed");
 		TEST_ASSERT_SUCCESS(validate_op_fft_chain(
-				&ops[i]->fft.base_output, fft_data_orig),
+				&ops[i]->fft.base_output, fft_data_orig, skip_validate_output),
 				"FFT Output buffers (op=%u) are not matched", i);
 		if (check_bit(ops[i]->fft.op_flags, RTE_BBDEV_FFT_POWER_MEAS))
 			TEST_ASSERT_SUCCESS(validate_op_fft_chain(
-				&ops[i]->fft.power_meas_output, fft_pwr_orig),
+				&ops[i]->fft.power_meas_output, fft_pwr_orig, skip_validate_output),
 				"FFT Power Output buffers (op=%u) are not matched", i);
 	}
 
diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c
index b3e9d4bb7504..e48947b211ac 100644
--- a/app/test-bbdev/test_bbdev_vector.c
+++ b/app/test-bbdev/test_bbdev_vector.c
@@ -1050,6 +1050,20 @@ parse_fft_params(const char *key_token, char *token,
 			}
 		}
 		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "fft_window_width")) {
+		tok = strtok(token, VALUE_DELIMITER);
+		if (tok == NULL)
+			return -1;
+		for (i = 0; i < FFT_WIN_SIZE; i++) {
+			if (i == 0)
+				vector->fft_window_width_vec = (uint32_t) strtoul(tok, &err, 0);
+			if (i < (FFT_WIN_SIZE - 1)) {
+				tok = strtok(NULL, VALUE_DELIMITER);
+				if (tok == NULL)
+					return -1;
+			}
+		}
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
 	} else if (!strcmp(key_token, "op_flags")) {
 		vector->mask |= TEST_BBDEV_VF_OP_FLAGS;
 		ret = parse_turbo_flags(token, &op_flags, vector->op_type);
diff --git a/app/test-bbdev/test_bbdev_vector.h b/app/test-bbdev/test_bbdev_vector.h
index 14b8ef2764ad..ba1d0d20f9ea 100644
--- a/app/test-bbdev/test_bbdev_vector.h
+++ b/app/test-bbdev/test_bbdev_vector.h
@@ -69,6 +69,8 @@ struct test_bbdev_vector {
 	};
 	/* Additional storage for op data entries */
 	struct op_data_entries entries[DATA_NUM_TYPES];
+	/* Vector FFT window width assumption. */
+	uint16_t fft_window_width_vec;
 };
 
 /* fills test vector parameters based on test file */
-- 
2.37.1


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

* [PATCH v1 8/9] test/bbdev: update fft measurement output
  2024-04-22 19:07 [PATCH v1 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
                   ` (6 preceding siblings ...)
  2024-04-22 19:07 ` [PATCH v1 7/9] test/bbdev: check assumptions on fft window Hernan Vargas
@ 2024-04-22 19:07 ` Hernan Vargas
  2024-06-12 11:12   ` Maxime Coquelin
  2024-04-22 19:08 ` [PATCH v1 9/9] test/bbdev: remove unnecessary line Hernan Vargas
  8 siblings, 1 reply; 21+ 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

Update check for FFT measurement output to better account for tolerance.

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

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 57b21730cab2..639e67a937b2 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -2637,6 +2637,56 @@ validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig
 	return TEST_SUCCESS;
 }
 
+static inline int
+validate_op_fft_meas_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig_op,
+		bool skip_validate_output)
+{
+	struct rte_mbuf *m = op->data;
+	uint8_t i, nb_dst_segments = orig_op->nb_segments;
+	double thres_hold = 1.0;
+	uint32_t j, data_len_iq, error_num;
+	int32_t *ref_out, *op_out;
+	double estSNR, refSNR, delt, abs_delt;
+
+	TEST_ASSERT(nb_dst_segments == m->nb_segs,
+			"Number of segments differ in original (%u) and filled (%u) op fft",
+			nb_dst_segments, m->nb_segs);
+
+	/* Due to size limitation of mbuf, FFT doesn't use real mbuf. */
+	for (i = 0; i < nb_dst_segments; ++i) {
+		uint16_t offset = (i == 0) ? op->offset : 0;
+		uint32_t data_len = op->length;
+
+		TEST_ASSERT(orig_op->segments[i].length == data_len,
+				"Length of segment differ in original (%u) and filled (%u) op fft",
+				orig_op->segments[i].length, data_len);
+
+		/* Divided by 4 to get the number of 32 bits data. */
+		data_len_iq = data_len >> 2;
+		ref_out = (int32_t *)(orig_op->segments[i].addr);
+		op_out = rte_pktmbuf_mtod_offset(m, int32_t *, offset);
+		error_num = 0;
+		for (j = 0; j < data_len_iq; j++) {
+			estSNR = 10*log10(op_out[j]);
+			refSNR = 10*log10(ref_out[j]);
+			delt = refSNR - estSNR;
+			abs_delt = delt > 0 ? delt : -delt;
+			error_num += (abs_delt > thres_hold ? 1 : 0);
+		}
+		if ((error_num > 0) && !skip_validate_output) {
+			rte_memdump(stdout, "Buffer A", ref_out, data_len);
+			rte_memdump(stdout, "Buffer B", op_out, data_len);
+			TEST_ASSERT(error_num == 0,
+				"FFT Output are not matched total (%u) errors (%u)",
+				data_len_iq, error_num);
+		}
+
+		m = m->next;
+	}
+
+	return TEST_SUCCESS;
+}
+
 static inline int
 validate_op_mldts_chain(struct rte_bbdev_op_data *op,
 		struct op_data_entries *orig_op)
@@ -2712,7 +2762,7 @@ validate_fft_op(struct rte_bbdev_fft_op **ops, const uint16_t n,
 				&ops[i]->fft.base_output, fft_data_orig, skip_validate_output),
 				"FFT Output buffers (op=%u) are not matched", i);
 		if (check_bit(ops[i]->fft.op_flags, RTE_BBDEV_FFT_POWER_MEAS))
-			TEST_ASSERT_SUCCESS(validate_op_fft_chain(
+			TEST_ASSERT_SUCCESS(validate_op_fft_meas_chain(
 				&ops[i]->fft.power_meas_output, fft_pwr_orig, skip_validate_output),
 				"FFT Power Output buffers (op=%u) are not matched", i);
 	}
-- 
2.37.1


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

* [PATCH v1 9/9] test/bbdev: remove unnecessary line
  2024-04-22 19:07 [PATCH v1 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
                   ` (7 preceding siblings ...)
  2024-04-22 19:07 ` [PATCH v1 8/9] test/bbdev: update fft measurement output Hernan Vargas
@ 2024-04-22 19:08 ` Hernan Vargas
  2024-06-12 11:13   ` Maxime Coquelin
  8 siblings, 1 reply; 21+ messages in thread
From: Hernan Vargas @ 2024-04-22 19:08 UTC (permalink / raw)
  To: dev, gakhil, trix, maxime.coquelin
  Cc: nicolas.chautru, qi.z.zhang, Hernan Vargas

Remove unnecesary line of code.
No functional impact.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
 app/test-bbdev/test_bbdev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c
index cf224dca5d04..0bbce6ca923b 100644
--- a/app/test-bbdev/test_bbdev.c
+++ b/app/test-bbdev/test_bbdev.c
@@ -1239,7 +1239,6 @@ test_bbdev_invalid_driver(void)
 	TEST_ASSERT_SUCCESS(rte_bbdev_callback_unregister(dev_id,
 			RTE_BBDEV_EVENT_UNKNOWN, event_callback, NULL),
 			"Failed to unregister RTE_BBDEV_EVENT_ERROR ");
-	dev2->dev_ops = dev1.dev_ops;
 
 	/* Tests for rte_bbdev_stats_reset */
 	dev2->dev_ops = NULL;
-- 
2.37.1


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

* Re: [PATCH v1 1/9] test/bbdev: fix TB logic
  2024-04-22 19:07 ` [PATCH v1 1/9] test/bbdev: fix TB logic Hernan Vargas
@ 2024-06-12  9:18   ` Maxime Coquelin
  0 siblings, 0 replies; 21+ messages in thread
From: Maxime Coquelin @ 2024-06-12  9:18 UTC (permalink / raw)
  To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, stable



On 4/22/24 21:07, Hernan Vargas wrote:
> 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,

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

Thanks,
Maxime


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

* Re: [PATCH v1 2/9] test/bbdev: fix MLD output size computation
  2024-04-22 19:07 ` [PATCH v1 2/9] test/bbdev: fix MLD output size computation Hernan Vargas
@ 2024-06-12  9:25   ` Maxime Coquelin
  0 siblings, 0 replies; 21+ messages in thread
From: Maxime Coquelin @ 2024-06-12  9:25 UTC (permalink / raw)
  To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, stable



On 4/22/24 21:07, 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 | 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);

Could you please explain what these numbers (12, 8) relate to?
Maybe some defines are needed so that it is self-explanatory.

Thanks,
Maxime

> +
>   	return output_size;
>   }
>   


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

* Re: [PATCH v1 3/9] test/bbdev: fix interrupt tests
  2024-04-22 19:07 ` [PATCH v1 3/9] test/bbdev: fix interrupt tests Hernan Vargas
@ 2024-06-12  9:27   ` Maxime Coquelin
  0 siblings, 0 replies; 21+ messages in thread
From: Maxime Coquelin @ 2024-06-12  9:27 UTC (permalink / raw)
  To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang, stable



On 4/22/24 21:07, Hernan Vargas wrote:
> 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(-)
> 

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


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

* Re: [PATCH v1 4/9] test/bbdev: change iter-max argument
  2024-04-22 19:07 ` [PATCH v1 4/9] test/bbdev: change iter-max argument Hernan Vargas
@ 2024-06-12  9:37   ` Maxime Coquelin
  0 siblings, 0 replies; 21+ messages in thread
From: Maxime Coquelin @ 2024-06-12  9:37 UTC (permalink / raw)
  To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang



On 4/22/24 21:07, Hernan Vargas wrote:
> -t --iter-max used for max number of iterations.
> -T --timeout used for test timeout value.
> 
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
>   app/test-bbdev/test-bbdev.py | 16 +++++-----------
>   1 file changed, 5 insertions(+), 11 deletions(-)
> 
> diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py
> index 65a34390548d..9ddca9e78d3b 100755
> --- a/app/test-bbdev/test-bbdev.py
> +++ b/app/test-bbdev/test-bbdev.py
> @@ -27,16 +27,10 @@ def kill(process):
>   parser.add_argument("-e", "--eal-params",
>                       help="EAL arguments which must be passed to the test app",
>                       default="--vdev=baseband_null0 -a00:00.0")
> -# Until deprecated in next release keep -t as an valid argument for timeout, then use -T
> -parser.add_argument("-t", "--timeout",
> +parser.add_argument("-T", "--timeout",
>                       type=int,
>                       help="Timeout in seconds",
>                       default=600)
> -# This will become -t option for iter_max in next release
> -parser.add_argument("--iter-max",
> -                    type=int,
> -                    help="Max iterations",
> -                    default=6)
>   parser.add_argument("-c", "--test-cases",
>                       nargs="+",
>                       help="Defines test cases to run. Run all if not specified")
> @@ -58,6 +52,10 @@ def kill(process):
>                       type=int,
>                       help="SNR in dB for BLER tests",
>                       default=0)
> +parser.add_argument("-t", "--iter-max",
> +                    type=int,
> +                    help="Max iterations",
> +                    default=6)
>   parser.add_argument("-l", "--num-lcores",
>                       type=int,
>                       help="Number of lcores to run.",
> @@ -83,10 +81,6 @@ def kill(process):
>   
>   if args.iter_max:
>       params.extend(["-t", str(args.iter_max)])
> -    print("The argument for iter_max will be -t in next release")
> -
> -if args.timeout:
> -    print("The argument for timeout will be -T in next release")
>   
>   if args.num_ops:
>       params.extend(["-n", str(args.num_ops)])


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

Thanks,
Maxime


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

* Re: [PATCH v1 5/9] test/bbdev: improve timeout message format
  2024-04-22 19:07 ` [PATCH v1 5/9] test/bbdev: improve timeout message format Hernan Vargas
@ 2024-06-12 10:36   ` Maxime Coquelin
  0 siblings, 0 replies; 21+ messages in thread
From: Maxime Coquelin @ 2024-06-12 10:36 UTC (permalink / raw)
  To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang



On 4/22/24 21:07, Hernan Vargas wrote:
> Print more info and format message for test timeouts.
> No functional impact.
> 
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
>   app/test-bbdev/test-bbdev.py | 22 ++++++++++++++++++----
>   1 file changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py
> index 9ddca9e78d3b..d5b679f7867f 100755
> --- a/app/test-bbdev/test-bbdev.py
> +++ b/app/test-bbdev/test-bbdev.py
> @@ -108,15 +108,29 @@ def kill(process):
>           try:
>               output = subprocess.run(call_params, timeout=args.timeout, universal_newlines=True)
>           except subprocess.TimeoutExpired as e:
> +            print("===========================================================")
>               print("Starting Test Suite : BBdev TimeOut Tests")
> +            print("INFO: One of the tests timed out {}".format(e))
> +            print("INFO: Unexpected Error")
> +            print("+ ------------------------------------------------------- +")
>               print("== test: timeout")
> -            print("TestCase [ 0] : timeout passed")
> -            print(" + Tests Failed :       1")
>               print("Unexpected Error")
> +            print("TestCase [ 0] : timeout failed")
> +            print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
> +            print(" + Tests Failed :       1")
> +            print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
> +            exit_status = 1
>           if output.returncode < 0:
> +            print("===========================================================")
>               print("Starting Test Suite : BBdev Exception Tests")
> +            print("INFO: One of the tests returned {}".format(output.returncode))
> +            print("INFO: Unexpected Error")
> +            print("+ ------------------------------------------------------- +")
>               print("== test: exception")
> -            print("TestCase [ 0] : exception passed")
> -            print(" + Tests Failed :       1")
>               print("Unexpected Error")
> +            print("TestCase [ 0] : exception failed")
> +            print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
> +            print(" + Tests Failed :       1")
> +            print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
> +            exit_status = 1
>   sys.exit(exit_status)

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

Thanks,
Maxime


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

* Re: [PATCH v1 6/9] test/bbdev: add soft output parsing capability
  2024-04-22 19:07 ` [PATCH v1 6/9] test/bbdev: add soft output parsing capability Hernan Vargas
@ 2024-06-12 11:09   ` Maxime Coquelin
  0 siblings, 0 replies; 21+ messages in thread
From: Maxime Coquelin @ 2024-06-12 11:09 UTC (permalink / raw)
  To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang



On 4/22/24 21:07, Hernan Vargas wrote:
> Add vector parsing capability for soft output vectors.
> 
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
>   app/test-bbdev/test_bbdev_vector.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c
> index 42fa630041e9..b3e9d4bb7504 100644
> --- a/app/test-bbdev/test_bbdev_vector.c
> +++ b/app/test-bbdev/test_bbdev_vector.c
> @@ -837,6 +837,10 @@ parse_ldpc_decoder_params(const char *key_token, char *token,
>   		ret = parse_data_entry(key_token, token, vector,
>   				DATA_HARQ_OUTPUT,
>   				op_data_prefixes[DATA_HARQ_OUTPUT]);
> +	else if (starts_with(key_token, op_data_prefixes[DATA_SOFT_OUTPUT]))
> +		ret = parse_data_entry(key_token, token, vector,
> +				DATA_SOFT_OUTPUT,
> +				op_data_prefixes[DATA_SOFT_OUTPUT]);
>   	else if (!strcmp(key_token, "e")) {
>   		vector->mask |= TEST_BBDEV_VF_E;
>   		ldpc_dec->cb_params.e = (uint32_t) strtoul(token, &err, 0);

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

Thanks,
Maxime


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

* Re: [PATCH v1 7/9] test/bbdev: check assumptions on fft window
  2024-04-22 19:07 ` [PATCH v1 7/9] test/bbdev: check assumptions on fft window Hernan Vargas
@ 2024-06-12 11:11   ` Maxime Coquelin
  2024-06-20 18:11     ` Chautru, Nicolas
  0 siblings, 1 reply; 21+ messages in thread
From: Maxime Coquelin @ 2024-06-12 11:11 UTC (permalink / raw)
  To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang



On 4/22/24 21:07, Hernan Vargas wrote:
> Add check for FFT window width.
> 
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
>   app/test-bbdev/test_bbdev_perf.c   | 26 ++++++++++++++++++++++----
>   app/test-bbdev/test_bbdev_vector.c | 14 ++++++++++++++
>   app/test-bbdev/test_bbdev_vector.h |  2 ++
>   3 files changed, 38 insertions(+), 4 deletions(-)
> 
> diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
> index 28d78e73a9c1..57b21730cab2 100644
> --- a/app/test-bbdev/test_bbdev_perf.c
> +++ b/app/test-bbdev/test_bbdev_perf.c
> @@ -106,6 +106,8 @@ static int ldpc_llr_decimals;
>   static int ldpc_llr_size;
>   /* Keep track of the LDPC decoder device capability flag */
>   static uint32_t ldpc_cap_flags;
> +/* FFT window width predefined on device and on vector. */
> +static int fft_window_width_dev;
>   
>   /* Represents tested active devices */
>   static struct active_device {
> @@ -881,6 +883,13 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info,
>   	rte_bbdev_info_get(dev_id, info);
>   	if (info->drv.device_status == RTE_BBDEV_DEV_FATAL_ERR)
>   		printf("Device Status %s\n", rte_bbdev_device_status_str(info->drv.device_status));
> +	if (info->drv.fft_window_width != NULL)
> +		fft_window_width_dev = info->drv.fft_window_width[0];
> +	else
> +		fft_window_width_dev = 0;
> +	if (fft_window_width_dev != 0)
> +		printf("  FFT Window0 width %d\n", fft_window_width_dev);

Why not print the value systematically?

> +
>   	nb_queues = RTE_MIN(rte_lcore_count(), info->drv.max_num_queues);
>   	nb_queues = RTE_MIN(nb_queues, (unsigned int) MAX_QUEUES);
>   
> @@ -2583,7 +2592,8 @@ validate_ldpc_enc_op(struct rte_bbdev_enc_op **ops, const uint16_t n,
>   }
>   
>   static inline int
> -validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig_op)
> +validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig_op,
> +		bool skip_validate_output)
>   {
>   	struct rte_mbuf *m = op->data;
>   	uint8_t i, nb_dst_segments = orig_op->nb_segments;
> @@ -2613,7 +2623,7 @@ validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig
>   			abs_delt = delt > 0 ? delt : -delt;
>   			error_num += (abs_delt > thres_hold ? 1 : 0);
>   		}
> -		if (error_num > 0) {
> +		if ((error_num > 0) && !skip_validate_output) {
>   			rte_memdump(stdout, "Buffer A", ref_out, data_len);
>   			rte_memdump(stdout, "Buffer B", op_out, data_len);
>   			TEST_ASSERT(error_num == 0,
> @@ -2686,16 +2696,24 @@ validate_fft_op(struct rte_bbdev_fft_op **ops, const uint16_t n,
>   	int ret;
>   	struct op_data_entries *fft_data_orig = &test_vector.entries[DATA_HARD_OUTPUT];
>   	struct op_data_entries *fft_pwr_orig = &test_vector.entries[DATA_SOFT_OUTPUT];
> +	bool skip_validate_output = false;
> +
> +	if ((test_vector.fft_window_width_vec > 0) &&
> +			(test_vector.fft_window_width_vec != fft_window_width_dev)) {
> +		printf("The vector FFT width doesn't match with device - skip %d %d\n",
> +				test_vector.fft_window_width_vec, fft_window_width_dev);
> +		skip_validate_output = true;
> +	}
>   
>   	for (i = 0; i < n; ++i) {
>   		ret = check_fft_status_and_ordering(ops[i], i, ref_op->status);
>   		TEST_ASSERT_SUCCESS(ret, "Checking status and ordering for FFT failed");
>   		TEST_ASSERT_SUCCESS(validate_op_fft_chain(
> -				&ops[i]->fft.base_output, fft_data_orig),
> +				&ops[i]->fft.base_output, fft_data_orig, skip_validate_output),
>   				"FFT Output buffers (op=%u) are not matched", i);
>   		if (check_bit(ops[i]->fft.op_flags, RTE_BBDEV_FFT_POWER_MEAS))
>   			TEST_ASSERT_SUCCESS(validate_op_fft_chain(
> -				&ops[i]->fft.power_meas_output, fft_pwr_orig),
> +				&ops[i]->fft.power_meas_output, fft_pwr_orig, skip_validate_output),
>   				"FFT Power Output buffers (op=%u) are not matched", i);
>   	}
>   
> diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c
> index b3e9d4bb7504..e48947b211ac 100644
> --- a/app/test-bbdev/test_bbdev_vector.c
> +++ b/app/test-bbdev/test_bbdev_vector.c
> @@ -1050,6 +1050,20 @@ parse_fft_params(const char *key_token, char *token,
>   			}
>   		}
>   		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
> +	} else if (!strcmp(key_token, "fft_window_width")) {
> +		tok = strtok(token, VALUE_DELIMITER);
> +		if (tok == NULL)
> +			return -1;
> +		for (i = 0; i < FFT_WIN_SIZE; i++) {
> +			if (i == 0)
> +				vector->fft_window_width_vec = (uint32_t) strtoul(tok, &err, 0);
> +			if (i < (FFT_WIN_SIZE - 1)) {
> +				tok = strtok(NULL, VALUE_DELIMITER);
> +				if (tok == NULL)
> +					return -1;
> +			}
> +		}
> +		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
>   	} else if (!strcmp(key_token, "op_flags")) {
>   		vector->mask |= TEST_BBDEV_VF_OP_FLAGS;
>   		ret = parse_turbo_flags(token, &op_flags, vector->op_type);
> diff --git a/app/test-bbdev/test_bbdev_vector.h b/app/test-bbdev/test_bbdev_vector.h
> index 14b8ef2764ad..ba1d0d20f9ea 100644
> --- a/app/test-bbdev/test_bbdev_vector.h
> +++ b/app/test-bbdev/test_bbdev_vector.h
> @@ -69,6 +69,8 @@ struct test_bbdev_vector {
>   	};
>   	/* Additional storage for op data entries */
>   	struct op_data_entries entries[DATA_NUM_TYPES];
> +	/* Vector FFT window width assumption. */
> +	uint16_t fft_window_width_vec;
>   };
>   
>   /* fills test vector parameters based on test file */


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

* Re: [PATCH v1 8/9] test/bbdev: update fft measurement output
  2024-04-22 19:07 ` [PATCH v1 8/9] test/bbdev: update fft measurement output Hernan Vargas
@ 2024-06-12 11:12   ` Maxime Coquelin
  0 siblings, 0 replies; 21+ messages in thread
From: Maxime Coquelin @ 2024-06-12 11:12 UTC (permalink / raw)
  To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang



On 4/22/24 21:07, Hernan Vargas wrote:
> Update check for FFT measurement output to better account for tolerance.
> 
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
>   app/test-bbdev/test_bbdev_perf.c | 52 +++++++++++++++++++++++++++++++-
>   1 file changed, 51 insertions(+), 1 deletion(-)
> 

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

Thanks,
Maxime



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

* Re: [PATCH v1 9/9] test/bbdev: remove unnecessary line
  2024-04-22 19:08 ` [PATCH v1 9/9] test/bbdev: remove unnecessary line Hernan Vargas
@ 2024-06-12 11:13   ` Maxime Coquelin
  0 siblings, 0 replies; 21+ messages in thread
From: Maxime Coquelin @ 2024-06-12 11:13 UTC (permalink / raw)
  To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang



On 4/22/24 21:08, Hernan Vargas wrote:
> Remove unnecesary line of code.
> No functional impact.
> 
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
>   app/test-bbdev/test_bbdev.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c
> index cf224dca5d04..0bbce6ca923b 100644
> --- a/app/test-bbdev/test_bbdev.c
> +++ b/app/test-bbdev/test_bbdev.c
> @@ -1239,7 +1239,6 @@ test_bbdev_invalid_driver(void)
>   	TEST_ASSERT_SUCCESS(rte_bbdev_callback_unregister(dev_id,
>   			RTE_BBDEV_EVENT_UNKNOWN, event_callback, NULL),
>   			"Failed to unregister RTE_BBDEV_EVENT_ERROR ");
> -	dev2->dev_ops = dev1.dev_ops;
>   
>   	/* Tests for rte_bbdev_stats_reset */
>   	dev2->dev_ops = NULL;
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


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

* RE: [PATCH v1 7/9] test/bbdev: check assumptions on fft window
  2024-06-12 11:11   ` Maxime Coquelin
@ 2024-06-20 18:11     ` Chautru, Nicolas
  2024-06-24  7:48       ` Maxime Coquelin
  0 siblings, 1 reply; 21+ messages in thread
From: Chautru, Nicolas @ 2024-06-20 18:11 UTC (permalink / raw)
  To: Maxime Coquelin, Vargas, Hernan, dev, gakhil, trix; +Cc: Zhang, Qi Z

Hi Maxime, 

> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Wednesday, June 12, 2024 4:11 AM
> To: Vargas, Hernan <hernan.vargas@intel.com>; dev@dpdk.org;
> gakhil@marvell.com; trix@redhat.com
> Cc: Chautru, Nicolas <nicolas.chautru@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Subject: Re: [PATCH v1 7/9] test/bbdev: check assumptions on fft window
> 
> 
> 
> On 4/22/24 21:07, Hernan Vargas wrote:
> > Add check for FFT window width.
> >
> > Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> > ---
> >   app/test-bbdev/test_bbdev_perf.c   | 26 ++++++++++++++++++++++----
> >   app/test-bbdev/test_bbdev_vector.c | 14 ++++++++++++++
> >   app/test-bbdev/test_bbdev_vector.h |  2 ++
> >   3 files changed, 38 insertions(+), 4 deletions(-)
> >
> > diff --git a/app/test-bbdev/test_bbdev_perf.c
> > b/app/test-bbdev/test_bbdev_perf.c
> > index 28d78e73a9c1..57b21730cab2 100644
> > --- a/app/test-bbdev/test_bbdev_perf.c
> > +++ b/app/test-bbdev/test_bbdev_perf.c
> > @@ -106,6 +106,8 @@ static int ldpc_llr_decimals;
> >   static int ldpc_llr_size;
> >   /* Keep track of the LDPC decoder device capability flag */
> >   static uint32_t ldpc_cap_flags;
> > +/* FFT window width predefined on device and on vector. */ static int
> > +fft_window_width_dev;
> >
> >   /* Represents tested active devices */
> >   static struct active_device {
> > @@ -881,6 +883,13 @@ add_bbdev_dev(uint8_t dev_id, struct
> rte_bbdev_info *info,
> >   	rte_bbdev_info_get(dev_id, info);
> >   	if (info->drv.device_status == RTE_BBDEV_DEV_FATAL_ERR)
> >   		printf("Device Status %s\n",
> > rte_bbdev_device_status_str(info->drv.device_status));
> > +	if (info->drv.fft_window_width != NULL)
> > +		fft_window_width_dev = info->drv.fft_window_width[0];
> > +	else
> > +		fft_window_width_dev = 0;
> > +	if (fft_window_width_dev != 0)
> > +		printf("  FFT Window0 width %d\n", fft_window_width_dev);
> 
> Why not print the value systematically?

It would only be zero if the application was not able to get that information, hence that would be irrelevant. 

> 
> > +
> >   	nb_queues = RTE_MIN(rte_lcore_count(), info-
> >drv.max_num_queues);
> >   	nb_queues = RTE_MIN(nb_queues, (unsigned int) MAX_QUEUES);
> >
> > @@ -2583,7 +2592,8 @@ validate_ldpc_enc_op(struct rte_bbdev_enc_op
> **ops, const uint16_t n,
> >   }
> >
> >   static inline int
> > -validate_op_fft_chain(struct rte_bbdev_op_data *op, struct
> > op_data_entries *orig_op)
> > +validate_op_fft_chain(struct rte_bbdev_op_data *op, struct
> op_data_entries *orig_op,
> > +		bool skip_validate_output)
> >   {
> >   	struct rte_mbuf *m = op->data;
> >   	uint8_t i, nb_dst_segments = orig_op->nb_segments; @@ -2613,7
> > +2623,7 @@ validate_op_fft_chain(struct rte_bbdev_op_data *op, struct
> op_data_entries *orig
> >   			abs_delt = delt > 0 ? delt : -delt;
> >   			error_num += (abs_delt > thres_hold ? 1 : 0);
> >   		}
> > -		if (error_num > 0) {
> > +		if ((error_num > 0) && !skip_validate_output) {
> >   			rte_memdump(stdout, "Buffer A", ref_out, data_len);
> >   			rte_memdump(stdout, "Buffer B", op_out, data_len);
> >   			TEST_ASSERT(error_num == 0,
> > @@ -2686,16 +2696,24 @@ validate_fft_op(struct rte_bbdev_fft_op **ops,
> const uint16_t n,
> >   	int ret;
> >   	struct op_data_entries *fft_data_orig =
> &test_vector.entries[DATA_HARD_OUTPUT];
> >   	struct op_data_entries *fft_pwr_orig =
> > &test_vector.entries[DATA_SOFT_OUTPUT];
> > +	bool skip_validate_output = false;
> > +
> > +	if ((test_vector.fft_window_width_vec > 0) &&
> > +			(test_vector.fft_window_width_vec !=
> fft_window_width_dev)) {
> > +		printf("The vector FFT width doesn't match with device - skip
> %d %d\n",
> > +				test_vector.fft_window_width_vec,
> fft_window_width_dev);
> > +		skip_validate_output = true;
> > +	}
> >
> >   	for (i = 0; i < n; ++i) {
> >   		ret = check_fft_status_and_ordering(ops[i], i, ref_op->status);
> >   		TEST_ASSERT_SUCCESS(ret, "Checking status and ordering for
> FFT failed");
> >   		TEST_ASSERT_SUCCESS(validate_op_fft_chain(
> > -				&ops[i]->fft.base_output, fft_data_orig),
> > +				&ops[i]->fft.base_output, fft_data_orig,
> skip_validate_output),
> >   				"FFT Output buffers (op=%u) are not
> matched", i);
> >   		if (check_bit(ops[i]->fft.op_flags,
> RTE_BBDEV_FFT_POWER_MEAS))
> >   			TEST_ASSERT_SUCCESS(validate_op_fft_chain(
> > -				&ops[i]->fft.power_meas_output,
> fft_pwr_orig),
> > +				&ops[i]->fft.power_meas_output,
> fft_pwr_orig,
> > +skip_validate_output),
> >   				"FFT Power Output buffers (op=%u) are not
> matched", i);
> >   	}
> >
> > diff --git a/app/test-bbdev/test_bbdev_vector.c
> > b/app/test-bbdev/test_bbdev_vector.c
> > index b3e9d4bb7504..e48947b211ac 100644
> > --- a/app/test-bbdev/test_bbdev_vector.c
> > +++ b/app/test-bbdev/test_bbdev_vector.c
> > @@ -1050,6 +1050,20 @@ parse_fft_params(const char *key_token, char
> *token,
> >   			}
> >   		}
> >   		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
> > +	} else if (!strcmp(key_token, "fft_window_width")) {
> > +		tok = strtok(token, VALUE_DELIMITER);
> > +		if (tok == NULL)
> > +			return -1;
> > +		for (i = 0; i < FFT_WIN_SIZE; i++) {
> > +			if (i == 0)
> > +				vector->fft_window_width_vec = (uint32_t)
> strtoul(tok, &err, 0);
> > +			if (i < (FFT_WIN_SIZE - 1)) {
> > +				tok = strtok(NULL, VALUE_DELIMITER);
> > +				if (tok == NULL)
> > +					return -1;
> > +			}
> > +		}
> > +		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
> >   	} else if (!strcmp(key_token, "op_flags")) {
> >   		vector->mask |= TEST_BBDEV_VF_OP_FLAGS;
> >   		ret = parse_turbo_flags(token, &op_flags, vector->op_type);
> diff
> > --git a/app/test-bbdev/test_bbdev_vector.h
> > b/app/test-bbdev/test_bbdev_vector.h
> > index 14b8ef2764ad..ba1d0d20f9ea 100644
> > --- a/app/test-bbdev/test_bbdev_vector.h
> > +++ b/app/test-bbdev/test_bbdev_vector.h
> > @@ -69,6 +69,8 @@ struct test_bbdev_vector {
> >   	};
> >   	/* Additional storage for op data entries */
> >   	struct op_data_entries entries[DATA_NUM_TYPES];
> > +	/* Vector FFT window width assumption. */
> > +	uint16_t fft_window_width_vec;
> >   };
> >
> >   /* fills test vector parameters based on test file */


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

* Re: [PATCH v1 7/9] test/bbdev: check assumptions on fft window
  2024-06-20 18:11     ` Chautru, Nicolas
@ 2024-06-24  7:48       ` Maxime Coquelin
  0 siblings, 0 replies; 21+ messages in thread
From: Maxime Coquelin @ 2024-06-24  7:48 UTC (permalink / raw)
  To: Chautru, Nicolas, Vargas, Hernan, dev, gakhil, trix; +Cc: Zhang, Qi Z

Hi Nicolas,

On 6/20/24 20:11, Chautru, Nicolas wrote:
> Hi Maxime,
> 
>> -----Original Message-----
>> From: Maxime Coquelin <maxime.coquelin@redhat.com>
>> Sent: Wednesday, June 12, 2024 4:11 AM
>> To: Vargas, Hernan <hernan.vargas@intel.com>; dev@dpdk.org;
>> gakhil@marvell.com; trix@redhat.com
>> Cc: Chautru, Nicolas <nicolas.chautru@intel.com>; Zhang, Qi Z
>> <qi.z.zhang@intel.com>
>> Subject: Re: [PATCH v1 7/9] test/bbdev: check assumptions on fft window
>>
>>
>>
>> On 4/22/24 21:07, Hernan Vargas wrote:
>>> Add check for FFT window width.
>>>
>>> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
>>> ---
>>>    app/test-bbdev/test_bbdev_perf.c   | 26 ++++++++++++++++++++++----
>>>    app/test-bbdev/test_bbdev_vector.c | 14 ++++++++++++++
>>>    app/test-bbdev/test_bbdev_vector.h |  2 ++
>>>    3 files changed, 38 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/app/test-bbdev/test_bbdev_perf.c
>>> b/app/test-bbdev/test_bbdev_perf.c
>>> index 28d78e73a9c1..57b21730cab2 100644
>>> --- a/app/test-bbdev/test_bbdev_perf.c
>>> +++ b/app/test-bbdev/test_bbdev_perf.c
>>> @@ -106,6 +106,8 @@ static int ldpc_llr_decimals;
>>>    static int ldpc_llr_size;
>>>    /* Keep track of the LDPC decoder device capability flag */
>>>    static uint32_t ldpc_cap_flags;
>>> +/* FFT window width predefined on device and on vector. */ static int
>>> +fft_window_width_dev;
>>>
>>>    /* Represents tested active devices */
>>>    static struct active_device {
>>> @@ -881,6 +883,13 @@ add_bbdev_dev(uint8_t dev_id, struct
>> rte_bbdev_info *info,
>>>    	rte_bbdev_info_get(dev_id, info);
>>>    	if (info->drv.device_status == RTE_BBDEV_DEV_FATAL_ERR)
>>>    		printf("Device Status %s\n",
>>> rte_bbdev_device_status_str(info->drv.device_status));
>>> +	if (info->drv.fft_window_width != NULL)
>>> +		fft_window_width_dev = info->drv.fft_window_width[0];
>>> +	else
>>> +		fft_window_width_dev = 0;
>>> +	if (fft_window_width_dev != 0)
>>> +		printf("  FFT Window0 width %d\n", fft_window_width_dev);
>>
>> Why not print the value systematically?
> 
> It would only be zero if the application was not able to get that information, hence that would be irrelevant.

Ok, please send a V2 addressing my request on patch 2 so that I can
apply the series this week.

Thanks,
Maxime

>>
>>> +
>>>    	nb_queues = RTE_MIN(rte_lcore_count(), info-
>>> drv.max_num_queues);
>>>    	nb_queues = RTE_MIN(nb_queues, (unsigned int) MAX_QUEUES);
>>>
>>> @@ -2583,7 +2592,8 @@ validate_ldpc_enc_op(struct rte_bbdev_enc_op
>> **ops, const uint16_t n,
>>>    }
>>>
>>>    static inline int
>>> -validate_op_fft_chain(struct rte_bbdev_op_data *op, struct
>>> op_data_entries *orig_op)
>>> +validate_op_fft_chain(struct rte_bbdev_op_data *op, struct
>> op_data_entries *orig_op,
>>> +		bool skip_validate_output)
>>>    {
>>>    	struct rte_mbuf *m = op->data;
>>>    	uint8_t i, nb_dst_segments = orig_op->nb_segments; @@ -2613,7
>>> +2623,7 @@ validate_op_fft_chain(struct rte_bbdev_op_data *op, struct
>> op_data_entries *orig
>>>    			abs_delt = delt > 0 ? delt : -delt;
>>>    			error_num += (abs_delt > thres_hold ? 1 : 0);
>>>    		}
>>> -		if (error_num > 0) {
>>> +		if ((error_num > 0) && !skip_validate_output) {
>>>    			rte_memdump(stdout, "Buffer A", ref_out, data_len);
>>>    			rte_memdump(stdout, "Buffer B", op_out, data_len);
>>>    			TEST_ASSERT(error_num == 0,
>>> @@ -2686,16 +2696,24 @@ validate_fft_op(struct rte_bbdev_fft_op **ops,
>> const uint16_t n,
>>>    	int ret;
>>>    	struct op_data_entries *fft_data_orig =
>> &test_vector.entries[DATA_HARD_OUTPUT];
>>>    	struct op_data_entries *fft_pwr_orig =
>>> &test_vector.entries[DATA_SOFT_OUTPUT];
>>> +	bool skip_validate_output = false;
>>> +
>>> +	if ((test_vector.fft_window_width_vec > 0) &&
>>> +			(test_vector.fft_window_width_vec !=
>> fft_window_width_dev)) {
>>> +		printf("The vector FFT width doesn't match with device - skip
>> %d %d\n",
>>> +				test_vector.fft_window_width_vec,
>> fft_window_width_dev);
>>> +		skip_validate_output = true;
>>> +	}
>>>
>>>    	for (i = 0; i < n; ++i) {
>>>    		ret = check_fft_status_and_ordering(ops[i], i, ref_op->status);
>>>    		TEST_ASSERT_SUCCESS(ret, "Checking status and ordering for
>> FFT failed");
>>>    		TEST_ASSERT_SUCCESS(validate_op_fft_chain(
>>> -				&ops[i]->fft.base_output, fft_data_orig),
>>> +				&ops[i]->fft.base_output, fft_data_orig,
>> skip_validate_output),
>>>    				"FFT Output buffers (op=%u) are not
>> matched", i);
>>>    		if (check_bit(ops[i]->fft.op_flags,
>> RTE_BBDEV_FFT_POWER_MEAS))
>>>    			TEST_ASSERT_SUCCESS(validate_op_fft_chain(
>>> -				&ops[i]->fft.power_meas_output,
>> fft_pwr_orig),
>>> +				&ops[i]->fft.power_meas_output,
>> fft_pwr_orig,
>>> +skip_validate_output),
>>>    				"FFT Power Output buffers (op=%u) are not
>> matched", i);
>>>    	}
>>>
>>> diff --git a/app/test-bbdev/test_bbdev_vector.c
>>> b/app/test-bbdev/test_bbdev_vector.c
>>> index b3e9d4bb7504..e48947b211ac 100644
>>> --- a/app/test-bbdev/test_bbdev_vector.c
>>> +++ b/app/test-bbdev/test_bbdev_vector.c
>>> @@ -1050,6 +1050,20 @@ parse_fft_params(const char *key_token, char
>> *token,
>>>    			}
>>>    		}
>>>    		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
>>> +	} else if (!strcmp(key_token, "fft_window_width")) {
>>> +		tok = strtok(token, VALUE_DELIMITER);
>>> +		if (tok == NULL)
>>> +			return -1;
>>> +		for (i = 0; i < FFT_WIN_SIZE; i++) {
>>> +			if (i == 0)
>>> +				vector->fft_window_width_vec = (uint32_t)
>> strtoul(tok, &err, 0);
>>> +			if (i < (FFT_WIN_SIZE - 1)) {
>>> +				tok = strtok(NULL, VALUE_DELIMITER);
>>> +				if (tok == NULL)
>>> +					return -1;
>>> +			}
>>> +		}
>>> +		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
>>>    	} else if (!strcmp(key_token, "op_flags")) {
>>>    		vector->mask |= TEST_BBDEV_VF_OP_FLAGS;
>>>    		ret = parse_turbo_flags(token, &op_flags, vector->op_type);
>> diff
>>> --git a/app/test-bbdev/test_bbdev_vector.h
>>> b/app/test-bbdev/test_bbdev_vector.h
>>> index 14b8ef2764ad..ba1d0d20f9ea 100644
>>> --- a/app/test-bbdev/test_bbdev_vector.h
>>> +++ b/app/test-bbdev/test_bbdev_vector.h
>>> @@ -69,6 +69,8 @@ struct test_bbdev_vector {
>>>    	};
>>>    	/* Additional storage for op data entries */
>>>    	struct op_data_entries entries[DATA_NUM_TYPES];
>>> +	/* Vector FFT window width assumption. */
>>> +	uint16_t fft_window_width_vec;
>>>    };
>>>
>>>    /* fills test vector parameters based on test file */
> 


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

end of thread, other threads:[~2024-06-24  7:49 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-22 19:07 [PATCH v1 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
2024-04-22 19:07 ` [PATCH v1 1/9] test/bbdev: fix TB logic Hernan Vargas
2024-06-12  9:18   ` Maxime Coquelin
2024-04-22 19:07 ` [PATCH v1 2/9] test/bbdev: fix MLD output size computation Hernan Vargas
2024-06-12  9:25   ` Maxime Coquelin
2024-04-22 19:07 ` [PATCH v1 3/9] test/bbdev: fix interrupt tests Hernan Vargas
2024-06-12  9:27   ` Maxime Coquelin
2024-04-22 19:07 ` [PATCH v1 4/9] test/bbdev: change iter-max argument Hernan Vargas
2024-06-12  9:37   ` Maxime Coquelin
2024-04-22 19:07 ` [PATCH v1 5/9] test/bbdev: improve timeout message format Hernan Vargas
2024-06-12 10:36   ` Maxime Coquelin
2024-04-22 19:07 ` [PATCH v1 6/9] test/bbdev: add soft output parsing capability Hernan Vargas
2024-06-12 11:09   ` Maxime Coquelin
2024-04-22 19:07 ` [PATCH v1 7/9] test/bbdev: check assumptions on fft window Hernan Vargas
2024-06-12 11:11   ` Maxime Coquelin
2024-06-20 18:11     ` Chautru, Nicolas
2024-06-24  7:48       ` Maxime Coquelin
2024-04-22 19:07 ` [PATCH v1 8/9] test/bbdev: update fft measurement output Hernan Vargas
2024-06-12 11:12   ` Maxime Coquelin
2024-04-22 19:08 ` [PATCH v1 9/9] test/bbdev: remove unnecessary line Hernan Vargas
2024-06-12 11:13   ` 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).