app/testpmd: display/clear forwarding stats on demand
authorDavid Marchand <david.marchand@redhat.com>
Mon, 25 Mar 2019 08:51:46 +0000 (09:51 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Mar 2019 16:25:31 +0000 (17:25 +0100)
commit53324971a14e02f5f710d6e73fe475650e9a9802
tree9a20ef64913e3c72fd62f457fd5eb25d2bff7555
parent7718296d06916d0b2029763913944f0067a2d0dd
app/testpmd: display/clear forwarding stats on demand

Add a new "show/clear fwd stats all" command to display fwd and port
statistics on the fly.

To be able to do so, the (testpmd only) rte_port structure can't be used
to maintain any statistics.
Moved the stats dump parts from stop_packet_forwarding() and merge with
fwd_port_stats_display() into fwd_stats_display().
fwd engine statistics are then aggregated into a local per port array.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/cmdline.c
app/test-pmd/testpmd.c
app/test-pmd/testpmd.h
doc/guides/testpmd_app_ug/testpmd_funcs.rst