* [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07
@ 2024-06-24 15:02 Hernan Vargas
2024-06-24 15:02 ` [PATCH v2 1/9] test/bbdev: fix TB logic Hernan Vargas
` (9 more replies)
0 siblings, 10 replies; 13+ 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
v2: Added defines for MLD calculation constants.
v1: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 | 191 ++++++++++++++++++++---------
app/test-bbdev/test_bbdev_vector.c | 18 +++
app/test-bbdev/test_bbdev_vector.h | 2 +
5 files changed, 177 insertions(+), 73 deletions(-)
--
2.37.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/9] test/bbdev: fix TB logic
2024-06-24 15:02 [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
@ 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
` (8 subsequent siblings)
9 siblings, 0 replies; 13+ 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] 13+ messages in thread
* [PATCH v2 2/9] test/bbdev: fix MLD output size computation
2024-06-24 15:02 [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
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
` (7 subsequent siblings)
9 siblings, 1 reply; 13+ 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] 13+ messages in thread
* [PATCH v2 3/9] test/bbdev: fix interrupt tests
2024-06-24 15:02 [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
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
2024-06-24 15:02 ` [PATCH v2 4/9] test/bbdev: change iter-max argument Hernan Vargas
` (6 subsequent siblings)
9 siblings, 0 replies; 13+ 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] 13+ messages in thread
* [PATCH v2 4/9] test/bbdev: change iter-max argument
2024-06-24 15:02 [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
` (2 preceding siblings ...)
2024-06-24 15:02 ` [PATCH v2 3/9] test/bbdev: fix interrupt tests Hernan Vargas
@ 2024-06-24 15:02 ` Hernan Vargas
2024-06-24 15:02 ` [PATCH v2 5/9] test/bbdev: improve timeout message format Hernan Vargas
` (5 subsequent siblings)
9 siblings, 0 replies; 13+ 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
-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>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.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] 13+ messages in thread
* [PATCH v2 5/9] test/bbdev: improve timeout message format
2024-06-24 15:02 [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
` (3 preceding siblings ...)
2024-06-24 15:02 ` [PATCH v2 4/9] test/bbdev: change iter-max argument Hernan Vargas
@ 2024-06-24 15:02 ` Hernan Vargas
2024-06-24 15:02 ` [PATCH v2 6/9] test/bbdev: add soft output parsing capability Hernan Vargas
` (4 subsequent siblings)
9 siblings, 0 replies; 13+ 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
Print more info and format message for test timeouts.
No functional impact.
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.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] 13+ messages in thread
* [PATCH v2 6/9] test/bbdev: add soft output parsing capability
2024-06-24 15:02 [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
` (4 preceding siblings ...)
2024-06-24 15:02 ` [PATCH v2 5/9] test/bbdev: improve timeout message format Hernan Vargas
@ 2024-06-24 15:02 ` Hernan Vargas
2024-06-24 15:02 ` [PATCH v2 7/9] test/bbdev: check assumptions on fft window Hernan Vargas
` (3 subsequent siblings)
9 siblings, 0 replies; 13+ 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
Add vector parsing capability for soft output vectors.
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.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] 13+ messages in thread
* [PATCH v2 7/9] test/bbdev: check assumptions on fft window
2024-06-24 15:02 [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
` (5 preceding siblings ...)
2024-06-24 15:02 ` [PATCH v2 6/9] test/bbdev: add soft output parsing capability Hernan Vargas
@ 2024-06-24 15:02 ` Hernan Vargas
2024-06-25 8:40 ` Maxime Coquelin
2024-06-24 15:02 ` [PATCH v2 8/9] test/bbdev: update fft measurement output Hernan Vargas
` (2 subsequent siblings)
9 siblings, 1 reply; 13+ 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
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 20cd8df19be7..7c414ab360a8 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -108,6 +108,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 {
@@ -883,6 +885,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);
@@ -2585,7 +2594,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;
@@ -2615,7 +2625,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,
@@ -2688,16 +2698,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] 13+ messages in thread
* [PATCH v2 8/9] test/bbdev: update fft measurement output
2024-06-24 15:02 [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
` (6 preceding siblings ...)
2024-06-24 15:02 ` [PATCH v2 7/9] test/bbdev: check assumptions on fft window Hernan Vargas
@ 2024-06-24 15:02 ` Hernan Vargas
2024-06-24 15:02 ` [PATCH v2 9/9] test/bbdev: remove unnecessary line Hernan Vargas
2024-06-25 11:42 ` [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07 Maxime Coquelin
9 siblings, 0 replies; 13+ 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
Update check for FFT measurement output to better account for tolerance.
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.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 7c414ab360a8..3a94f15a30b8 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -2639,6 +2639,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)
@@ -2714,7 +2764,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] 13+ messages in thread
* [PATCH v2 9/9] test/bbdev: remove unnecessary line
2024-06-24 15:02 [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
` (7 preceding siblings ...)
2024-06-24 15:02 ` [PATCH v2 8/9] test/bbdev: update fft measurement output Hernan Vargas
@ 2024-06-24 15:02 ` Hernan Vargas
2024-06-25 11:42 ` [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07 Maxime Coquelin
9 siblings, 0 replies; 13+ 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
Remove unnecesary line of code.
No functional impact.
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.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] 13+ 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; 13+ 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] 13+ messages in thread
* Re: [PATCH v2 7/9] test/bbdev: check assumptions on fft window
2024-06-24 15:02 ` [PATCH v2 7/9] test/bbdev: check assumptions on fft window Hernan Vargas
@ 2024-06-25 8:40 ` Maxime Coquelin
0 siblings, 0 replies; 13+ messages in thread
From: Maxime Coquelin @ 2024-06-25 8:40 UTC (permalink / raw)
To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang
On 6/24/24 17:02, 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(-)
>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07
2024-06-24 15:02 [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
` (8 preceding siblings ...)
2024-06-24 15:02 ` [PATCH v2 9/9] test/bbdev: remove unnecessary line Hernan Vargas
@ 2024-06-25 11:42 ` Maxime Coquelin
9 siblings, 0 replies; 13+ messages in thread
From: Maxime Coquelin @ 2024-06-25 11:42 UTC (permalink / raw)
To: Hernan Vargas, dev, gakhil, trix; +Cc: nicolas.chautru, qi.z.zhang
On 6/24/24 17:02, Hernan Vargas wrote:
> v2: Added defines for MLD calculation constants.
> v1: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 | 191 ++++++++++++++++++++---------
> app/test-bbdev/test_bbdev_vector.c | 18 +++
> app/test-bbdev/test_bbdev_vector.h | 2 +
> 5 files changed, 177 insertions(+), 73 deletions(-)
>
Applied to next-baseband/for-main
Thanks,
Maxime
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-06-25 11:48 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-24 15:02 [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
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
2024-06-24 15:02 ` [PATCH v2 4/9] test/bbdev: change iter-max argument Hernan Vargas
2024-06-24 15:02 ` [PATCH v2 5/9] test/bbdev: improve timeout message format Hernan Vargas
2024-06-24 15:02 ` [PATCH v2 6/9] test/bbdev: add soft output parsing capability Hernan Vargas
2024-06-24 15:02 ` [PATCH v2 7/9] test/bbdev: check assumptions on fft window Hernan Vargas
2024-06-25 8:40 ` Maxime Coquelin
2024-06-24 15:02 ` [PATCH v2 8/9] test/bbdev: update fft measurement output Hernan Vargas
2024-06-24 15:02 ` [PATCH v2 9/9] test/bbdev: remove unnecessary line Hernan Vargas
2024-06-25 11:42 ` [PATCH v2 0/9] test-bbdev fixes and improvements for 24.07 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).