BBDEV test updates
v5 cover BBDEV test updates
v5: correcting typos again. Quite worrisome spelling disorder.
v4: rebased on main latest
v3: apologize again for typo and not double checking with check-git-log
v2: typos missed in commit messages
Serie updating and extending the app running the bbdev-test for the existing bbdev PMDs.
Nicolas Chautru (7):
app/bbdev: add explicit ut for latency vs validation app/bbdev: add explicit check for counters app/bbdev: include explicit HARQ preloading app/bbdev: define wait for offload app/bbdev: skip bler ut when compression is used app/bbdev: reduce duration of throughput test app/bbdev: update offload test to dequeue full ring
app/test-bbdev/main.h | 1 + app/test-bbdev/test_bbdev_perf.c | 193 ++++++++++++++++++++++++++++++--------- 2 files changed, 152 insertions(+), 42 deletions(-)
Signature · 1 line
1.8.3.1
PATCH v5 1/7 app/bbdev: add explicit ut for latency vs validation
Adding explicit different ut when testing for validation or latency (early termination enabled or not).
--- app/test-bbdev/test_bbdev_perf.c | 92 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 88 insertions(+), 4 deletions(-)
app/test-bbdev/test_bbdev_perf.c +88 -4
@@ -3999,12 +3999,14 @@ typedef int (test_case_function)(struct active_device *ad,return i; } +/* Test case for latency/validation for LDPC Decoder */ static int latency_test_ldpc_dec (struct rte_mempool *mempool,struct test_buffers *bufs,struct rte_bbdev_dec_op *ref_op,int vector_mask,uint16_t dev_id,uint16_t queue_id,const uint16_t num_to_process,uint16_t burst_sz, -uint64_t *total_time,uint64_t *min_time,uint64_t *max_time) +uint64_t *total_time,uint64_t *min_time,uint64_t *max_time, +bool disable_et) {int ret =TEST_SUCCESS ;uint16_t i, j, dequeued;
@@ -4026,7 +4028,7 @@ typedef int (test_case_function)(struct active_device *ad, "rte_bbdev_dec_op_alloc_bulk() failed");/* For latency tests we need to disable early termination */ -if (check_bit (ref_op->ldpc_dec.op_flags, +if (disable_et &&check_bit (ref_op->ldpc_dec.op_flags,RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE )) ref_op->ldpc_dec.op_flags -=RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE ;
@@ -4248,7 +4250,7 @@ typedef int (test_case_function)(struct active_device *ad,TEST_ASSERT_NOT_NULL (op_type_str,"Invalid op type: %u" , op_type);printf ("+ ------------------------------------------------------- +\n" ); -printf ("== test: validation/latency\ndev: %s, burst size: %u, num ops: %u, op type: %s\n" , +printf ("== test: latency\ndev: %s, burst size: %u, num ops: %u, op type: %s\n" , info.dev_name, burst_sz, num_to_process, op_type_str);if (op_type ==RTE_BBDEV_OP_TURBO_DEC )
@@ -4270,7 +4272,83 @@ typedef int (test_case_function)(struct active_device *ad, iter =latency_test_ldpc_dec (op_params->mp, bufs, op_params->ref_dec_op, op_params->vector_mask, ad->dev_id, queue_id, num_to_process, + burst_sz, &total_time, &min_time, &max_time, + true); + else + iter =latency_test_enc (op_params->mp, bufs, + op_params->ref_enc_op, + ad->dev_id, queue_id, + num_to_process, burst_sz, &total_time, + &min_time, &max_time); + +if (iter <=0 ) +return TEST_FAILED ; + +printf ("Operation latency:\n" +"\tavg: %lg cycles, %lg us\n" +"\tmin: %lg cycles, %lg us\n" +"\tmax: %lg cycles, %lg us\n" , + (double )total_time / (double )iter, + (double )(total_time *1000000 ) / (double )iter / + (double )rte_get_tsc_hz (), (double )min_time, + (double )(min_time *1000000 ) / (double )rte_get_tsc_hz (), + (double )max_time, (double )(max_time *1000000 ) / + (double )rte_get_tsc_hz ()); + +return TEST_SUCCESS ; +} + +static int +validation_test (struct active_device *ad, +struct test_op_params *op_params) +{ +int iter; +uint16_t burst_sz = op_params->burst_sz; +const uint16_t num_to_process = op_params->num_to_process; +const enum rte_bbdev_op_type op_type = test_vector.op_type; +const uint16_t queue_id = ad->queue_ids[0 ]; +struct test_buffers *bufs =NULL ; +struct rte_bbdev_info info; +uint64_t total_time, min_time, max_time; +const char *op_type_str; + + total_time = max_time =0 ; + min_time =UINT64_MAX ; + +TEST_ASSERT_SUCCESS ((burst_sz >MAX_BURST ), +"BURST_SIZE should be <= %u" ,MAX_BURST ); + +rte_bbdev_info_get (ad->dev_id, &info); + bufs = &op_params->q_bufs[GET_SOCKET (info.socket_id)][queue_id]; + + op_type_str =rte_bbdev_op_type_str (op_type); +TEST_ASSERT_NOT_NULL (op_type_str,"Invalid op type: %u" , op_type); + +printf ("+ ------------------------------------------------------- +\n" ); +printf ("== test: validation\ndev: %s, burst size: %u, num ops: %u, op type: %s\n" , + info.dev_name, burst_sz, num_to_process, op_type_str); + +if (op_type ==RTE_BBDEV_OP_TURBO_DEC ) + iter =latency_test_dec (op_params->mp, bufs, + op_params->ref_dec_op, op_params->vector_mask, + ad->dev_id, queue_id, num_to_process, burst_sz, &total_time, &min_time, &max_time); +else if (op_type ==RTE_BBDEV_OP_TURBO_ENC ) + iter =latency_test_enc (op_params->mp, bufs, + op_params->ref_enc_op, ad->dev_id, queue_id, + num_to_process, burst_sz, &total_time, + &min_time, &max_time); +else if (op_type ==RTE_BBDEV_OP_LDPC_ENC ) + iter =latency_test_ldpc_enc (op_params->mp, bufs, + op_params->ref_enc_op, ad->dev_id, queue_id, + num_to_process, burst_sz, &total_time, + &min_time, &max_time); +else if (op_type ==RTE_BBDEV_OP_LDPC_DEC ) + iter =latency_test_ldpc_dec (op_params->mp, bufs, + op_params->ref_dec_op, op_params->vector_mask, + ad->dev_id, queue_id, num_to_process, + burst_sz, &total_time, &min_time, &max_time, + false);else iter = latency_test_enc(op_params->mp, bufs, op_params->ref_enc_op,
@@ -4930,6 +5008,12 @@ typedef int (test_case_function)(struct active_device *ad, }static int +validation_tc (void ) +{ +return run_test_case (validation_test); +} + +static int interrupt_tc (void ) {return run_test_case (throughput_test);
@@ -4960,7 +5044,7 @@ typedef int (test_case_function)(struct active_device *ad, .setup = testsuite_setup, .teardown = testsuite_teardown, .unit_test_cases = { -TEST_CASE_ST (ut_setup, ut_teardown, latency_tc), +TEST_CASE_ST (ut_setup, ut_teardown, validation_tc), TEST_CASES_END() /**< NULL terminate unit test array */ } };
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v5 1/7] app/bbdev: add explicit ut for latency vs validation
Quoted 8 lines · Nicolas Chautru
Adding explicit different ut when testing for validation or latency (early termination enabled or not).
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Aidan Goddard <[email protected]>Acked-by Dave Burley <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 92 ++++++++++++++++++++++++++++++++++++++--
Should update the copyright.
Quoted 23 lines
1 file changed, 88 insertions(+), 4 deletions(-)app/test-bbdev/test_bbdev_perf.c +3
-1@@ -3999,12 +3999,14 @@ typedef int (test_case_function)(struct active_device *ad,return i; } +/* Test case for latency/validation for LDPC Decoder */ static int latency_test_ldpc_dec (struct rte_mempool *mempool,struct test_buffers *bufs,struct rte_bbdev_dec_op *ref_op,int vector_mask,uint16_t dev_id,uint16_t queue_id,const uint16_t num_to_process,uint16_t burst_sz, -uint64_t *total_time,uint64_t *min_time,uint64_t *max_time) +uint64_t *total_time,uint64_t *min_time,uint64_t *max_time, +bool disable_et) {int ret =TEST_SUCCESS ;uint16_t i, j, dequeued;
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4034
Quoted 8 lines
app/test-bbdev/test_bbdev_perf.c +1
-1@@ -4026,7 +4028,7 @@ typedef int (test_case_function)(struct active_device *ad, "rte_bbdev_dec_op_alloc_bulk() failed");/* For latency tests we need to disable early termination */ -if (check_bit (ref_op->ldpc_dec.op_flags, +if (disable_et &&check_bit (ref_op->ldpc_dec.op_flags,RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE )) ref_op->ldpc_dec.op_flags -=RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE ;
Bit clearing is usually done with &= ~()
Quoted 11 lines
app/test-bbdev/test_bbdev_perf.c +1
-1@@ -4248,7 +4250,7 @@ typedef int (test_case_function)(struct active_device *ad,TEST_ASSERT_NOT_NULL (op_type_str,"Invalid op type: %u" , op_type);printf ("+ ------------------------------------------------------- +\n" ); -printf ("== test: validation/latency\ndev: %s, burst size: %u, num ops: %u, op type: %s\n" , +printf ("== test: latency\ndev: %s, burst size: %u, num ops: %u, op type: %s\n" , info.dev_name, burst_sz, num_to_process, op_type_str);if (op_type ==RTE_BBDEV_OP_TURBO_DEC )@@ -4270,7 +4272,83 @@ typedef int (test_case_function)(struct active_device *ad, iter = latency_test_ldpc_dec(op_params->mp, bufs,
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4282
Quoted 10 lines
app/test-bbdev/test_bbdev_perf.c +8
-0op_params->ref_dec_op, op_params->vector_mask, ad->dev_id, queue_id, num_to_process, + burst_sz, &total_time, &min_time, &max_time, + true); + else + iter =latency_test_enc (op_params->mp, bufs, + op_params->ref_enc_op, + ad->dev_id, queue_id, + num_to_process, burst_sz, &total_time, + &min_time, &max_time);
This is a repeat of RTE_BBDEV_OP_TURBO_ENC.
Do not need both.
If the point is to have a else and not fail when the op_type is unknown, then
remove the earlier all and comment the else something like
else /* RTE_BBDEC_OP_TURBO_ENC */
Quoted 4 lines
app/test-bbdev/test_bbdev_perf.c +4
-0+ +if (iter <=0 ) +return TEST_FAILED ; +
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4296
Quoted 10 lines
app/test-bbdev/test_bbdev_perf.c +10
-0+printf ("Operation latency:\n" +"\tavg: %lg cycles, %lg us\n" +"\tmin: %lg cycles, %lg us\n" +"\tmax: %lg cycles, %lg us\n" , + (double )total_time / (double )iter, + (double )(total_time *1000000 ) / (double )iter / + (double )rte_get_tsc_hz (), (double )min_time, + (double )(min_time *1000000 ) / (double )rte_get_tsc_hz (), + (double )max_time, (double )(max_time *1000000 ) / + (double )rte_get_tsc_hz ());
Could remove a tab from the last 9 lines for better alignment with printf
Quoted 45 lines
app/test-bbdev/test_bbdev_perf.c +44
-0+ +return TEST_SUCCESS ; +} + +static int +validation_test (struct active_device *ad, +struct test_op_params *op_params) +{ +int iter; +uint16_t burst_sz = op_params->burst_sz; +const uint16_t num_to_process = op_params->num_to_process; +const enum rte_bbdev_op_type op_type = test_vector.op_type; +const uint16_t queue_id = ad->queue_ids[0 ]; +struct test_buffers *bufs =NULL ; +struct rte_bbdev_info info; +uint64_t total_time, min_time, max_time; +const char *op_type_str; + + total_time = max_time =0 ; + min_time =UINT64_MAX ; + +TEST_ASSERT_SUCCESS ((burst_sz >MAX_BURST ), +"BURST_SIZE should be <= %u" ,MAX_BURST ); + +rte_bbdev_info_get (ad->dev_id, &info); + bufs = &op_params->q_bufs[GET_SOCKET (info.socket_id)][queue_id]; + + op_type_str =rte_bbdev_op_type_str (op_type); +TEST_ASSERT_NOT_NULL (op_type_str,"Invalid op type: %u" , op_type); + +printf ("+ ------------------------------------------------------- +\n" ); +printf ("== test: validation\ndev: %s, burst size: %u, num ops: %u, op type: %s\n" , + info.dev_name, burst_sz, num_to_process, op_type_str); + +if (op_type ==RTE_BBDEV_OP_TURBO_DEC ) + iter =latency_test_dec (op_params->mp, bufs, + op_params->ref_dec_op, op_params->vector_mask, + ad->dev_id, queue_id, num_to_process, burst_sz, &total_time, &min_time, &max_time); +else if (op_type ==RTE_BBDEV_OP_TURBO_ENC ) + iter =latency_test_enc (op_params->mp, bufs, + op_params->ref_enc_op, ad->dev_id, queue_id, + num_to_process, burst_sz, &total_time, + &min_time, &max_time); +else if (op_type ==RTE_BBDEV_OP_LDPC_ENC )
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4351
Quoted 10 lines
app/test-bbdev/test_bbdev_perf.c +10
-0+ iter =latency_test_ldpc_enc (op_params->mp, bufs, + op_params->ref_enc_op, ad->dev_id, queue_id, + num_to_process, burst_sz, &total_time, + &min_time, &max_time); + else if (op_type == RTE_BBDEV_OP_LDPC_DEC) + iter =latency_test_ldpc_dec (op_params->mp, bufs, + op_params->ref_dec_op, op_params->vector_mask, + ad->dev_id, queue_id, num_to_process, + burst_sz, &total_time, &min_time, &max_time, + false);
This 'false' is the only change from f latency_test.
These should be refactored to a common function. Then use a #define or similar wrapper for calling with/without this flag.
Tom
Quoted 25 lines
app/test-bbdev/test_bbdev_perf.c +7
-1else iter = latency_test_enc(op_params->mp, bufs, op_params->ref_enc_op,@@ -4930,6 +5008,12 @@ typedef int (test_case_function)(struct active_device *ad, }static int +validation_tc (void ) +{ +return run_test_case (validation_test); +} + +static int interrupt_tc (void ) {return run_test_case (throughput_test);@@ -4960,7 +5044,7 @@ typedef int (test_case_function)(struct active_device *ad, .setup = testsuite_setup, .teardown = testsuite_teardown, .unit_test_cases = { -TEST_CASE_ST (ut_setup, ut_teardown, latency_tc), +TEST_CASE_ST (ut_setup, ut_teardown, validation_tc), TEST_CASES_END() /**< NULL terminate unit test array */ } };
Re: [dpdk-dev] [PATCH v5 1/7] app/bbdev: add explicit ut for latency vs validation
Quoted 57 lines
-----Original Message-----
From: Tom Rix <[email protected]>
Sent: Monday, October 26, 2020 5:56 AM
To: Chautru, Nicolas <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH v5 1/7] app/bbdev: add explicit ut for latency vs validationQuoted 9 lines · Nicolas Chautru
Adding explicit different ut when testing for validation or latency (early termination enabled or not).
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Aidan Goddard <[email protected]>Acked-by Dave Burley <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 92++++++++++++++++++++++++++++++++++++++--
Should update the copyright.
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 8 lines
1 file changed, 88 insertions(+), 4 deletions(-)app/test-bbdev/test_bbdev_perf.c +0
-0@@ -3999,12 +3999,14 @@ typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 10 lines
app/test-bbdev/test_bbdev_perf.c +1
-1return i; } +/* Test case for latency/validation for LDPC Decoder */ static int latency_test_ldpc_dec(struct rte_mempool *mempool, struct test_buffers *bufs, struct rte_bbdev_dec_op *ref_op, int vector_mask, uint16_t dev_id, uint16_t queue_id, const uint16_t num_to_process, uint16_t burst_sz, - uint64_t *total_time, uint64_t *min_time, uint64_t
*max_time)app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4008
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ uint64_t *total_time, uint64_t *min_time, uint64_t
*max_time,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 5 lines
app/test-bbdev/test_bbdev_perf.c +1
-0+ bool disable_et) {int ret =TEST_SUCCESS ;uint16_t i, j, dequeued;@@ -4026,7 +4028,7 @@ typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 6 lines
app/test-bbdev/test_bbdev_perf.c +1
-1"rte_bbdev_dec_op_alloc_bulk() failed");/* For latency tests we need to disable early termination */ - if (check_bit(ref_op->ldpc_dec.op_flags, + if (disable_et && check_bit(ref_op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE))
Quoted 4 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4034
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0
-0ref_op->ldpc_dec.op_flags -=RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE;Bit clearing is usually done with &= ~()
This is the coding style for rest of the file hence sticking to it.
Quoted 29 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-0@@ -4248,7 +4250,7 @@ typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4250
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-0TEST_ASSERT_NOT_NULL(op_type_str, "Invalid op type: %u",
op_type);app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4250
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +0
-1printf ("+ ------------------------------------------------------- +\n" ); - printf("== test: validation/latency\ndev: %s, burst size: %u, num ops:%u, op type: %s\n",
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4254
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +2
-0+ printf("== test: latency\ndev: %s, burst size: %u, num ops: %u, op +type: %s\n", info.dev_name, burst_sz, num_to_process,
op_type_str);app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4255
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0
-0if (op_type == RTE_BBDEV_OP_TURBO_DEC) @@ -4270,7 +4272,83@@
app/test-bbdev/test_bbdev_perf.c
Quoted 6 lines
app/test-bbdev/test_bbdev_perf.c +0
-0typedef int (test_case_function)(struct active_device *ad, iter = latency_test_ldpc_dec(op_params->mp, bufs, op_params->ref_dec_op, op_params-
vector_mask,app/test-bbdev/test_bbdev_perf.c +1
-0ad->dev_id, queue_id, num_to_process, + burst_sz, &total_time, &min_time,
&max_time,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 6 lines
app/test-bbdev/test_bbdev_perf.c +6
-0+ true); + else + iter = latency_test_enc(op_params->mp, bufs, + op_params->ref_enc_op, + ad->dev_id, queue_id, + num_to_process, burst_sz,
&total_time,
Quoted 5 lines
app/test-bbdev/test_bbdev_perf.c
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ &min_time, &max_time);This is a repeat of
RTE_BBDEV_OP_TURBO_ENC.Do not need both.
Fair enough. That is part of previous code but can simplify.
Quoted 20 lines
If the point is to have a else and not fail when the
op_typeis unknown, thenremove the earlier all and comment the else something like
else /*
RTE_BBDEC_OP_TURBO_ENC*/app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 12 lines
app/test-bbdev/test_bbdev_perf.c +12
-0+ +if (iter <=0 ) +return TEST_FAILED ; + + printf("Operation latency:\n" + "\tavg: %lg cycles, %lg us\n" + "\tmin: %lg cycles, %lg us\n" + "\tmax: %lg cycles, %lg us\n", + (double)total_time / (double)iter, + (double)(total_time * 1000000) / (double)iter / + (double)rte_get_tsc_hz(), (double)min_time, + (double)(min_time * 1000000) /(double)rte_get_tsc_hz(),
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4296
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +2
-0+ (double )max_time, (double )(max_time *1000000 ) / + (double)rte_get_tsc_hz());Could remove a tab from the last 9 lines for better alignment with printf
I am unsure I follow. The recommended spacing is 2 tabs for continuation and unsure how the alignment would be better. I typically only reduce to 1 tab only if I have to (80 chars limit becoming cumbersome with nested statements).
Quoted 64 lines
Quoted 27 lines
app/test-bbdev/test_bbdev_perf.c +26
-0+ +return TEST_SUCCESS ; +} + +static int +validation_test (struct active_device *ad, +struct test_op_params *op_params) +{ +int iter; +uint16_t burst_sz = op_params->burst_sz; +const uint16_t num_to_process = op_params->num_to_process; +const enum rte_bbdev_op_type op_type = test_vector.op_type; +const uint16_t queue_id = ad->queue_ids[0 ]; +struct test_buffers *bufs =NULL ; +struct rte_bbdev_info info; +uint64_t total_time, min_time, max_time; +const char *op_type_str; + + total_time = max_time =0 ; + min_time =UINT64_MAX ; + +TEST_ASSERT_SUCCESS ((burst_sz >MAX_BURST ), +"BURST_SIZE should be <= %u" ,MAX_BURST ); + +rte_bbdev_info_get (ad->dev_id, &info); + bufs = &op_params-q_bufs[GET_SOCKET(info.socket_id)][queue_id];
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +3
-0+ + op_type_str =rte_bbdev_op_type_str (op_type); + TEST_ASSERT_NOT_NULL(op_type_str, "Invalid op type: %u",
op_type);app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +3
-0+ +printf ("+ ------------------------------------------------------- +\n" ); + printf("== test: validation\ndev: %s, burst size: %u, num ops: %u, optype: %s\n",
app/test-bbdev/test_bbdev_perf.c
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ info.dev_name, burst_sz, num_to_process,
op_type_str);app/test-bbdev/test_bbdev_perf.c
Quoted 7 lines
app/test-bbdev/test_bbdev_perf.c +4
-0+ +if (op_type ==RTE_BBDEV_OP_TURBO_DEC ) + iter = latency_test_dec(op_params->mp, bufs, + op_params->ref_dec_op, op_params-
vector_mask,app/test-bbdev/test_bbdev_perf.c +1
-0+ ad->dev_id, queue_id, num_to_process, burst_sz, &total_time, &min_time,
&max_time);app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +3
-0+else if (op_type ==RTE_BBDEV_OP_TURBO_ENC ) + iter = latency_test_enc(op_params->mp, bufs, + op_params->ref_enc_op, ad->dev_id,
queue_id,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 5 lines
app/test-bbdev/test_bbdev_perf.c +5
-0+ num_to_process, burst_sz, &total_time, + &min_time, &max_time); + else if (op_type == RTE_BBDEV_OP_LDPC_ENC) + iter = latency_test_ldpc_enc(op_params->mp, bufs, + op_params->ref_enc_op, ad->dev_id,
queue_id,app/test-bbdev/test_bbdev_perf.c
Quoted 8 lines
app/test-bbdev/test_bbdev_perf.c +5
-0+ num_to_process, burst_sz, &total_time, + &min_time, &max_time); + else if (op_type == RTE_BBDEV_OP_LDPC_DEC) + iter = latency_test_ldpc_dec(op_params->mp, bufs, + op_params->ref_dec_op, op_params-
vector_mask,app/test-bbdev/test_bbdev_perf.c +2
-0+ ad->dev_id, queue_id, num_to_process, + burst_sz, &total_time, &min_time,
&max_time,
Quoted 6 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4351
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ false);This 'false' is the only change from f
latency_test.These should be refactored to a common function. Then use a #define or similar wrapper for calling with/without this flag.
Fair enough. Thanks. I will push an update later today.
Quoted 28 lines
Tom
Quoted 5 lines
app/test-bbdev/test_bbdev_perf.c +0
-0else iter = latency_test_enc(op_params->mp, bufs, op_params->ref_enc_op,@@ -4930,6 +5008,12 @@ typedef int (test_case_function)(struct active_device *ad, }app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 5018
Quoted 10 lines
app/test-bbdev/test_bbdev_perf.c +5
-0static int +validation_tc (void ) +{ +return run_test_case (validation_test); } + +static int interrupt_tc (void ) { return run_test_case(throughput_test); @@ -4960,7 +5044,7 @@typedef
Quoted 9 lines
int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c +1
-1.setup = testsuite_setup, .teardown = testsuite_teardown, .unit_test_cases = { -TEST_CASE_ST (ut_setup, ut_teardown, latency_tc), +TEST_CASE_ST (ut_setup, ut_teardown, validation_tc), TEST_CASES_END() /**< NULL terminate unit test array */ } };
Re: [dpdk-dev] [PATCH v5 1/7] app/bbdev: add explicit ut for latency vs validation
Quoted 114 lines · Nicolas
Quoted 56 lines
-----Original Message-----
From: Tom Rix <[email protected]>
Sent: Monday, October 26, 2020 5:56 AM
To: Chautru, Nicolas <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH v5 1/7] app/bbdev: add explicit ut for latency vs validationQuoted 9 lines · Nicolas Chautru
Adding explicit different ut when testing for validation or latency (early termination enabled or not).
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Aidan Goddard <[email protected]>Acked-by Dave Burley <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 92++++++++++++++++++++++++++++++++++++++--
Should update the copyright.
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 8 lines
1 file changed, 88 insertions(+), 4 deletions(-)app/test-bbdev/test_bbdev_perf.c +0
-0@@ -3999,12 +3999,14 @@ typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 10 lines
app/test-bbdev/test_bbdev_perf.c +1
-1return i; } +/* Test case for latency/validation for LDPC Decoder */ static int latency_test_ldpc_dec(struct rte_mempool *mempool, struct test_buffers *bufs, struct rte_bbdev_dec_op *ref_op, int vector_mask, uint16_t dev_id, uint16_t queue_id, const uint16_t num_to_process, uint16_t burst_sz, - uint64_t *total_time, uint64_t *min_time, uint64_t
*max_time)app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4008
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ uint64_t *total_time, uint64_t *min_time, uint64_t
*max_time,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 5 lines
app/test-bbdev/test_bbdev_perf.c +1
-0+ bool disable_et) {int ret =TEST_SUCCESS ;uint16_t i, j, dequeued;@@ -4026,7 +4028,7 @@ typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 6 lines
app/test-bbdev/test_bbdev_perf.c +1
-1"rte_bbdev_dec_op_alloc_bulk() failed");/* For latency tests we need to disable early termination */ - if (check_bit(ref_op->ldpc_dec.op_flags, + if (disable_et && check_bit(ref_op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE))Quoted 4 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4034
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0
-0ref_op->ldpc_dec.op_flags -=RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE;Bit clearing is usually done with &= ~()
This is the coding style for rest of the file hence sticking to it.
Quoted 27 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-0@@ -4248,7 +4250,7 @@ typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4250
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-0TEST_ASSERT_NOT_NULL(op_type_str, "Invalid op type: %u",
op_type);app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4250
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0
-1printf ("+ ------------------------------------------------------- +\n" ); - printf("== test: validation/latency\ndev: %s, burst size: %u, num ops:%u, op type: %s\n",
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4254
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +2
-0+ printf("== test: latency\ndev: %s, burst size: %u, num ops: %u, op +type: %s\n", info.dev_name, burst_sz, num_to_process,
op_type_str);app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4255
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-0if (op_type == RTE_BBDEV_OP_TURBO_DEC) @@ -4270,7 +4272,83@@
app/test-bbdev/test_bbdev_perf.c
Quoted 6 lines
app/test-bbdev/test_bbdev_perf.c +0
-0typedef int (test_case_function)(struct active_device *ad, iter = latency_test_ldpc_dec(op_params->mp, bufs, op_params->ref_dec_op, op_params-
vector_mask,app/test-bbdev/test_bbdev_perf.c +1
-0ad->dev_id, queue_id, num_to_process, + burst_sz, &total_time, &min_time,
&max_time,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 6 lines
app/test-bbdev/test_bbdev_perf.c +6
-0+ true); + else + iter = latency_test_enc(op_params->mp, bufs, + op_params->ref_enc_op, + ad->dev_id, queue_id, + num_to_process, burst_sz,
&total_time,Quoted 4 lines
app/test-bbdev/test_bbdev_perf.c
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ &min_time, &max_time);This is a repeat of
RTE_BBDEV_OP_TURBO_ENC.Do not need both.
Fair enough. That is part of previous code but can simplify.
Quoted 19 lines
If the point is to have a else and not fail when the
op_typeis unknown, thenremove the earlier all and comment the else something like
else /*
RTE_BBDEC_OP_TURBO_ENC*/app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 12 lines
app/test-bbdev/test_bbdev_perf.c +12
-0+ +if (iter <=0 ) +return TEST_FAILED ; + + printf("Operation latency:\n" + "\tavg: %lg cycles, %lg us\n" + "\tmin: %lg cycles, %lg us\n" + "\tmax: %lg cycles, %lg us\n", + (double)total_time / (double)iter, + (double)(total_time * 1000000) / (double)iter / + (double)rte_get_tsc_hz(), (double)min_time, + (double)(min_time * 1000000) /(double)rte_get_tsc_hz(),
Quoted 5 lines
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4296
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +2
-0+ (double )max_time, (double )(max_time *1000000 ) / + (double)rte_get_tsc_hz());Could remove a tab from the last 9 lines for better alignment with printf
I am unsure I follow. The recommended spacing is 2 tabs for continuation and unsure how the alignment would be better. I typically only reduce to 1 tab only if I have to (80 chars limit becoming cumbersome with nested statements).
This is just an observation i don't want to get into the weeds with whitespace issues.
Quoted 65 lines
Quoted 65 lines
Quoted 28 lines
app/test-bbdev/test_bbdev_perf.c +26
-0+ +return TEST_SUCCESS ; +} + +static int +validation_test (struct active_device *ad, +struct test_op_params *op_params) +{ +int iter; +uint16_t burst_sz = op_params->burst_sz; +const uint16_t num_to_process = op_params->num_to_process; +const enum rte_bbdev_op_type op_type = test_vector.op_type; +const uint16_t queue_id = ad->queue_ids[0 ]; +struct test_buffers *bufs =NULL ; +struct rte_bbdev_info info; +uint64_t total_time, min_time, max_time; +const char *op_type_str; + + total_time = max_time =0 ; + min_time =UINT64_MAX ; + +TEST_ASSERT_SUCCESS ((burst_sz >MAX_BURST ), +"BURST_SIZE should be <= %u" ,MAX_BURST ); + +rte_bbdev_info_get (ad->dev_id, &info); + bufs = &op_params-q_bufs[GET_SOCKET(info.socket_id)][queue_id];
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +3
-0+ + op_type_str =rte_bbdev_op_type_str (op_type); + TEST_ASSERT_NOT_NULL(op_type_str, "Invalid op type: %u",
op_type);app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +3
-0+ +printf ("+ ------------------------------------------------------- +\n" ); + printf("== test: validation\ndev: %s, burst size: %u, num ops: %u, optype: %s\n",
app/test-bbdev/test_bbdev_perf.c
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ info.dev_name, burst_sz, num_to_process,
op_type_str);app/test-bbdev/test_bbdev_perf.c
Quoted 7 lines
app/test-bbdev/test_bbdev_perf.c +4
-0+ +if (op_type ==RTE_BBDEV_OP_TURBO_DEC ) + iter = latency_test_dec(op_params->mp, bufs, + op_params->ref_dec_op, op_params-
vector_mask,app/test-bbdev/test_bbdev_perf.c +1
-0+ ad->dev_id, queue_id, num_to_process, burst_sz, &total_time, &min_time,
&max_time);app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +3
-0+else if (op_type ==RTE_BBDEV_OP_TURBO_ENC ) + iter = latency_test_enc(op_params->mp, bufs, + op_params->ref_enc_op, ad->dev_id,
queue_id,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 5 lines
app/test-bbdev/test_bbdev_perf.c +5
-0+ num_to_process, burst_sz, &total_time, + &min_time, &max_time); + else if (op_type == RTE_BBDEV_OP_LDPC_ENC) + iter = latency_test_ldpc_enc(op_params->mp, bufs, + op_params->ref_enc_op, ad->dev_id,
queue_id,app/test-bbdev/test_bbdev_perf.c
Quoted 8 lines
app/test-bbdev/test_bbdev_perf.c +5
-0+ num_to_process, burst_sz, &total_time, + &min_time, &max_time); + else if (op_type == RTE_BBDEV_OP_LDPC_DEC) + iter = latency_test_ldpc_dec(op_params->mp, bufs, + op_params->ref_dec_op, op_params-
vector_mask,app/test-bbdev/test_bbdev_perf.c +2
-0+ ad->dev_id, queue_id, num_to_process, + burst_sz, &total_time, &min_time,
&max_time,
Quoted 6 lines
Quoted 5 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4351
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ false);This 'false' is the only change from f
latency_test.These should be refactored to a common function. Then use a #define or similar wrapper for calling with/without this flag.
Fair enough. Thanks. I will push an update later today.
Thanks. This was the only serious thing in the patchset.
Tom
Quoted 28 lines
Quoted 28 lines
Tom
Quoted 5 lines
app/test-bbdev/test_bbdev_perf.c +0
-0else iter = latency_test_enc(op_params->mp, bufs, op_params->ref_enc_op,@@ -4930,6 +5008,12 @@ typedef int (test_case_function)(struct active_device *ad, }app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 5018
Quoted 10 lines
app/test-bbdev/test_bbdev_perf.c +5
-0static int +validation_tc (void ) +{ +return run_test_case (validation_test); } + +static int interrupt_tc (void ) { return run_test_case(throughput_test); @@ -4960,7 +5044,7 @@typedef
Quoted 9 lines
int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c +1
-1.setup = testsuite_setup, .teardown = testsuite_teardown, .unit_test_cases = { -TEST_CASE_ST (ut_setup, ut_teardown, latency_tc), +TEST_CASE_ST (ut_setup, ut_teardown, validation_tc), TEST_CASES_END() /**< NULL terminate unit test array */ } };
PATCH v5 2/7 app/bbdev: add explicit check for counters
In reply to Nicolas ChautruAdding explicit check in ut that the stats counters have the expect values. Was missing for coverage.
--- app/test-bbdev/test_bbdev_perf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
app/test-bbdev/test_bbdev_perf.c +17 -0
@@ -4840,6 +4840,23 @@ typedef int (test_case_function)(struct active_device *ad, (double )(time_st.deq_max_time *1000000 ) / rte_get_tsc_hz()); +struct rte_bbdev_stats stats = {0 }; +get_bbdev_queue_stats (ad->dev_id, queue_id, &stats); +if (op_type !=RTE_BBDEV_OP_LDPC_DEC ) { +TEST_ASSERT_SUCCESS (stats.enqueued_count != num_to_process, +"Mismatch in enqueue count %10" PRIu64" %d" , + stats.enqueued_count, num_to_process); +TEST_ASSERT_SUCCESS (stats.dequeued_count != num_to_process, +"Mismatch in dequeue count %10" PRIu64" %d" , + stats.dequeued_count, num_to_process); + } +TEST_ASSERT_SUCCESS (stats.enqueue_err_count !=0 , +"Enqueue count Error %10" PRIu64"" , + stats.enqueue_err_count); +TEST_ASSERT_SUCCESS (stats.dequeue_err_count !=0 , +"Dequeue count Error (%10" PRIu64"" , + stats.dequeue_err_count); +return TEST_SUCCESS ;#endif }
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v5 2/7] app/bbdev: add explicit check for counters
Quoted 2 lines · Nicolas Chautru
Adding explicit check in ut that the stats counters have the expect values. Was missing for coverage.
missing from coverage
?
Quoted 13 lines
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Aidan Goddard <[email protected]>Acked-by Dave Burley <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)app/test-bbdev/test_bbdev_perf.c +0
-0
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4843
Quoted 4 lines
app/test-bbdev/test_bbdev_perf.c +1
-0@@ -4840,6 +4840,23 @@ typedef int (test_case_function)(struct active_device *ad, (double )(time_st.deq_max_time *1000000 ) / rte_get_tsc_hz()); +struct rte_bbdev_stats stats = {0 };
Other calls to get_bbdev_queue_stats do not initialize stats and likely should
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4844
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+get_bbdev_queue_stats (ad->dev_id, queue_id, &stats);
Should check the return here.
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4845
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+if (op_type !=RTE_BBDEV_OP_LDPC_DEC ) {
This logic seems off.
Do you mean to check only enc stats with an enc op ?
Similar for dec.
Quoted 17 lines
app/test-bbdev/test_bbdev_perf.c +14
-0+TEST_ASSERT_SUCCESS (stats.enqueued_count != num_to_process, +"Mismatch in enqueue count %10" PRIu64" %d" , + stats.enqueued_count, num_to_process); +TEST_ASSERT_SUCCESS (stats.dequeued_count != num_to_process, +"Mismatch in dequeue count %10" PRIu64" %d" , + stats.dequeued_count, num_to_process); + } +TEST_ASSERT_SUCCESS (stats.enqueue_err_count !=0 , +"Enqueue count Error %10" PRIu64"" , + stats.enqueue_err_count); +TEST_ASSERT_SUCCESS (stats.dequeue_err_count !=0 , +"Dequeue count Error (%10" PRIu64"" , + stats.dequeue_err_count); +return TEST_SUCCESS ;#endif }
Re: [dpdk-dev] [PATCH v5 2/7] app/bbdev: add explicit check for counters
Quoted 10 lines
-----Original Message-----
From: Tom Rix <[email protected]>
Sent: Monday, October 26, 2020 6:06 AM
To: Chautru, Nicolas <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH v5 2/7] app/bbdev: add explicit check for counters
Quoted 7 lines
Quoted 2 lines · Nicolas Chautru
Adding explicit check in ut that the stats counters have the expect values. Was missing for coverage.
missing from coverage
?
This was causing code coverage gap.
Quoted 23 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 15 lines
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Aidan Goddard <[email protected]>Acked-by Dave Burley <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)app/test-bbdev/test_bbdev_perf.c +0
-0@@ -4840,6 +4840,23 @@ typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4843
Quoted 4 lines
app/test-bbdev/test_bbdev_perf.c +1
-0(double )(time_st.deq_max_time *1000000 ) / rte_get_tsc_hz()); +struct rte_bbdev_stats stats = {0 };Other calls to
get_bbdev_queue_statsdo not initialize stats and likely shouldapp/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4844
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+get_bbdev_queue_stats (ad->dev_id, queue_id, &stats);Should check the return here.
Quoted 7 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4845
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+if (op_type !=RTE_BBDEV_OP_LDPC_DEC ) {This logic seems off.
Do you mean to check only enc stats with an enc op ?
Similar for dec.
No that is intentional. That check would not be relavent for the LDPC_DEC tests as this may run more operations for the sake of HARQ preloading/retrieve.
Quoted 22 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4846
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +1
-0+ TEST_ASSERT_SUCCESS(stats.enqueued_count !=
num_to_process,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4847
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ "Mismatch in enqueue count %10"PRIu64"%d",
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4849
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +2
-0+ stats.enqueued_count, num_to_process); + TEST_ASSERT_SUCCESS(stats.dequeued_count !=
num_to_process,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4850
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ "Mismatch in dequeue count %10"PRIu64"%d",
Quoted 12 lines
app/test-bbdev/test_bbdev_perf.c +9
-0+ stats.dequeued_count, num_to_process); + } +TEST_ASSERT_SUCCESS (stats.enqueue_err_count !=0 , +"Enqueue count Error %10" PRIu64"" , + stats.enqueue_err_count); +TEST_ASSERT_SUCCESS (stats.dequeue_err_count !=0 , +"Dequeue count Error (%10" PRIu64"" , + stats.dequeue_err_count); +return TEST_SUCCESS ;#endif }
Re: [dpdk-dev] [PATCH v5 2/7] app/bbdev: add explicit check for counters
Quoted 9 lines · Nicolas
Quoted 9 lines
-----Original Message-----
From: Tom Rix <[email protected]>
Sent: Monday, October 26, 2020 6:06 AM
To: Chautru, Nicolas <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH v5 2/7] app/bbdev: add explicit check for counters
Quoted 7 lines
Quoted 6 lines · Nicolas Chautru
Quoted 2 lines
Adding explicit check in ut that the stats counters have the expect values. Was missing for coverage.
missing from coverage
?
This was causing code coverage gap.
Add 'code ' to make the context better.
Quoted 22 lines
Quoted 22 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 14 lines
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Aidan Goddard <[email protected]>Acked-by Dave Burley <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)app/test-bbdev/test_bbdev_perf.c +0
-0@@ -4840,6 +4840,23 @@ typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4843
Quoted 4 lines
app/test-bbdev/test_bbdev_perf.c +1
-0(double )(time_st.deq_max_time *1000000 ) / rte_get_tsc_hz()); +struct rte_bbdev_stats stats = {0 };Other calls to
get_bbdev_queue_statsdo not initialize stats and likely shouldapp/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4844
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+get_bbdev_queue_stats (ad->dev_id, queue_id, &stats);Should check the return here.
Quoted 7 lines
Quoted 6 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4845
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+if (op_type !=RTE_BBDEV_OP_LDPC_DEC ) {This logic seems off.
Do you mean to check only enc stats with an enc op ?
Similar for dec.
No that is intentional. That check would not be relavent for the
LDPC_DECtests as this may run more operations for the sake of HARQ preloading/retrieve.
ok
Quoted 22 lines
Quoted 22 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4846
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +1
-0+ TEST_ASSERT_SUCCESS(stats.enqueued_count !=
num_to_process,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4847
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ "Mismatch in enqueue count %10"PRIu64"%d",
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4849
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +2
-0+ stats.enqueued_count, num_to_process); + TEST_ASSERT_SUCCESS(stats.dequeued_count !=
num_to_process,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4850
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ "Mismatch in dequeue count %10"PRIu64"%d",
Quoted 12 lines
app/test-bbdev/test_bbdev_perf.c +9
-0+ stats.dequeued_count, num_to_process); + } +TEST_ASSERT_SUCCESS (stats.enqueue_err_count !=0 , +"Enqueue count Error %10" PRIu64"" , + stats.enqueue_err_count); +TEST_ASSERT_SUCCESS (stats.dequeue_err_count !=0 , +"Dequeue count Error (%10" PRIu64"" , + stats.dequeue_err_count); +return TEST_SUCCESS ;#endif }
PATCH v5 3/7 app/bbdev: include explicit HARQ preloading
In reply to Nicolas ChautruRun preloading explicitly for unit tests. Load each code block by reusing existing input op then restore for the actual test.
--- app/test-bbdev/main.h | 1 + app/test-bbdev/test_bbdev_perf.c | 51 +++++++++++++++++++++------------------- 2 files changed, 28 insertions(+), 24 deletions(-)
app/test-bbdev/main.h +1 -0
@@ -17,6 +17,7 @@#define TEST_SKIPPED 1#define MAX_BURST 512U +#define MAX_OPS 1024U#define DEFAULT_BURST 32U#define DEFAULT_OPS 64U#define DEFAULT_ITER 6U
app/test-bbdev/test_bbdev_perf.c +27 -24
85 lines not on this page · raw message
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v5 3/7] app/bbdev: include explicit HARQ preloading
Quoted 15 lines · Nicolas Chautru
Run preloading explicitly for unit tests. Load each code block by reusing existing input op then restore for the actual test.
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Liu Tianjiao <[email protected]>--- app/test-bbdev/main.h | 1 + app/test-bbdev/test_bbdev_perf.c | 51 +++++++++++++++++++++------------------- 2 files changed, 28 insertions(+), 24 deletions(-)app/test-bbdev/main.h +0
-0
app/test-bbdev/main.h line 20
Quoted 4 lines
app/test-bbdev/main.h +1
-0@@ -17,6 +17,7 @@#define TEST_SKIPPED 1#define MAX_BURST 512U +#define MAX_OPS 1024U
This #define is not consistently used.
ex/ see retrieve_harq_ddr, the old 1024 is still being used.
Quoted 26 lines
app/test-bbdev/main.h +0
-0#define DEFAULT_BURST 32U#define DEFAULT_OPS 64U#define DEFAULT_ITER 6Uapp/test-bbdev/test_bbdev_perf.c +4
-5@@ -2513,20 +2513,20 @@ typedef int (test_case_function)(struct active_device *ad, bool preload) {uint16_t j; -int ret; -uint32_t harq_offset = (uint32_t ) queue_id *HARQ_INCR *1024 ; -struct rte_bbdev_op_data save_hc_in, save_hc_out; -struct rte_bbdev_dec_op *ops_deq[MAX_BURST ]; +int deq; +uint32_t harq_offset = (uint32_t ) queue_id *HARQ_INCR *MAX_OPS ; +struct rte_bbdev_op_data save_hc_in[MAX_OPS ], save_hc_out[MAX_OPS ]; +struct rte_bbdev_dec_op *ops_deq[MAX_OPS ];uint32_t flags = ops[0 ]->ldpc_dec.op_flags;bool mem_in = flags &RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE ;bool hc_in = flags &RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE ;bool mem_out = flags &RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE ;bool hc_out = flags &RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE ;bool h_comp = flags &RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION ; -for (j =0 ; j < n; ++j) {
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 2532
Quoted 10 lines
app/test-bbdev/test_bbdev_perf.c +4
-3-if ((mem_in || hc_in) && preload) { - save_hc_in = ops[j]->ldpc_dec.harq_combined_input; - save_hc_out = ops[j]->ldpc_dec.harq_combined_output; +if ((mem_in || hc_in) && preload) { +for (j =0 ; j < n; ++j) { + save_hc_in[j] = ops[j]->ldpc_dec.harq_combined_input; + save_hc_out[j] = ops[j]->ldpc_dec.harq_combined_output; ops[j]->ldpc_dec.op_flags =RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_LOOPBACK +RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE ;
flags are usually handled with bit operators, not arithmetic.
this seems to be a general issue.
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 2541
Quoted 13 lines
app/test-bbdev/test_bbdev_perf.c +3
-6@@ -2536,16 +2536,23 @@ typedef int (test_case_function)(struct active_device *ad, ops[j]->ldpc_dec.harq_combined_output.offset = harq_offset; ops[j]->ldpc_dec.harq_combined_input.offset =0 ; -rte_bbdev_enqueue_ldpc_dec_ops (dev_id, queue_id, - &ops[j],1 ); - ret =0 ; -while (ret ==0 ) - ret =rte_bbdev_dequeue_ldpc_dec_ops ( - dev_id, queue_id, &ops_deq[j],1 ); + harq_offset +=HARQ_INCR ; + } +rte_bbdev_enqueue_ldpc_dec_ops (dev_id, queue_id, &ops[0 ], n);
Add check the return is 'n'
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 2546
Quoted 5 lines
app/test-bbdev/test_bbdev_perf.c +5
-0+ deq =0 ; +while (deq != n) + deq +=rte_bbdev_dequeue_ldpc_dec_ops ( + dev_id, queue_id, &ops_deq[deq], + n - deq);
Add check the return >= 0
Tom
Quoted 42 lines
app/test-bbdev/test_bbdev_perf.c +11
-10+/* Restore the operations */ +for (j =0 ; j < n; ++j) { ops[j]->ldpc_dec.op_flags = flags; - ops[j]->ldpc_dec.harq_combined_input = save_hc_in; - ops[j]->ldpc_dec.harq_combined_output = save_hc_out; + ops[j]->ldpc_dec.harq_combined_input = save_hc_in[j]; + ops[j]->ldpc_dec.harq_combined_output = save_hc_out[j]; } + } + harq_offset = (uint32_t ) queue_id *HARQ_INCR *MAX_OPS ; +for (j =0 ; j < n; ++j) {/* Adjust HARQ offset when we reach external DDR */ if (mem_in || hc_in) ops[j]->ldpc_dec.harq_combined_input.offset@@ -3231,11 +3238,9 @@ typedef int (test_case_function)(struct active_device *ad,mbuf_reset ( ops_enq[j]->ldpc_dec.harq_combined_output.data); } -if (extDdr) { -bool preload = i == (TEST_REPETITIONS -1 ); +if (extDdr)preload_harq_ddr (tp->dev_id, queue_id, ops_enq, - num_ops, preload); - } + num_ops, true); start_time =rte_rdtsc_precise ();for (enq =0 , deq =0 ; enq < num_ops;) {@@ -3362,11 +3367,9 @@ typedef int (test_case_function)(struct active_device *ad,mbuf_reset ( ops_enq[j]->ldpc_dec.harq_combined_output.data); } -if (extDdr) { -bool preload = i == (TEST_REPETITIONS -1 ); +if (extDdr)preload_harq_ddr (tp->dev_id, queue_id, ops_enq, - num_ops, preload); - } + num_ops, true); start_time =rte_rdtsc_precise ();for (enq =0 , deq =0 ; enq < num_ops;) {
Re: [dpdk-dev] [PATCH v5 3/7] app/bbdev: include explicit HARQ preloading
Quoted 29 lines
-----Original Message-----
From: Tom Rix <[email protected]>
Sent: Monday, October 26, 2020 6:32 AM
To: Chautru, Nicolas <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH v5 3/7] app/bbdev: include explicit HARQ preloadingQuoted 18 lines · Nicolas Chautru
Run preloading explicitly for unit tests. Load each code block by reusing existing input op then restore for the actual test.
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Liu Tianjiao <[email protected]>--- app/test-bbdev/main.h | 1 + app/test-bbdev/test_bbdev_perf.c | 51 +++++++++++++++++++++------------------- 2 files changed, 28 insertions(+), 24 deletions(-)app/test-bbdev/main.h index renamed from app/test-bbdev/main.h +0
-0fb3dec8..dc10a50 100644
app/test-bbdev/main.h +0
-0@@ -17,6 +17,7 @@#define TEST_SKIPPED 1
Quoted 6 lines
app/test-bbdev/main.h line 20
Quoted 2 lines
app/test-bbdev/main.h +1
-0#define MAX_BURST 512U +#define MAX_OPS 1024UThis #define is not consistently used.
ex/ see
retrieve_harq_ddr, the old 1024 is still being used.
Thanks I missed it. I will change this now.
Quoted 50 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 10 lines
app/test-bbdev/main.h +0
-0#define DEFAULT_BURST 32U#define DEFAULT_OPS 64U#define DEFAULT_ITER 6Uapp/test-bbdev/test_bbdev_perf.c +0
-0@@ -2513,20 +2513,20 @@ typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 9 lines
app/test-bbdev/test_bbdev_perf.c +2
-4bool preload) {uint16_t j; -int ret; -uint32_t harq_offset = (uint32_t ) queue_id *HARQ_INCR *1024 ; -struct rte_bbdev_op_data save_hc_in, save_hc_out; -struct rte_bbdev_dec_op *ops_deq[MAX_BURST ]; +int deq; + uint32_t harq_offset = (uint32_t) queue_id * HARQ_INCR *
MAX_OPS;app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 2518
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ struct rte_bbdev_op_data save_hc_in[MAX_OPS],save_hc_out[MAX_OPS];
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +1
-0+struct rte_bbdev_dec_op *ops_deq[MAX_OPS ];uint32_t flags = ops[0 ]->ldpc_dec.op_flags; bool mem_in = flags &
RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE;app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 2523
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0
-0bool hc_in = flags &RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE ; bool mem_out = flags &
RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE;app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 2524
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-0bool hc_out = flags &
RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE;app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 2525
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-0bool h_comp = flags &
RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION;Quoted 11 lines
app/test-bbdev/test_bbdev_perf.c +4
-4-for (j =0 ; j < n; ++j) { -if ((mem_in || hc_in) && preload) { - save_hc_in = ops[j]- ldpc_dec.harq_combined_input; - save_hc_out = ops[j]- ldpc_dec.harq_combined_output; +if ((mem_in || hc_in) && preload) { +for (j =0 ; j < n; ++j) { + save_hc_in[j] = ops[j]- ldpc_dec.harq_combined_input; + save_hc_out[j] = ops[j]-Quoted 3 lines
ldpc_dec.harq_combined_output;
ops[j]->ldpc_dec.op_flags =
RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_LOOPBACK+Quoted 1 line
Quoted 5 lines
RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE;flags are usually handled with bit operators, not arithmetic.
this seems to be a general issue.
This is keeping same coding style as rest of file. So keeping as is.
Quoted 17 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0
-0@@ -2536,16 +2536,23 @@ typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 12 lines
app/test-bbdev/test_bbdev_perf.c +3
-6ops[j]->ldpc_dec.harq_combined_output.offset = harq_offset; ops[j]->ldpc_dec.harq_combined_input.offset =0 ; -rte_bbdev_enqueue_ldpc_dec_ops (dev_id, queue_id, - &ops[j],1 ); - ret =0 ; -while (ret ==0 ) - ret =rte_bbdev_dequeue_ldpc_dec_ops ( - dev_id, queue_id, &ops_deq[j],1 ); + harq_offset +=HARQ_INCR ; + } + rte_bbdev_enqueue_ldpc_dec_ops(dev_id, queue_id,&ops[0], n);
Add check the return is 'n'
Quoted 7 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 2546
Quoted 5 lines
app/test-bbdev/test_bbdev_perf.c +5
-0+ deq =0 ; +while (deq != n) + deq +=rte_bbdev_dequeue_ldpc_dec_ops ( + dev_id, queue_id, &ops_deq[deq], + n - deq);Add check the return >= 0
This cannot be <0. uint16_t
Quoted 53 lines
Tom
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 4 lines
app/test-bbdev/test_bbdev_perf.c +2
-1+/* Restore the operations */ +for (j =0 ; j < n; ++j) { ops[j]->ldpc_dec.op_flags = flags; - ops[j]->ldpc_dec.harq_combined_input =
save_hc_in;app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 2547
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-1- ops[j]->ldpc_dec.harq_combined_output =
save_hc_out;app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 2550
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ ops[j]->ldpc_dec.harq_combined_input =save_hc_in[j];
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 2551
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ ops[j]->ldpc_dec.harq_combined_output =save_hc_out[j];
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 8 lines
app/test-bbdev/test_bbdev_perf.c +3
-0} + } + harq_offset = (uint32_t ) queue_id *HARQ_INCR *MAX_OPS ; +for (j =0 ; j < n; ++j) {/* Adjust HARQ offset when we reach external DDR */ if (mem_in || hc_in) ops[j]->ldpc_dec.harq_combined_input.offset@@ -3231,11 +3238,9 @@ typedef int (test_case_function)(struct
active_device*ad,Quoted 13 lines
app/test-bbdev/test_bbdev_perf.c +2
-4mbuf_reset ( ops_enq[j]- ldpc_dec.harq_combined_output.data); } -if (extDdr) { -bool preload = i == (TEST_REPETITIONS -1 ); +if (extDdr)preload_harq_ddr (tp->dev_id, queue_id, ops_enq, - num_ops, preload); - } + num_ops, true); start_time =rte_rdtsc_precise ();Quoted 1 line
for (enq = 0, deq = 0; enq <
num_ops;) { @@ -3362,11+3367,9 @@
Quoted 15 lines
typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c +0
-0mbuf_reset( ops_enq[j]-ldpc_dec.harq_combined_output.data);
app/test-bbdev/test_bbdev_perf.c +2
-4} -if (extDdr) { -bool preload = i == (TEST_REPETITIONS -1 ); +if (extDdr)preload_harq_ddr (tp->dev_id, queue_id, ops_enq, - num_ops, preload); - } + num_ops, true); start_time =rte_rdtsc_precise ();for (enq =0 , deq =0 ; enq < num_ops;) {
Re: [dpdk-dev] [PATCH v5 3/7] app/bbdev: include explicit HARQ preloading
Quoted 85 lines · Nicolas
Quoted 28 lines
-----Original Message-----
From: Tom Rix <[email protected]>
Sent: Monday, October 26, 2020 6:32 AM
To: Chautru, Nicolas <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH v5 3/7] app/bbdev: include explicit HARQ preloadingQuoted 18 lines · Nicolas Chautru
Run preloading explicitly for unit tests. Load each code block by reusing existing input op then restore for the actual test.
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Liu Tianjiao <[email protected]>--- app/test-bbdev/main.h | 1 + app/test-bbdev/test_bbdev_perf.c | 51 +++++++++++++++++++++------------------- 2 files changed, 28 insertions(+), 24 deletions(-)app/test-bbdev/main.h index renamed from app/test-bbdev/main.h +0
-0fb3dec8..dc10a50 100644
app/test-bbdev/main.h +0
-0@@ -17,6 +17,7 @@#define TEST_SKIPPED 1Quoted 5 lines
app/test-bbdev/main.h line 20
Quoted 2 lines
app/test-bbdev/main.h +1
-0#define MAX_BURST 512U +#define MAX_OPS 1024UThis #define is not consistently used.
ex/ see
retrieve_harq_ddr, the old 1024 is still being used.Thanks I missed it. I will change this now.
Quoted 50 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 9 lines
app/test-bbdev/main.h +0
-0#define DEFAULT_BURST 32U#define DEFAULT_OPS 64U#define DEFAULT_ITER 6Uapp/test-bbdev/test_bbdev_perf.c +0
-0@@ -2513,20 +2513,20 @@ typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 9 lines
app/test-bbdev/test_bbdev_perf.c +2
-4bool preload) {uint16_t j; -int ret; -uint32_t harq_offset = (uint32_t ) queue_id *HARQ_INCR *1024 ; -struct rte_bbdev_op_data save_hc_in, save_hc_out; -struct rte_bbdev_dec_op *ops_deq[MAX_BURST ]; +int deq; + uint32_t harq_offset = (uint32_t) queue_id * HARQ_INCR *
MAX_OPS;app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 2518
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ struct rte_bbdev_op_data save_hc_in[MAX_OPS],save_hc_out[MAX_OPS];
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +1
-0+struct rte_bbdev_dec_op *ops_deq[MAX_OPS ];uint32_t flags = ops[0 ]->ldpc_dec.op_flags; bool mem_in = flags &
RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE;app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 2523
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0
-0bool hc_in = flags &RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE ; bool mem_out = flags &
RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE;app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 2524
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-0bool hc_out = flags &
RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE;app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 2525
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-0bool h_comp = flags &
RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION;Quoted 11 lines
app/test-bbdev/test_bbdev_perf.c +4
-4-for (j =0 ; j < n; ++j) { -if ((mem_in || hc_in) && preload) { - save_hc_in = ops[j]- ldpc_dec.harq_combined_input; - save_hc_out = ops[j]- ldpc_dec.harq_combined_output; +if ((mem_in || hc_in) && preload) { +for (j =0 ; j < n; ++j) { + save_hc_in[j] = ops[j]- ldpc_dec.harq_combined_input; + save_hc_out[j] = ops[j]-Quoted 3 lines
ldpc_dec.harq_combined_output;
ops[j]->ldpc_dec.op_flags =RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_LOOPBACK + RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE;
Quoted 4 lines
Quoted 3 lines
flags are usually handled with bit operators, not arithmetic.
this seems to be a general issue.
This is keeping same coding style as rest of file. So keeping as is.
Ugh. Add to a cleanup list.
Quoted 17 lines
Quoted 17 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0
-0@@ -2536,16 +2536,23 @@ typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 12 lines
app/test-bbdev/test_bbdev_perf.c +3
-6ops[j]->ldpc_dec.harq_combined_output.offset = harq_offset; ops[j]->ldpc_dec.harq_combined_input.offset =0 ; -rte_bbdev_enqueue_ldpc_dec_ops (dev_id, queue_id, - &ops[j],1 ); - ret =0 ; -while (ret ==0 ) - ret =rte_bbdev_dequeue_ldpc_dec_ops ( - dev_id, queue_id, &ops_deq[j],1 ); + harq_offset +=HARQ_INCR ; + } + rte_bbdev_enqueue_ldpc_dec_ops(dev_id, queue_id,&ops[0], n);
Add check the return is 'n'
Quoted 7 lines
Quoted 6 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 2546
Quoted 5 lines
app/test-bbdev/test_bbdev_perf.c +5
-0+ deq =0 ; +while (deq != n) + deq +=rte_bbdev_dequeue_ldpc_dec_ops ( + dev_id, queue_id, &ops_deq[deq], + n - deq);Add check the return >= 0
This cannot be <0.
uint16_t
ok
Tom
Quoted 53 lines
Quoted 53 lines
Tom
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 4 lines
app/test-bbdev/test_bbdev_perf.c +2
-1+/* Restore the operations */ +for (j =0 ; j < n; ++j) { ops[j]->ldpc_dec.op_flags = flags; - ops[j]->ldpc_dec.harq_combined_input =
save_hc_in;app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 2547
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-1- ops[j]->ldpc_dec.harq_combined_output =
save_hc_out;app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 2550
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ ops[j]->ldpc_dec.harq_combined_input =save_hc_in[j];
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 2551
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +1
-0+ ops[j]->ldpc_dec.harq_combined_output =save_hc_out[j];
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 8 lines
app/test-bbdev/test_bbdev_perf.c +3
-0} + } + harq_offset = (uint32_t ) queue_id *HARQ_INCR *MAX_OPS ; +for (j =0 ; j < n; ++j) {/* Adjust HARQ offset when we reach external DDR */ if (mem_in || hc_in) ops[j]->ldpc_dec.harq_combined_input.offset@@ -3231,11 +3238,9 @@ typedef int (test_case_function)(struct
active_device*ad,Quoted 13 lines
app/test-bbdev/test_bbdev_perf.c +2
-4mbuf_reset ( ops_enq[j]- ldpc_dec.harq_combined_output.data); } -if (extDdr) { -bool preload = i == (TEST_REPETITIONS -1 ); +if (extDdr)preload_harq_ddr (tp->dev_id, queue_id, ops_enq, - num_ops, preload); - } + num_ops, true); start_time =rte_rdtsc_precise ();Quoted 1 line
for (enq = 0, deq = 0; enq <
num_ops;) { @@ -3362,11+3367,9 @@
Quoted 15 lines
typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c +0
-0mbuf_reset( ops_enq[j]-ldpc_dec.harq_combined_output.data);
app/test-bbdev/test_bbdev_perf.c +2
-4} -if (extDdr) { -bool preload = i == (TEST_REPETITIONS -1 ); +if (extDdr)preload_harq_ddr (tp->dev_id, queue_id, ops_enq, - num_ops, preload); - } + num_ops, true); start_time =rte_rdtsc_precise ();for (enq =0 , deq =0 ; enq < num_ops;) {
PATCH v5 4/7 app/bbdev: define wait for offload
In reply to Nicolas ChautruReplacing magic number for default wait time for hw offload.
--- app/test-bbdev/test_bbdev_perf.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
app/test-bbdev/test_bbdev_perf.c +5 -4
@@ -25,6 +25,7 @@#define MAX_QUEUES RTE_MAX_LCORE#define TEST_REPETITIONS 1000 +#define WAIT_OFFLOAD_US 1000#ifdef RTE_LIBRTE_PMD_BBDEV_FPGA_LTE_FEC #include <fpga_lte_fec.h>
@@ -4451,7 +4452,7 @@ typedef int (test_case_function)(struct active_device *ad, time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time =rte_rdtsc_precise ();
@@ -4542,7 +4543,7 @@ typedef int (test_case_function)(struct active_device *ad, time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time =rte_rdtsc_precise ();
@@ -4630,7 +4631,7 @@ typedef int (test_case_function)(struct active_device *ad, time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time =rte_rdtsc_precise ();
@@ -4713,7 +4714,7 @@ typedef int (test_case_function)(struct active_device *ad, time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time =rte_rdtsc_precise ();
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v5 4/7] app/bbdev: define wait for offload
Quoted 14 lines · Nicolas Chautru
Replacing magic number for default wait time for hw offload.
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Liu Tianjiao <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)app/test-bbdev/test_bbdev_perf.c +0
-0
app/test-bbdev/test_bbdev_perf.c line 28
Quoted 4 lines
app/test-bbdev/test_bbdev_perf.c +1
-0@@ -25,6 +25,7 @@#define MAX_QUEUES RTE_MAX_LCORE#define TEST_REPETITIONS 1000 +#define WAIT_OFFLOAD_US 1000
Why wasn't 200 used ?
Tom
Quoted 39 lines
app/test-bbdev/test_bbdev_perf.c +4
-4#ifdef RTE_LIBRTE_PMD_BBDEV_FPGA_LTE_FEC #include <fpga_lte_fec.h> @@ -4451,7 +4452,7 @@ typedef int (test_case_function)(struct active_device *ad, time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time =rte_rdtsc_precise ();@@ -4542,7 +4543,7 @@ typedef int (test_case_function)(struct active_device *ad, time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time =rte_rdtsc_precise ();@@ -4630,7 +4631,7 @@ typedef int (test_case_function)(struct active_device *ad, time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time =rte_rdtsc_precise ();@@ -4713,7 +4714,7 @@ typedef int (test_case_function)(struct active_device *ad, time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time =rte_rdtsc_precise ();
Re: [dpdk-dev] [PATCH v5 4/7] app/bbdev: define wait for offload
Quoted 24 lines
From: Tom Rix <[email protected]>
Sent: Monday, October 26, 2020 6:33 AM
To: Chautru, Nicolas <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH v5 4/7] app/bbdev: define wait for offloadQuoted 15 lines · Nicolas Chautru
Replacing magic number for default wait time for hw offload.
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Liu Tianjiao <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)app/test-bbdev/test_bbdev_perf.c +0
-0@@ -25,6 +25,7 @@
Quoted 7 lines
app/test-bbdev/test_bbdev_perf.c line 28
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +1
-0#define MAX_QUEUES RTE_MAX_LCORE#define TEST_REPETITIONS 1000 +#define WAIT_OFFLOAD_US 1000Why wasn't 200 used ?
Tom
1ms is a more typical expectation for workload (TTI in numerology 0 for 5GNR and LTE).
Quoted 44 lines
app/test-bbdev/test_bbdev_perf.c line 29
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +0
-0#ifdef RTE_LIBRTE_PMD_BBDEV_FPGA_LTE_FEC #include<
fpga_lte_fec.h>app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-0@@ -4451,7 +4452,7 @@ typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 8 lines
app/test-bbdev/test_bbdev_perf.c +1
-1time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time = rte_rdtsc_precise(); @@ -4542,7 +4543,7@@ typedef
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 9 lines
int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c +1
-1time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time = rte_rdtsc_precise(); @@ -4630,7 +4631,7@@ typedef
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 9 lines
int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c +1
-1time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time = rte_rdtsc_precise(); @@ -4713,7 +4714,7@@ typedef
Quoted 9 lines
int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c +1
-1time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time =rte_rdtsc_precise ();
Re: [dpdk-dev] [PATCH v5 4/7] app/bbdev: define wait for offload
Quoted 24 lines · Nicolas
Quoted 24 lines
From: Tom Rix <[email protected]>
Sent: Monday, October 26, 2020 6:33 AM
To: Chautru, Nicolas <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH v5 4/7] app/bbdev: define wait for offloadQuoted 15 lines · Nicolas Chautru
Replacing magic number for default wait time for hw offload.
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Liu Tianjiao <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)app/test-bbdev/test_bbdev_perf.c +0
-0@@ -25,6 +25,7 @@
Quoted 7 lines
Quoted 6 lines
app/test-bbdev/test_bbdev_perf.c line 28
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +1
-0#define MAX_QUEUES RTE_MAX_LCORE#define TEST_REPETITIONS 1000 +#define WAIT_OFFLOAD_US 1000Why wasn't 200 used ?
Tom
1ms is a more typical expectation for workload (TTI in numerology 0 for 5GNR and LTE).
That's fine, i was only commenting because it changed.
Tom
Quoted 44 lines
Quoted 44 lines
app/test-bbdev/test_bbdev_perf.c line 29
Quoted 3 lines
app/test-bbdev/test_bbdev_perf.c +0
-0#ifdef RTE_LIBRTE_PMD_BBDEV_FPGA_LTE_FEC #include<
fpga_lte_fec.h>app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-0@@ -4451,7 +4452,7 @@ typedef int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 8 lines
app/test-bbdev/test_bbdev_perf.c +1
-1time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time = rte_rdtsc_precise(); @@ -4542,7 +4543,7@@ typedef
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 9 lines
int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c +1
-1time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time = rte_rdtsc_precise(); @@ -4630,7 +4631,7@@ typedef
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 9 lines
int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c +1
-1time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time = rte_rdtsc_precise(); @@ -4713,7 +4714,7@@ typedef
Quoted 9 lines
int (test_case_function)(struct
active_device*ad,app/test-bbdev/test_bbdev_perf.c +1
-1time_st->enq_acc_total_time += stats.acc_offload_cycles;/* give time for device to process ops */ -rte_delay_us (200 ); +rte_delay_us (WAIT_OFFLOAD_US );/* Start time meas for dequeue function offload latency */ deq_start_time =rte_rdtsc_precise ();
PATCH v5 5/7 app/bbdev: skip bler ut when compression is used
In reply to Nicolas Chautrubler test results are not valid when LLR compression is used or for loopback scenarios. Skipping these.
--- app/test-bbdev/test_bbdev_perf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
app/test-bbdev/test_bbdev_perf.c +5 -1
@@ -3719,7 +3719,11 @@ typedef int (test_case_function)(struct active_device *ad,RTE_ALIGN (sizeof (struct thread_params ) * num_lcores, RTE_CACHE_LINE_SIZE)); -if (test_vector.op_type ==RTE_BBDEV_OP_LDPC_DEC ) +if ((test_vector.op_type ==RTE_BBDEV_OP_LDPC_DEC ) && + !check_bit (test_vector.ldpc_dec.op_flags, +RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_LOOPBACK ) + && !check_bit (test_vector.ldpc_dec.op_flags, +RTE_BBDEV_LDPC_LLR_COMPRESSION )) bler_function = bler_pmd_lcore_ldpc_dec;else return TEST_SKIPPED ;
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v5 5/7] app/bbdev: skip bler ut when compression is used
Quoted 17 lines · Nicolas Chautru
bler test results are not valid when LLR compression is used or for loopback scenarios. Skipping these.
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Aidan Goddard <[email protected]>Acked-by Dave Burley <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)app/test-bbdev/test_bbdev_perf.c +0
-0@@ -3719,7 +3719,11 @@ typedef int (test_case_function)(struct active_device *ad,RTE_ALIGN (sizeof (struct thread_params ) * num_lcores, RTE_CACHE_LINE_SIZE));
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 3729
Quoted 10 lines
app/test-bbdev/test_bbdev_perf.c +5
-1-if (test_vector.op_type ==RTE_BBDEV_OP_LDPC_DEC ) +if ((test_vector.op_type ==RTE_BBDEV_OP_LDPC_DEC ) && + !check_bit (test_vector.ldpc_dec.op_flags, +RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_LOOPBACK ) + && !check_bit (test_vector.ldpc_dec.op_flags, +RTE_BBDEV_LDPC_LLR_COMPRESSION )) bler_function = bler_pmd_lcore_ldpc_dec;else return TEST_SKIPPED ;
Looks ok.
PATCH v5 6/7 app/bbdev: reduce duration of throughput test
In reply to Nicolas ChautruReducing number of repetitions from 1000 to 100
to save time. Results are accurate enough with
100 loops.
--- app/test-bbdev/test_bbdev_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-bbdev/test_bbdev_perf.c +1 -1
@@ -24,7 +24,7 @@#define GET_SOCKET (socket_id) (((socket_id) == SOCKET_ID_ANY) ? 0 : (socket_id))#define MAX_QUEUES RTE_MAX_LCORE -#define TEST_REPETITIONS 1000 +#define TEST_REPETITIONS 100#define WAIT_OFFLOAD_US 1000#ifdef RTE_LIBRTE_PMD_BBDEV_FPGA_LTE_FEC
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v5 6/7] app/bbdev: reduce duration of throughput test
Quoted 15 lines · Nicolas Chautru
Reducing number of repetitions from 1000 to 100
to save time. Results are accurate enough with
100 loops.Signed-off-by Nicolas Chautru <[email protected]>Acked-by Liu Tianjiao <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)app/test-bbdev/test_bbdev_perf.c +0
-0
app/test-bbdev/test_bbdev_perf.c line 30
Quoted 8 lines
app/test-bbdev/test_bbdev_perf.c +1
-1@@ -24,7 +24,7 @@#define GET_SOCKET (socket_id) (((socket_id) == SOCKET_ID_ANY) ? 0 : (socket_id))#define MAX_QUEUES RTE_MAX_LCORE -#define TEST_REPETITIONS 1000 +#define TEST_REPETITIONS 100#define WAIT_OFFLOAD_US 1000#ifdef RTE_LIBRTE_PMD_BBDEV_FPGA_LTE_FEC
Looks ok
PATCH v5 7/7 app/bbdev: update offload test to dequeue full ring
In reply to Nicolas Chautruupdate offload dequeue to retrieve the full ring to be agnostic of implementation.
--- app/test-bbdev/test_bbdev_perf.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
app/test-bbdev/test_bbdev_perf.c +8 -8
@@ -4463,8 +4463,8 @@ typedef int (test_case_function)(struct active_device *ad,/* Dequeue one operation */ do { deq +=rte_bbdev_dequeue_dec_ops (dev_id, queue_id, - &ops_deq[deq],1 ); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 )); deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st->deq_max_time,
@@ -4554,8 +4554,8 @@ typedef int (test_case_function)(struct active_device *ad,/* Dequeue one operation */ do { deq +=rte_bbdev_dequeue_ldpc_dec_ops (dev_id, queue_id, - &ops_deq[deq],1 ); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 )); deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st->deq_max_time,
@@ -4642,8 +4642,8 @@ typedef int (test_case_function)(struct active_device *ad,/* Dequeue one operation */ do { deq +=rte_bbdev_dequeue_enc_ops (dev_id, queue_id, - &ops_deq[deq],1 ); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 )); deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st->deq_max_time,
@@ -4725,8 +4725,8 @@ typedef int (test_case_function)(struct active_device *ad,/* Dequeue one operation */ do { deq +=rte_bbdev_dequeue_ldpc_enc_ops (dev_id, queue_id, - &ops_deq[deq],1 ); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 )); deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st->deq_max_time,
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v5 7/7] app/bbdev: update offload test to dequeue full ring
Quoted 15 lines · Nicolas Chautru
update offload dequeue to retrieve the full ring to be agnostic of implementation.
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Aidan Goddard <[email protected]>Acked-by Dave Burley <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)app/test-bbdev/test_bbdev_perf.c +0
-0
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4463
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-0@@ -4463,8 +4463,8 @@ typedef int (test_case_function)(struct active_device *ad,/* Dequeue one operation */
This comment and similar need to change, not doing just 1 anymore
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4467
Quoted 6 lines
app/test-bbdev/test_bbdev_perf.c +2
-2do { deq +=rte_bbdev_dequeue_dec_ops (dev_id, queue_id, - &ops_deq[deq],1 ); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 ));
This check looks wrong, should likely be (deq != enq)
Similar below
Tom
Quoted 36 lines
app/test-bbdev/test_bbdev_perf.c +6
-6deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st->deq_max_time,@@ -4554,8 +4554,8 @@ typedef int (test_case_function)(struct active_device *ad,/* Dequeue one operation */ do { deq +=rte_bbdev_dequeue_ldpc_dec_ops (dev_id, queue_id, - &ops_deq[deq],1 ); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 )); deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st->deq_max_time,@@ -4642,8 +4642,8 @@ typedef int (test_case_function)(struct active_device *ad,/* Dequeue one operation */ do { deq +=rte_bbdev_dequeue_enc_ops (dev_id, queue_id, - &ops_deq[deq],1 ); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 )); deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st->deq_max_time,@@ -4725,8 +4725,8 @@ typedef int (test_case_function)(struct active_device *ad,/* Dequeue one operation */ do { deq +=rte_bbdev_dequeue_ldpc_enc_ops (dev_id, queue_id, - &ops_deq[deq],1 ); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 )); deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st->deq_max_time,
Re: [dpdk-dev] [PATCH v5 7/7] app/bbdev: update offload test to dequeue full ring
Quoted 29 lines
-----Original Message-----
From: Tom Rix <[email protected]>
Sent: Monday, October 26, 2020 6:56 AM
To: Chautru, Nicolas <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH v5 7/7] app/bbdev: update offload test to dequeue full ringapp/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 16 lines · Nicolas Chautru
update offload dequeue to retrieve the full ring to be agnostic of implementation.
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Aidan Goddard <[email protected]>Acked-by Dave Burley <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)app/test-bbdev/test_bbdev_perf.c +0
-0@@ -4463,8 +4463,8 @@ typedef int (test_case_function)(struct
active_device*ad,
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4463
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-0/* Dequeue one operation */ This comment and similar need to change, not doing just 1 anymore
We still just need one operation dequeued to be considered done.
Quoted 11 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4465
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0
-0do { deq += rte_bbdev_dequeue_dec_ops(dev_id,
queue_id,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4467
Quoted 4 lines
app/test-bbdev/test_bbdev_perf.c +2
-2- &ops_deq[deq], 1); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 ));This check looks wrong, should likely be (deq != enq)
Similar below
No that is intentional. Not waiting for everything to be done but purely the first dequeue. If not this would be run multiple times. The rest of ring is dequeued below.
Quoted 46 lines
Tom
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 8 lines
app/test-bbdev/test_bbdev_perf.c +0
-0deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st-
deq_max_time, @@ -4554,8
+4554,8 @@ typedef int (test_case_function)(structactive_device*ad,app/test-bbdev/test_bbdev_perf.c +0
-0/* Dequeue one operation */ do { deq += rte_bbdev_dequeue_ldpc_dec_ops(dev_id,
queue_id,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 12 lines
app/test-bbdev/test_bbdev_perf.c +2
-2- &ops_deq[deq], 1); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 )); deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st-
deq_max_time, @@ -4642,8
+4642,8 @@ typedef int (test_case_function)(structactive_device*ad,app/test-bbdev/test_bbdev_perf.c +0
-0/* Dequeue one operation */ do { deq += rte_bbdev_dequeue_enc_ops(dev_id,
queue_id,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 12 lines
app/test-bbdev/test_bbdev_perf.c +2
-2- &ops_deq[deq], 1); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 )); deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st-
deq_max_time, @@ -4725,8
+4725,8 @@ typedef int (test_case_function)(structactive_device*ad,app/test-bbdev/test_bbdev_perf.c +0
-0/* Dequeue one operation */ do { deq += rte_bbdev_dequeue_ldpc_enc_ops(dev_id,
queue_id,Quoted 8 lines
app/test-bbdev/test_bbdev_perf.c +2
-2- &ops_deq[deq], 1); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 )); deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st-
deq_max_time,
Re: [dpdk-dev] [PATCH v5 7/7] app/bbdev: update offload test to dequeue full ring
Quoted 41 lines · Nicolas
Quoted 28 lines
-----Original Message-----
From: Tom Rix <[email protected]>
Sent: Monday, October 26, 2020 6:56 AM
To: Chautru, Nicolas <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH v5 7/7] app/bbdev: update offload test to dequeue full ringapp/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct
Quoted 16 lines · Nicolas Chautru
update offload dequeue to retrieve the full ring to be agnostic of implementation.
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Aidan Goddard <[email protected]>Acked-by Dave Burley <[email protected]>--- app/test-bbdev/test_bbdev_perf.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)app/test-bbdev/test_bbdev_perf.c +0
-0@@ -4463,8 +4463,8 @@ typedef int (test_case_function)(struct
active_device*ad,Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4463
Quoted 1 line
app/test-bbdev/test_bbdev_perf.c +0
-0/* Dequeue one operation */ This comment and similar need to change, not doing just 1 anymore
We still just need one operation dequeued to be considered done.
Quoted 9 lines
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct · line 4465
Quoted 2 lines
app/test-bbdev/test_bbdev_perf.c +0
-0do { deq += rte_bbdev_dequeue_dec_ops(dev_id,
queue_id,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad, · line 4467
Quoted 4 lines
app/test-bbdev/test_bbdev_perf.c +2
-2- &ops_deq[deq], 1); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 ));This check looks wrong, should likely be (deq != enq)
Quoted 3 lines
Quoted 1 line
Similar below
No that is intentional. Not waiting for everything to be done but purely the first dequeue. If not this would be run multiple times. The rest of ring is dequeued below.
So is > 1 an error condition or ok?
Maybe add a comment that it is really ok because the call logic is not setup for 1 but for enq
Tom
Quoted 45 lines
Quoted 45 lines
Tom
app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 7 lines
app/test-bbdev/test_bbdev_perf.c +0
-0deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st-
deq_max_time, @@ -4554,8
+4554,8 @@ typedef int (test_case_function)(structactive_device*ad,app/test-bbdev/test_bbdev_perf.c +0
-0/* Dequeue one operation */ do { deq += rte_bbdev_dequeue_ldpc_dec_ops(dev_id,
queue_id,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 12 lines
app/test-bbdev/test_bbdev_perf.c +2
-2- &ops_deq[deq], 1); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 )); deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st-
deq_max_time, @@ -4642,8
+4642,8 @@ typedef int (test_case_function)(structactive_device*ad,app/test-bbdev/test_bbdev_perf.c +0
-0/* Dequeue one operation */ do { deq += rte_bbdev_dequeue_enc_ops(dev_id,
queue_id,app/test-bbdev/test_bbdev_perf.c typedef int (test_case_function)(struct active_device *ad,
Quoted 12 lines
app/test-bbdev/test_bbdev_perf.c +2
-2- &ops_deq[deq], 1); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 )); deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st-
deq_max_time, @@ -4725,8
+4725,8 @@ typedef int (test_case_function)(structactive_device*ad,app/test-bbdev/test_bbdev_perf.c +0
-0/* Dequeue one operation */ do { deq += rte_bbdev_dequeue_ldpc_enc_ops(dev_id,
queue_id,Quoted 8 lines
app/test-bbdev/test_bbdev_perf.c +2
-2- &ops_deq[deq], 1); - }while (unlikely (deq !=1 )); + &ops_deq[deq], enq); + }while (unlikely (deq ==0 )); deq_last_time =rte_rdtsc_precise () - deq_start_time; time_st->deq_max_time = RTE_MAX(time_st-
deq_max_time,
Quoted 3 lines · Nicolas Chautru
v5: correcting typos again. Quite worrisome spelling disorder.
v4: rebased on main latest
Don't forget to update superseded series in patchwork too. Thanks.
Signature · 1 line
David Marchand