mirror of
https://github.com/torvalds/linux.git
synced 2024-12-25 20:32:22 +00:00
RDMA/bnxt_re: Expose rx discards and drop counters
Expose the RoCE discard and drop counters from the HW statistics context Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
bb22c36cba
commit
5c80c9138e
@ -68,6 +68,8 @@ static const char * const bnxt_re_stat_name[] = {
|
||||
[BNXT_RE_TX_PKTS] = "tx_pkts",
|
||||
[BNXT_RE_TX_BYTES] = "tx_bytes",
|
||||
[BNXT_RE_RECOVERABLE_ERRORS] = "recoverable_errors",
|
||||
[BNXT_RE_RX_DROPS] = "rx_roce_drops",
|
||||
[BNXT_RE_RX_DISCARDS] = "rx_roce_discards",
|
||||
[BNXT_RE_TO_RETRANSMITS] = "to_retransmits",
|
||||
[BNXT_RE_SEQ_ERR_NAKS_RCVD] = "seq_err_naks_rcvd",
|
||||
[BNXT_RE_MAX_RETRY_EXCEEDED] = "max_retry_exceeded",
|
||||
@ -128,6 +130,10 @@ int bnxt_re_ib_get_hw_stats(struct ib_device *ibdev,
|
||||
if (bnxt_re_stats) {
|
||||
stats->value[BNXT_RE_RECOVERABLE_ERRORS] =
|
||||
le64_to_cpu(bnxt_re_stats->tx_bcast_pkts);
|
||||
stats->value[BNXT_RE_RX_DROPS] =
|
||||
le64_to_cpu(bnxt_re_stats->rx_drop_pkts);
|
||||
stats->value[BNXT_RE_RX_DISCARDS] =
|
||||
le64_to_cpu(bnxt_re_stats->rx_discard_pkts);
|
||||
stats->value[BNXT_RE_RX_PKTS] =
|
||||
le64_to_cpu(bnxt_re_stats->rx_ucast_pkts);
|
||||
stats->value[BNXT_RE_RX_BYTES] =
|
||||
|
@ -51,6 +51,8 @@ enum bnxt_re_hw_stats {
|
||||
BNXT_RE_TX_PKTS,
|
||||
BNXT_RE_TX_BYTES,
|
||||
BNXT_RE_RECOVERABLE_ERRORS,
|
||||
BNXT_RE_RX_DROPS,
|
||||
BNXT_RE_RX_DISCARDS,
|
||||
BNXT_RE_TO_RETRANSMITS,
|
||||
BNXT_RE_SEQ_ERR_NAKS_RCVD,
|
||||
BNXT_RE_MAX_RETRY_EXCEEDED,
|
||||
|
Loading…
Reference in New Issue
Block a user