test-bbdev fixes and improvements for 24.07
v2 cover test-bbdev fixes and improvements for 24.07
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(-)
Signature · 1 line
2.37.1
PATCH v2 1/9 test/bbdev: fix TB logic
Fix discrepancy in logic when using large fake mbuf.
--- app/test-bbdev/test_bbdev_perf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
app/test-bbdev/test_bbdev_perf.c +2 -1
@@ -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,
Signature · 1 line
2.37.1
PATCH v2 2/9 test/bbdev: fix MLD output size computation
In reply to Hernan VargasFor perf tests, the operation size for the MLD-TS was incorrect. Fixed so that the performance numbers are correct. Largely cosmetic only.
--- app/test-bbdev/test_bbdev_perf.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
app/test-bbdev/test_bbdev_perf.c +10 -2
@@ -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 256static 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; }
Signature · 1 line
2.37.1
Re: [PATCH v2 2/9] test/bbdev: fix MLD output size computation
Quoted 32 lines · Hernan Vargas
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")Signed-off-by Hernan Vargas <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)app/test-bbdev/test_bbdev_perf.c +3
-2@@ -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 256static 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 ;
app/test-bbdev/test_bbdev_perf.c calc_fft_size(struct rte_bbdev_fft_op *op) · line 2911
Quoted 10 lines
app/test-bbdev/test_bbdev_perf.c +7
-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!
Maxime
PATCH v2 3/9 test/bbdev: fix interrupt tests
In reply to Hernan VargasFix possible error with regards to setting the burst size from the enqueue thread.
--- app/test-bbdev/test_bbdev_perf.c | 98 ++++++++++++++++---------------- 1 file changed, 49 insertions(+), 49 deletions(-)
app/test-bbdev/test_bbdev_perf.c +49 -49
@@ -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 */
Signature · 1 line
2.37.1
PATCH v2 4/9 test/bbdev: change iter-max argument
In reply to Hernan Vargas-t --iter-max used for max number of iterations.
-T --timeout used for test timeout value.
--- app/test-bbdev/test-bbdev.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)
app/test-bbdev/test-bbdev.py +5 -11
@@ -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)])
Signature · 1 line
2.37.1
PATCH v2 5/9 test/bbdev: improve timeout message format
In reply to Hernan VargasPrint more info and format message for test timeouts. No functional impact.
--- app/test-bbdev/test-bbdev.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-)
app/test-bbdev/test-bbdev.py +18 -4
@@ -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)
Signature · 1 line
2.37.1
PATCH v2 6/9 test/bbdev: add soft output parsing capability
In reply to Hernan VargasAdd vector parsing capability for soft output vectors.
--- app/test-bbdev/test_bbdev_vector.c | 4 ++++ 1 file changed, 4 insertions(+)
app/test-bbdev/test_bbdev_vector.c +4 -0
@@ -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 );
Signature · 1 line
2.37.1
PATCH v2 7/9 test/bbdev: check assumptions on fft window
In reply to Hernan VargasAdd check for FFT window width.
--- 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(-)
app/test-bbdev/test_bbdev_perf.c +22 -4
@@ -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); }
app/test-bbdev/test_bbdev_vector.c +14 -0
@@ -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);
app/test-bbdev/test_bbdev_vector.h +2 -0
@@ -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 */
Signature · 1 line
2.37.1
Re: [PATCH v2 7/9] test/bbdev: check assumptions on fft window
Quoted 9 lines · Hernan Vargas
Add check for FFT window width.
Signed-off-by Hernan Vargas <[email protected]>--- 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(-)
Maxime
PATCH v2 8/9 test/bbdev: update fft measurement output
In reply to Hernan VargasUpdate check for FFT measurement output to better account for tolerance.
--- app/test-bbdev/test_bbdev_perf.c | 52 +++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-)
app/test-bbdev/test_bbdev_perf.c +51 -1
@@ -2639,6 +2639,56 @@ validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *origreturn 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); }
Signature · 1 line
2.37.1
PATCH v2 9/9 test/bbdev: remove unnecessary line
In reply to Hernan VargasRemove unnecesary line of code.
No functional impact.
--- app/test-bbdev/test_bbdev.c | 1 - 1 file changed, 1 deletion(-)
app/test-bbdev/test_bbdev.c +0 -1
@@ -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 ;
Signature · 1 line
2.37.1
Maxime Coquelin
AppliedQuoted 15 lines · 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
Quoted 7 lines
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