Add logs for packet distribution across worker cores to be printed along with the test results.
Signed-off-by: Pavan Nikhilesh <pbhagavat...@caviumnetworks.com> Acked-by: Jerin Jacob <jerin.ja...@caviumnetworks.com> --- app/test-eventdev/evt_main.c | 3 +++ app/test-eventdev/test_perf_common.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/app/test-eventdev/evt_main.c b/app/test-eventdev/evt_main.c index 1c3a7faeb..bde388b97 100644 --- a/app/test-eventdev/evt_main.c +++ b/app/test-eventdev/evt_main.c @@ -57,6 +57,9 @@ signal_handler(int signum) rte_eal_mp_wait_lcore(); + if (test->ops.test_result) + test->ops.test_result(test, &opt); + if (test->ops.eventdev_destroy) test->ops.eventdev_destroy(test, &opt); diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index 9aff31f20..428af4ae2 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -36,8 +36,20 @@ int perf_test_result(struct evt_test *test, struct evt_options *opt) { RTE_SET_USED(opt); + int i; + uint64_t total = 0; struct test_perf *t = evt_test_priv(test); + printf("Packet distribution across worker cores :\n"); + for (i = 0; i < t->nb_workers; i++) + total += t->worker[i].processed_pkts; + for (i = 0; i < t->nb_workers; i++) + printf("Worker %d packets: "CLGRN"%"PRIx64" "CLNRM"percentage:" + CLGRN" %3.2f\n"CLNRM, i, + t->worker[i].processed_pkts, + (((double)t->worker[i].processed_pkts)/total) + * 100); + return t->result; } -- 2.14.1