From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 07:04:29 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 875101065692; Fri, 17 Oct 2008 07:04:29 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 664918FC16; Fri, 17 Oct 2008 07:04:29 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9H74TlQ081106; Fri, 17 Oct 2008 07:04:29 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9H74TYZ081105; Fri, 17 Oct 2008 07:04:29 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200810170704.m9H74TYZ081105@svn.freebsd.org> From: Kip Macy Date: Fri, 17 Oct 2008 07:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183967 - head/sys/dev/cxgb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2008 07:04:29 -0000 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