Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Oct 2008 07:04:29 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r183967 - head/sys/dev/cxgb
Message-ID:  <200810170704.m9H74TYZ081105@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Fri Oct 17 07:04:29 2008
New Revision: 183967
URL: http://svn.freebsd.org/changeset/base/183967

Log:
  Track number of packets transmitted and number of packets received
  
  PR:	125806
  MFC after:	3 days

Modified:
  head/sys/dev/cxgb/cxgb_sge.c

Modified: head/sys/dev/cxgb/cxgb_sge.c
==============================================================================
--- head/sys/dev/cxgb/cxgb_sge.c	Fri Oct 17 05:26:51 2008	(r183966)
+++ head/sys/dev/cxgb/cxgb_sge.c	Fri Oct 17 07:04:29 2008	(r183967)
@@ -1887,7 +1887,11 @@ t3_free_tx_desc(struct sge_txq *q, int r
 			m_freem_iovec(&txsd->mi);	
 			buf_ring_scan(&q->txq_mr, txsd->mi.mi_base, __FILE__, __LINE__);
 			txsd->mi.mi_base = NULL;
-
+			/*
+			 * XXX check for cache hit rate here
+			 *
+			 */
+			q->port->ifp->if_opackets++;
 #if defined(DIAGNOSTIC) && 0
 			if (m_get_priority(txsd->m[0]) != cidx) 
 				printf("pri=%d cidx=%d\n",
@@ -2505,6 +2509,7 @@ t3_rx_eth(struct adapter *adap, struct s
 	
 	m->m_pkthdr.rcvif = ifp;
 	m->m_pkthdr.header = mtod(m, uint8_t *) + sizeof(*cpl) + ethpad;
+	ifp->if_ipackets++;
 #ifndef DISABLE_MBUF_IOVEC
 	m_explode(m);
 #endif	



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810170704.m9H74TYZ081105>