[dpdk-dev] [PATCH v3 4/4] app/testpmd: display/clear forwarding stats on demand

Ferruh Yigit ferruh.yigit at intel.com
Wed Mar 20 13:25:37 CET 2019


On 3/20/2019 10:02 AM, David Marchand wrote:
> Add a new "show/clear fwd stats all" command to display fwd and port
> statistics on the fly.

Won't this be duplicating existing commands:
"show port stats all|<port_id>"
"clear port stats all|<port_id>"

What benefit "show/clear fwd stats all" adds against existing ones?

testpmd> show port stats all

  ######################## NIC statistics for port 0  ########################
  RX-packets: 133257152  RX-missed: 0          RX-bytes:  0
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 131952064  TX-errors: 0          TX-bytes:  0

  Throughput (since last show)
  Rx-pps:            0
  Tx-pps:            0
  ############################################################################

  ######################## NIC statistics for port 1  ########################
  RX-packets: 133333440  RX-missed: 0          RX-bytes:  0
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 131952064  TX-errors: 0          TX-bytes:  0

  Throughput (since last show)
  Rx-pps:            0
  Tx-pps:            0
  ############################################################################


> 
> 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 at redhat.com>
> ---
> Changelog since v1:
> - removed hunk from now deleted patch 3
> 

<...>



More information about the dev mailing list