BBDEV test updates
v3 cover BBDEV test updates
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 v3 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
@@ -3928,12 +3928,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;
@@ -3955,7 +3957,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 ;
@@ -4177,7 +4179,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 )
@@ -4199,7 +4201,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,
@@ -4859,6 +4937,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);
@@ -4889,7 +4973,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 v3 1/7] app/bbdev: add explicit ut for latency vs validation
From: dev <[email protected]> on behalf of Nicolas Chautru <[email protected]>
Sent: 19 August 2020 01:05
To: [email protected] <[email protected]>; [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; Nicolas Chautru <[email protected]>
Subject: [dpdk-dev] [PATCH v3 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 +0 -0
@@ -3928,12 +3928,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;
@@ -3955,7 +3957,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;
@@ -4177,7 +4179,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)
@@ -4199,7 +4201,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,
@@ -4859,6 +4937,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);
@@ -4889,7 +4973,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 v3 1/7] app/bbdev: add explicit ut for latency vs validation
In reply to Nicolas ChautruFrom: dev <[email protected]> on behalf of Nicolas Chautru <[email protected]>
Sent: 19 August 2020 01:05
To: [email protected] <[email protected]>; [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; Nicolas Chautru <[email protected]>
Subject: [dpdk-dev] [PATCH v3 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 +0 -0
@@ -3928,12 +3928,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;
@@ -3955,7 +3957,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;
@@ -4177,7 +4179,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)
@@ -4199,7 +4201,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,
@@ -4859,6 +4937,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);
@@ -4889,7 +4973,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
PATCH v3 2/7 app/bbdev: add explicit check for counters
In reply to Nicolas ChautruAdding explicit check in ut that the stats counters have the expected 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
@@ -4769,6 +4769,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 v3 2/7] app/bbdev: add explicit check for counters
From: dev <[email protected]> on behalf of Nicolas Chautru <[email protected]>
Sent: 19 August 2020 01:05
To: [email protected] <[email protected]>; [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; Nicolas Chautru <[email protected]>
Subject: [dpdk-dev] [PATCH v3 2/7] app/bbdev: add explicit check for counters
Adding explicit check in ut that the stats counters
have the expected 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 +0 -0
@@ -4769,6 +4769,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 v3 2/7] app/bbdev: add explicit check for counters
In reply to Nicolas ChautruFrom: dev <[email protected]> on behalf of Nicolas Chautru <[email protected]>
Sent: 19 August 2020 01:05
To: [email protected] <[email protected]>; [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; Nicolas Chautru <[email protected]>
Subject: [dpdk-dev] [PATCH v3 2/7] app/bbdev: add explicit check for counters
Adding explicit check in ut that the stats counters
have the expected 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 +0 -0
@@ -4769,6 +4769,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
PATCH v3 3/7 app/bbdev: include explicit HARQ preloading
In reply to Nicolas ChautruRun preloading explicitly for unit tests for each code block by reusing existing input op then restore for the actual test post preloading.
--- 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
PATCH v3 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>
@@ -4380,7 +4381,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 ();
@@ -4471,7 +4472,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 ();
@@ -4559,7 +4560,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 ();
@@ -4642,7 +4643,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
PATCH v3 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
@@ -3648,7 +3648,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 v3 5/7] app/bbdev: skip bler ut when compression is used
From: dev <[email protected]> on behalf of Nicolas Chautru <[email protected]>
Sent: 19 August 2020 01:05
To: [email protected] <[email protected]>; [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; Nicolas Chautru <[email protected]>
Subject: [dpdk-dev] [PATCH v3 5/7] app/bbdev: skip bler ut when compression is used
bler 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 +0 -0
@@ -3648,7 +3648,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 v3 5/7] app/bbdev: skip bler ut when compression is used
In reply to Nicolas ChautruFrom: dev <[email protected]> on behalf of Nicolas Chautru <[email protected]>
Sent: 19 August 2020 01:05
To: [email protected] <[email protected]>; [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; Nicolas Chautru <[email protected]>
Subject: [dpdk-dev] [PATCH v3 5/7] app/bbdev: skip bler ut when compression is used
bler 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 +0 -0
@@ -3648,7 +3648,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
PATCH v3 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
PATCH v3 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
@@ -4392,8 +4392,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,
@@ -4483,8 +4483,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,
@@ -4571,8 +4571,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,
@@ -4654,8 +4654,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 v3 7/7] app/bbdev: update offload test to dequeue full ring
From: dev <[email protected]> on behalf of Nicolas Chautru <[email protected]>
Sent: 19 August 2020 01:05
To: [email protected] <[email protected]>; [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; Nicolas Chautru <[email protected]>
Subject: [dpdk-dev] [PATCH v3 7/7] app/bbdev: update offload test to dequeue full ring
update 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 +0 -0
@@ -4392,8 +4392,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, @@ -4483,8 +4483,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, @@ -4571,8 +4571,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, @@ -4654,8 +4654,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 v3 7/7] app/bbdev: update offload test to dequeue full ring
In reply to Nicolas ChautruFrom: dev <[email protected]> on behalf of Nicolas Chautru <[email protected]>
Sent: 19 August 2020 01:05
To: [email protected] <[email protected]>; [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; Nicolas Chautru <[email protected]>
Subject: [dpdk-dev] [PATCH v3 7/7] app/bbdev: update offload test to dequeue full ring
update 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 +0 -0
@@ -4392,8 +4392,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, @@ -4483,8 +4483,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, @@ -4571,8 +4571,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, @@ -4654,8 +4654,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
Hi Akhil,
Just a heads up on this bbdev related serie in case you missed it. It would be useful to have all the bbdev changes into rc1.
+ Tom
Thanks again,
Nic
Quoted 30 lines
-----Original Message-----
From: Chautru, Nicolas <[email protected]>
Sent: Tuesday, August 18, 2020 5:06 PM
To: [email protected]; [email protected]
Cc: Richardson, Bruce <[email protected]>; Chautru, Nicolas <[email protected]>
Subject: [PATCH v3 0/7] BBDEV test updatesv3: 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 ringapp/test-bbdev/main.h | 1 + app/test-bbdev/test_bbdev_perf.c | 193 ++++++++++++++++++++++++++++++--------- 2 files changed, 152 insertions(+), 42 deletions(-)--
1.8.3.1
Hi Nic,
Quoted 5 lines
Hi Akhil,
Just a heads up on this bbdev related serie in case you missed it. It would be useful to have all the bbdev changes into rc1.
+ Tom
This patchset is not reviewed much and I have a lot of back log to clear for API layer. I am planning to pick it in RC2, or if I get some time after merging the essential patches for RC1.
Regards,
Akhil
Tom,
Can you please review the serie to provide more ack/review. It was already reviewed and shared as patch internally to Intel. Thanks
Nic
Quoted 22 lines
-----Original Message-----
From: Akhil Goyal <[email protected]>
Sent: Tuesday, October 6, 2020 11:38 PM
To: Chautru, Nicolas <[email protected]>; [email protected]; [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: RE: [PATCH v3 0/7] BBDEV test updatesHi Nic,
Quoted 5 lines
Hi Akhil,
Just a heads up on this bbdev related serie in case you missed it. It would be useful to have all the bbdev changes into rc1.
+ TomThis patchset is not reviewed much and I have a lot of back log to clear for API layer.
I am planning to pick it in RC2, or if I get some time after merging the essential patches for RC1.Regards,
Akhil
Hi Akhil,
Heads up on this one. Can you consider applying it for rc2 now? Thanks
Nic
Quoted 22 lines
-----Original Message-----
From: Akhil Goyal <[email protected]>
Sent: Tuesday, October 6, 2020 11:38 PM
To: Chautru, Nicolas <[email protected]>; [email protected]; [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: RE: [PATCH v3 0/7] BBDEV test updatesHi Nic,
Quoted 5 lines
Hi Akhil,
Just a heads up on this bbdev related serie in case you missed it. It would be useful to have all the bbdev changes into rc1.
+ TomThis patchset is not reviewed much and I have a lot of back log to clear for API layer.
I am planning to pick it in RC2, or if I get some time after merging the essential patches for RC1.Regards,
Akhil