net/bnxt: add flow stats in extended stats
authorSomnath Kotur <somnath.kotur@broadcom.com>
Thu, 16 Apr 2020 04:27:01 +0000 (21:27 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:09 +0000 (13:57 +0200)
commit02a95625fe9c23dd7fb4cd7e4175c51db695be27
treed02bdb11881430942e1be519e2486bee45cbea4b
parent5f9374de2a3ae61662765583db95585c012a0086
net/bnxt: add flow stats in extended stats

This patch allows to display flow stats in extended stats.
To do this, DMA-able memory is registered with the FW during device
initialization. Then the driver uses an alarm thread to query the
per flow stats using the HWRM_CFA_COUNTER_QSTATS HWRM command at
regular intervals and stores it locally which will be displayed
when the application queries the xstats.
The DMA-able memory is unregistered during driver cleanup.
This functionality can be enabled using the flow-xstat devarg and
will be disabled by default. The intention behind this is to allow
stats to be displayed for all the flows in one shot instead of
querying one at a time.

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
doc/guides/rel_notes/release_20_05.rst
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/bnxt_filter.h
drivers/net/bnxt/bnxt_flow.c
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_hwrm.h
drivers/net/bnxt/bnxt_stats.c
drivers/net/bnxt/hsi_struct_def_dpdk.h