diff options
author | np <np@FreeBSD.org> | 2013-01-29 20:59:22 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2013-01-29 20:59:22 +0000 |
commit | e0b49f90f654c955ca446d082dbd2ffc5d542f1c (patch) | |
tree | 3906fa7606ad0c249a9ae76d5cb57f9f0e5ba473 | |
parent | 7dfeb5c69f71765c4662eeace95c4bbf7c96568a (diff) | |
download | FreeBSD-src-e0b49f90f654c955ca446d082dbd2ffc5d542f1c.zip FreeBSD-src-e0b49f90f654c955ca446d082dbd2ffc5d542f1c.tar.gz |
Provide a statistic to track the number of drops in each of the port's
txq's buf_ring. The aggregate for all the queues of a port is already
provided in ifnet->if_snd.ifq_drops.
MFC after: 3 days.
-rw-r--r-- | sys/dev/cxgbe/t4_main.c | 1 | ||||
-rw-r--r-- | sys/dev/cxgbe/t4_sge.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index c28b75f..c22ec21 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -5533,6 +5533,7 @@ t4_ioctl(struct cdev *dev, unsigned long cmd, caddr_t data, int fflag, txq->txpkt_wrs = 0; txq->txpkts_wrs = 0; txq->txpkts_pkts = 0; + txq->br->br_drops = 0; txq->no_dmamap = 0; txq->no_desc = 0; } diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 62d9eb3..62ceec4 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -2362,6 +2362,8 @@ alloc_txq(struct port_info *pi, struct sge_txq *txq, int idx, SYSCTL_ADD_UQUAD(&pi->ctx, children, OID_AUTO, "txpkts_pkts", CTLFLAG_RD, &txq->txpkts_pkts, "# of frames tx'd using txpkts work requests"); + SYSCTL_ADD_UQUAD(&pi->ctx, children, OID_AUTO, "br_drops", CTLFLAG_RD, + &txq->br->br_drops, "# of drops in the buf_ring for this queue"); SYSCTL_ADD_UINT(&pi->ctx, children, OID_AUTO, "no_dmamap", CTLFLAG_RD, &txq->no_dmamap, 0, "# of times txq ran out of DMA maps"); SYSCTL_ADD_UINT(&pi->ctx, children, OID_AUTO, "no_desc", CTLFLAG_RD, |