From owner-svn-src-head@FreeBSD.ORG Fri Sep 19 10:33:24 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 22D28B83; Fri, 19 Sep 2014 10:33:24 +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 E89C7E5C; Fri, 19 Sep 2014 10:33:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8JAXNFk042327; Fri, 19 Sep 2014 10:33:23 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8JAXNY4042326; Fri, 19 Sep 2014 10:33:23 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409191033.s8JAXNY4042326@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 19 Sep 2014 10:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271865 - head/sys/dev/rl 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: Fri, 19 Sep 2014 10:33:24 -0000 Author: glebius Date: Fri Sep 19 10:33:23 2014 New Revision: 271865 URL: http://svnweb.freebsd.org/changeset/base/271865 Log: Mechanically convert to if_inc_counter(). Modified: head/sys/dev/rl/if_rl.c Modified: head/sys/dev/rl/if_rl.c ============================================================================== --- head/sys/dev/rl/if_rl.c Fri Sep 19 10:32:20 2014 (r271864) +++ head/sys/dev/rl/if_rl.c Fri Sep 19 10:33:23 2014 (r271865) @@ -1166,7 +1166,7 @@ rl_rxeof(struct rl_softc *sc) if (!(rxstat & RL_RXSTAT_RXOK) || total_len < ETHER_MIN_LEN || total_len > ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN) { - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; rl_init_locked(sc); return (rx_npkts); @@ -1215,11 +1215,11 @@ rl_rxeof(struct rl_softc *sc) CSR_WRITE_2(sc, RL_CURRXADDR, cur_rx - 16); if (m == NULL) { - ifp->if_iqdrops++; + if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); continue; } - ifp->if_ipackets++; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); RL_UNLOCK(sc); (*ifp->if_input)(ifp, m); RL_LOCK(sc); @@ -1254,7 +1254,7 @@ rl_txeof(struct rl_softc *sc) RL_TXSTAT_TX_UNDERRUN|RL_TXSTAT_TXABRT))) break; - ifp->if_collisions += (txstat & RL_TXSTAT_COLLCNT) >> 24; + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, (txstat & RL_TXSTAT_COLLCNT) >> 24); bus_dmamap_sync(sc->rl_cdata.rl_tx_tag, RL_LAST_DMAMAP(sc), BUS_DMASYNC_POSTWRITE); @@ -1270,10 +1270,10 @@ rl_txeof(struct rl_softc *sc) (sc->rl_txthresh < 2016)) sc->rl_txthresh += 32; if (txstat & RL_TXSTAT_TX_OK) - ifp->if_opackets++; + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); else { int oldthresh; - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); if ((txstat & RL_TXSTAT_TXABRT) || (txstat & RL_TXSTAT_OUTOFWIN)) CSR_WRITE_4(sc, RL_TXCFG, RL_TXCFG_CONFIG); @@ -1897,7 +1897,7 @@ rl_watchdog(struct rl_softc *sc) return; device_printf(sc->rl_dev, "watchdog timeout\n"); - sc->rl_ifp->if_oerrors++; + if_inc_counter(sc->rl_ifp, IFCOUNTER_OERRORS, 1); rl_txeof(sc); rl_rxeof(sc);