From owner-svn-src-head@FreeBSD.ORG Sun Sep 28 07:19:33 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7C1ED2F; Sun, 28 Sep 2014 07:19:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 948E5D1A; Sun, 28 Sep 2014 07:19:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8S7JXP0063907; Sun, 28 Sep 2014 07:19:33 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8S7JXhg063906; Sun, 28 Sep 2014 07:19:33 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409280719.s8S7JXhg063906@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 28 Sep 2014 07:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272238 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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: Sun, 28 Sep 2014 07:19:33 -0000 Author: glebius Date: Sun Sep 28 07:19:32 2014 New Revision: 272238 URL: http://svnweb.freebsd.org/changeset/base/272238 Log: Mechanically switch ixv(4) to if_inc_counter(). Modified: head/sys/dev/ixgbe/ixv.c Modified: head/sys/dev/ixgbe/ixv.c ============================================================================== --- head/sys/dev/ixgbe/ixv.c Sun Sep 28 05:28:11 2014 (r272237) +++ head/sys/dev/ixgbe/ixv.c Sun Sep 28 07:19:32 2014 (r272238) @@ -634,9 +634,9 @@ ixv_mq_start_locked(struct ifnet *ifp, s } drbr_advance(ifp, txr->br); enqueued++; - ifp->if_obytes += next->m_pkthdr.len; + if_inc_counter(ifp, IFCOUNTER_OBYTES, next->m_pkthdr.len); if (next->m_flags & M_MCAST) - ifp->if_omcasts++; + if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); /* Send a copy of the frame to the BPF listener */ ETHER_BPF_MTAP(ifp, next); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) @@ -2651,7 +2651,7 @@ ixv_txeof(struct tx_ring *txr) tx_desc = (struct ixgbe_legacy_tx_desc *)&txr->tx_base[first]; } - ++ifp->if_opackets; + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); /* See if there is more work now */ last = tx_buffer->eop_index; if (last != -1) { @@ -3341,7 +3341,7 @@ ixv_rxeof(struct ix_queue *que, int coun /* Make sure all parts of a bad packet are discarded */ if (((staterr & IXGBE_RXDADV_ERR_FRAME_ERR_MASK) != 0) || (rxr->discard)) { - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); rxr->rx_discarded++; if (!eop) rxr->discard = TRUE; @@ -3455,7 +3455,7 @@ ixv_rxeof(struct ix_queue *que, int coun /* Sending this frame? */ if (eop) { sendmp->m_pkthdr.rcvif = ifp; - ifp->if_ipackets++; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); rxr->rx_packets++; /* capture data for AIM */ rxr->bytes += sendmp->m_pkthdr.len;