diff options
author | Selvin Xavier <selvin.xavier@broadcom.com> | 2018-10-08 13:28:00 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-10-16 09:03:50 +0300 |
commit | 316dd2825db1396304fb3003fad6cf1fef1883a0 (patch) | |
tree | c1b27c60269d1895b388538d77c51df7bfa1c9b9 /drivers/infiniband/hw/bnxt_re/hw_counters.c | |
parent | 5c80c9138e28f600e185d0f23fca5ea7fe45bd95 (diff) | |
download | linux-316dd2825db1396304fb3003fad6cf1fef1883a0.tar.xz |
RDMA/bnxt_re: Report out of sequence hw counters
Expose out of sequence errors received from FW. This counter is a 32 bit
counter and driver has to accumulate the counter. Stores the previous
value for calculating the difference in the next query.
Also, update the HW statistics structure with new fields.
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re/hw_counters.c')
-rw-r--r-- | drivers/infiniband/hw/bnxt_re/hw_counters.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/hw_counters.c b/drivers/infiniband/hw/bnxt_re/hw_counters.c index e63adf2cae19..604b71875f5f 100644 --- a/drivers/infiniband/hw/bnxt_re/hw_counters.c +++ b/drivers/infiniband/hw/bnxt_re/hw_counters.c @@ -108,7 +108,8 @@ static const char * const bnxt_re_stat_name[] = { [BNXT_RE_RES_CQ_LOAD_ERR] = "res_cq_load_err", [BNXT_RE_RES_SRQ_LOAD_ERR] = "res_srq_load_err", [BNXT_RE_RES_TX_PCI_ERR] = "res_tx_pci_err", - [BNXT_RE_RES_RX_PCI_ERR] = "res_rx_pci_err" + [BNXT_RE_RES_RX_PCI_ERR] = "res_rx_pci_err", + [BNXT_RE_OUT_OF_SEQ_ERR] = "oos_drop_count" }; int bnxt_re_ib_get_hw_stats(struct ib_device *ibdev, @@ -226,6 +227,8 @@ int bnxt_re_ib_get_hw_stats(struct ib_device *ibdev, rdev->stats.res_tx_pci_err; stats->value[BNXT_RE_RES_RX_PCI_ERR] = rdev->stats.res_rx_pci_err; + stats->value[BNXT_RE_OUT_OF_SEQ_ERR] = + rdev->stats.res_oos_drop_count; } return ARRAY_SIZE(bnxt_re_stat_name); |