app/testeventdev: fix divide by zero in stats
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Mon, 31 Jul 2017 10:04:52 +0000 (15:34 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 31 Jul 2017 20:43:48 +0000 (22:43 +0200)
commit04716352beb06ec1285710dd9cb28316cadec57d
treedc5a419fcb82d7606f2ab0bddde4da83f658ef7f
parent30005d09264ed50f6beaec6b80b987dbc27e3607
app/testeventdev: fix divide by zero in stats

pkts == 0 will result in divide by zero case.
Added a check to fix it.

Coverity issue: 158652
Fixes: 9d3aeb185eb4 ("app/testeventdev: launch perf lcores")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
app/test-eventdev/test_perf_common.c