net/bnxt: refactor the query stats
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 1 Jun 2017 17:07:13 +0000 (12:07 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 12 Jun 2017 09:41:28 +0000 (10:41 +0100)
commit577d3dced0dc3c5773b770f501a09fc357c64646
treebe362f0f2ffc34f4f611e77be5f3f7443a85b0fd
parent3e12fdb78e82297d79d356b7870aecfe18a63df7
net/bnxt: refactor the query stats

1) Use hwrm_stat_ctx_query command to query statistics
   Using hwrm_stat_ctx_query command will allow polling
   the statistics from hardware instead of using the current push
   model from the hardware which does a DMA of the stats to the host
   at fixed intervals.

2) Use the rx_mbuf_alloc_fail to track mbuf alloc failures.

3) We were wrongly incrementing hwrm_cmd_seq in bnxt_hwrm_stat_clear
   and bnxt_hwrm_stat_ctx_alloc functions.  This patch fixes that.

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_hwrm.h
drivers/net/bnxt/bnxt_rxr.c
drivers/net/bnxt/bnxt_stats.c