svn commit: r246093 - head/sys/dev/cxgbe

Navdeep Parhar np at FreeBSD.org
Tue Jan 29 20:59:23 UTC 2013


Author: np
Date: Tue Jan 29 20:59:22 2013
New Revision: 246093
URL: http://svnweb.freebsd.org/changeset/base/246093

Log:
  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.

Modified:
  head/sys/dev/cxgbe/t4_main.c
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c	Tue Jan 29 20:28:11 2013	(r246092)
+++ head/sys/dev/cxgbe/t4_main.c	Tue Jan 29 20:59:22 2013	(r246093)
@@ -5533,6 +5533,7 @@ t4_ioctl(struct cdev *dev, unsigned long
 				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;
 			}

Modified: head/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- head/sys/dev/cxgbe/t4_sge.c	Tue Jan 29 20:28:11 2013	(r246092)
+++ head/sys/dev/cxgbe/t4_sge.c	Tue Jan 29 20:59:22 2013	(r246093)
@@ -2362,6 +2362,8 @@ alloc_txq(struct port_info *pi, struct s
 	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,


More information about the svn-src-head mailing list