svn commit: r183967 - head/sys/dev/cxgb
Kip Macy
kmacy at FreeBSD.org
Fri Oct 17 07:04:29 UTC 2008
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
More information about the svn-src-head
mailing list