app/testpmd: fix little performance drop
authorXiaoyun Li <xiaoyun.li@intel.com>
Thu, 12 Jul 2018 07:55:46 +0000 (15:55 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 23 Jul 2018 21:55:26 +0000 (23:55 +0200)
commit4918a35756e505efac912c3fd23473b0d3183e85
treef9908c7c325fc725bac8703e64e18c79a9e663ef
parent47636efe878dd8885bb47b142765c9ccae6babe3
app/testpmd: fix little performance drop

There is about 3% perf drop. And it is because of a bitrate
calculation in the datapath. So improve it by maintaining an array
of port indexes in testpmd, which is updated with ethdev events.

Fixes: 8728ccf37615 ("fix ethdev ports enumeration")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
app/test-pmd/testpmd.c