From owner-svn-src-head@FreeBSD.ORG Thu Sep 18 21:14:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BC68911; Thu, 18 Sep 2014 21:14:47 +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 4CD0C6E4; Thu, 18 Sep 2014 21:14:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8ILElI3069489; Thu, 18 Sep 2014 21:14:47 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ILElwh069488; Thu, 18 Sep 2014 21:14:47 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409182114.s8ILElwh069488@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 18 Sep 2014 21:14:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271836 - head/sys/dev/cs 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: Thu, 18 Sep 2014 21:14:47 -0000 Author: glebius Date: Thu Sep 18 21:14:46 2014 New Revision: 271836 URL: http://svnweb.freebsd.org/changeset/base/271836 Log: Mechanically convert to if_inc_counter(). Modified: head/sys/dev/cs/if_cs.c Modified: head/sys/dev/cs/if_cs.c ============================================================================== --- head/sys/dev/cs/if_cs.c Thu Sep 18 21:13:12 2014 (r271835) +++ head/sys/dev/cs/if_cs.c Thu Sep 18 21:14:46 2014 (r271836) @@ -707,7 +707,7 @@ cs_get_packet(struct cs_softc *sc) #ifdef CS_DEBUG device_printf(sc->dev, "bad pkt stat %x\n", status); #endif - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); return (-1); } @@ -742,7 +742,7 @@ cs_get_packet(struct cs_softc *sc) (ifp->if_flags & IFF_MULTICAST && status & RX_HASHED)) { /* Feed the packet to the upper layer */ (*ifp->if_input)(ifp, m); - ifp->if_ipackets++; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); if (length == ETHER_MAX_LEN-ETHER_CRC_LEN) DELAY(cs_recv_delay); } else { @@ -780,9 +780,9 @@ csintr(void *arg) case ISQ_TRANSMITTER_EVENT: if (status & TX_OK) - ifp->if_opackets++; + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); else - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->tx_timeout = 0; break; @@ -796,16 +796,16 @@ csintr(void *arg) if (status & TX_UNDERRUN) { ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->tx_timeout = 0; - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); } break; case ISQ_RX_MISS_EVENT: - ifp->if_ierrors+=(status>>6); + if_inc_counter(ifp, IFCOUNTER_IERRORS, status >> 6); break; case ISQ_TX_COL_EVENT: - ifp->if_collisions+=(status>>6); + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, status >> 6); break; } } @@ -1114,7 +1114,7 @@ cs_watchdog(void *arg) CS_ASSERT_LOCKED(sc); if (sc->tx_timeout && --sc->tx_timeout == 0) { - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); log(LOG_ERR, "%s: device timeout\n", ifp->if_xname); /* Reset the interface */