]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Show fault stats in both TX and RX directions
authorMitko Haralanov <mitko.haralanov@intel.com>
Thu, 1 Feb 2018 18:52:43 +0000 (10:52 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 1 Feb 2018 22:43:31 +0000 (15:43 -0700)
commitc67204a5279f3cdf71ae5ade7f1a03061512f7ea
tree1b81d3e6fe3740fd94ccc6b9b51134855e46d525
parent8b75060c05cf2676514cb4f99d31feb7b88b0e6b
IB/hfi1: Show fault stats in both TX and RX directions

The routine which shows the fault stats checks the counters
to determine whether to show any stats based on the number of
transmitted pkts/bytes for a particular opcode.

Unfortunately, it only checked the receive counters. As a result,
if any packet faults have happened for packets egressing the HFI,
those stats would not be shown.

In order to fix this, the routine is amended to also check the
TX counters. With this change the pkt/byte counts are the sum of
both TX and RX counts for the opcode.

Fixes: c5aff62c0a0e ("IB/hfi1: Add tx_opcode_stats like the opcode_stats")
Reviewed-by: Don Hiatt <don.hiatt@intel.com>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/debugfs.c