Rx/Tx doorbells stats are essential for performance investigation. On the way fix ethdev documenation to refine requirements on driver callback. It allows to make these callbacks a bit simpler.
Add testpmd option to show specified xstats periodically or upon request, for example: * --display-xstats rx_good_packets,tx_good_packets --stats-period 1 Port statistics ==================================== ######################## NIC statistics for port 0 ######################## RX-packets: 14102808 RX-missed: 0 RX-bytes: 7164239264 RX-errors: 0 RX-nombuf: 0 TX-packets: 14102789 TX-errors: 0 TX-bytes: 7164226028 Throughput (since last show) Rx-pps: 2349577 Rx-bps: 9548682392 Tx-pps: 2349576 Tx-bps: 9548682408 Value Rate (since last show) rx_good_packets 14103280 2349575 tx_good_packets 14103626 2349573 ############################################################################ * -i --display-xstats tx_good_packets,vadapter_rx_overflow testpmd> port start 0 ... No xstat 'vadapter_rx_overflow' on port 0 - skip it ... testpmd> start tx_first testpmd> show port stats all Value Rate (since last show) tx_good_packets 132545336 1420439 v3: - testpmd: avoid duplicatin xstats resolution - testpmd: remove debug printout - testpmd: add missing const qualifier v2: - address Ferruh review notes on ethdev patches Ivan Ilchenko (11): net/sfc: fix get xstats by ID callback to use MAC stats lock net/sfc: fix reading adapter state without locking ethdev: fix docs of functions getting xstats by IDs ethdev: fix docs of drivers callbacks getting xstats by IDs net/sfc: fix xstats by ID callbacks according to ethdev net/sfc: fix accessing xstats by an unsorted list of IDs net/sfc: fix MAC stats update to work for stopped device net/sfc: simplify getting of available xstats case net/sfc: prepare to add more xstats net/sfc: add xstats for Rx/Tx doorbells app/testpmd: add option to display extended statistics app/test-pmd/cmdline.c | 55 +++ app/test-pmd/config.c | 66 +++ app/test-pmd/parameters.c | 18 + app/test-pmd/testpmd.c | 120 ++++++ app/test-pmd/testpmd.h | 21 + doc/guides/testpmd_app_ug/run_app.rst | 5 + drivers/net/sfc/meson.build | 1 + drivers/net/sfc/sfc.c | 16 + drivers/net/sfc/sfc.h | 18 +- drivers/net/sfc/sfc_dp.h | 10 + drivers/net/sfc/sfc_ef10.h | 3 +- drivers/net/sfc/sfc_ef100_rx.c | 1 + drivers/net/sfc/sfc_ef100_tx.c | 1 + drivers/net/sfc/sfc_ef10_essb_rx.c | 3 +- drivers/net/sfc/sfc_ef10_rx.c | 3 +- drivers/net/sfc/sfc_ef10_tx.c | 1 + drivers/net/sfc/sfc_ethdev.c | 185 +++++---- drivers/net/sfc/sfc_port.c | 127 +++++- drivers/net/sfc/sfc_rx.c | 1 + drivers/net/sfc/sfc_sw_stats.c | 572 ++++++++++++++++++++++++++ drivers/net/sfc/sfc_sw_stats.h | 49 +++ drivers/net/sfc/sfc_tx.c | 4 +- lib/ethdev/ethdev_driver.h | 43 +- lib/ethdev/rte_ethdev.h | 23 +- 24 files changed, 1240 insertions(+), 106 deletions(-) create mode 100644 drivers/net/sfc/sfc_sw_stats.c create mode 100644 drivers/net/sfc/sfc_sw_stats.h -- 2.30.2