Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Sep 2014 07:19:33 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272238 - head/sys/dev/ixgbe
Message-ID:  <201409280719.s8S7JXhg063906@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



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