From: Pavan Nikhilesh Date: Tue, 16 Jan 2018 17:45:53 +0000 (+0530) Subject: app/eventdev: add packet distribution logs X-Git-Tag: spdx-start~168 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6b1a14a83a06d5e00a1279ee756b35561f3ac986;p=dpdk.git app/eventdev: add packet distribution logs Add logs for packet distribution across worker cores to be printed along with the test results. Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- diff --git a/app/test-eventdev/evt_main.c b/app/test-eventdev/evt_main.c index 3c27f3216a..57bb94570f 100644 --- a/app/test-eventdev/evt_main.c +++ b/app/test-eventdev/evt_main.c @@ -29,6 +29,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 e82cc93015..e279d81a5f 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -8,8 +8,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; }