From owner-svn-src-all@FreeBSD.ORG Thu Sep 18 20:11:28 2014 Return-Path: Delivered-To: svn-src-all@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 AE2B11BD; Thu, 18 Sep 2014 20:11:28 +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 7F4BFCE3; Thu, 18 Sep 2014 20:11:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8IKBSth037242; Thu, 18 Sep 2014 20:11:28 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8IKBSJf037241; Thu, 18 Sep 2014 20:11:28 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409182011.s8IKBSJf037241@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 20:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271806 - head/sys/dev/ep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 20:11:28 -0000 Author: glebius Date: Thu Sep 18 20:11:28 2014 New Revision: 271806 URL: http://svnweb.freebsd.org/changeset/base/271806 Log: Mechanically convert to if_inc_counter(). Modified: head/sys/dev/ep/if_ep.c Modified: head/sys/dev/ep/if_ep.c ============================================================================== --- head/sys/dev/ep/if_ep.c Thu Sep 18 20:09:35 2014 (r271805) +++ head/sys/dev/ep/if_ep.c Thu Sep 18 20:11:28 2014 (r271806) @@ -512,7 +512,7 @@ startagain: */ if (len + pad > ETHER_MAX_LEN) { /* packet is obviously too large: toss it */ - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); m_freem(m0); goto readcheck; } @@ -564,7 +564,7 @@ startagain: BPF_MTAP(ifp, m0); sc->tx_timer = 2; - ifp->if_opackets++; + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); m_freem(m0); /* @@ -640,7 +640,8 @@ rescan: CSR_READ_2(sc, EP_W4_FIFO_DIAG)); printf("\tStat: %x\n", sc->stat); printf("\tIpackets=%d, Opackets=%d\n", - ifp->if_ipackets, ifp->if_opackets); + ifp->if_get_counter(ifp, IFCOUNTER_IPACKETS), + ifp->if_get_counter(ifp, IFCOUNTER_OPACKETS)); printf("\tNOF=%d, NOMB=%d, RXOF=%d, RXOL=%d, TXU=%d\n", sc->rx_no_first, sc->rx_no_mbuf, sc->rx_overrunf, sc->rx_overrunl, sc->tx_underrun); @@ -650,7 +651,7 @@ rescan: device_printf(sc->dev, "Status: %x (input buffer overflow)\n", status); #else - ++ifp->if_ierrors; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); #endif #endif @@ -683,9 +684,9 @@ rescan: * TXS_MAX_COLLISION we * shouldn't get here */ - ++ifp->if_collisions; + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1); } - ++ifp->if_oerrors; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); CSR_WRITE_2(sc, EP_COMMAND, TX_ENABLE); /* * To have a tx_avail_int but giving @@ -731,7 +732,7 @@ epread(struct ep_softc *sc) read_again: if (status & ERR_RX) { - ++ifp->if_ierrors; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); if (status & ERR_RX_OVERRUN) { /* * We can think the rx latency is actually @@ -829,7 +830,7 @@ read_again: return; } CSR_WRITE_2(sc, EP_COMMAND, RX_DISCARD_TOP_PACK); - ++ifp->if_ipackets; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); EP_FSET(sc, F_RX_FIRST); top->m_pkthdr.rcvif = sc->ifp; top->m_pkthdr.len = sc->cur_len;