app/testpmd: fix burst stats reporting
authorDaniel Shelepov <dashel@microsoft.com>
Mon, 14 May 2018 21:12:15 +0000 (21:12 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 21 May 2018 15:12:49 +0000 (17:12 +0200)
commitfe613657ce486083a3ed96890c95de4f35c8593b
tree4277cccaf00646eb2d24e887726f667a43ec34a0
parent4022248efe7060e5a358696953a4236e417ad58b
app/testpmd: fix burst stats reporting

When RTE_TEST_PMD_RECORD_BURST_STATS is enabled, testpmd collects
burst statistics and includes them in the port stats report.  The
summary should include top 2 most frequent burst sizes, but there is a
bug in finding the top-2.  During the scan of burst size counts, the
top-2 can change only if top-1 also changes.

Added logic to update the top-2 if current burst size is larger than
existing top-2, but smaller than existing top-1.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Daniel Shelepov <dashel@microsoft.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
app/test-pmd/testpmd.c