svn commit: r193668 - user/kmacy/releng_7_2_fcs/sys/dev/cxgb

Kip Macy kmacy at FreeBSD.org
Sun Jun 7 23:46:30 UTC 2009


Author: kmacy
Date: Sun Jun  7 23:46:29 2009
New Revision: 193668
URL: http://svn.freebsd.org/changeset/base/193668

Log:
  track packets per-txq rather than globally

Modified:
  user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_adapter.h
  user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c

Modified: user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_adapter.h
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_adapter.h	Sun Jun  7 23:38:16 2009	(r193667)
+++ user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_adapter.h	Sun Jun  7 23:46:29 2009	(r193668)
@@ -250,7 +250,9 @@ struct sge_txq {
 	uint32_t        txq_enqueued;
 	uint32_t	txq_dump_start;
 	uint32_t	txq_dump_count;
-	unsigned long   txq_frees;
+	uint64_t	txq_direct_packets;
+	uint64_t	txq_direct_bytes;	
+	uint64_t	txq_frees;
 	struct sg_ent  txq_sgl[TX_MAX_SEGS / 2 + 1];
 };
      	

Modified: user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c	Sun Jun  7 23:38:16 2009	(r193667)
+++ user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c	Sun Jun  7 23:46:29 2009	(r193668)
@@ -1648,9 +1648,10 @@ cxgb_transmit_locked(struct ifnet *ifp, 
 		} else {
 			/*
 			 * We've bypassed the buf ring so we need to update
-			 * ifp directly
+			 * the stats directly
 			 */
-			drbr_stats_update(ifp, m->m_pkthdr.len, m->m_flags);
+			txq->txq_direct_packets++;
+			txq->txq_direct_bytes += m->m_pkthdr.len;
 			/*
 			** Send a copy of the frame to the BPF
 			** listener and set the watchdog on.


More information about the svn-src-user mailing list