From owner-svn-src-head@FreeBSD.ORG Thu Sep 18 20:24:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E2CAEC7; Thu, 18 Sep 2014 20:24:48 +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 5EFBBEB1; Thu, 18 Sep 2014 20:24:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8IKOmv0043590; Thu, 18 Sep 2014 20:24:48 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8IKOmcU043588; Thu, 18 Sep 2014 20:24:48 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409182024.s8IKOmcU043588@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:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271813 - head/sys/dev/pcn 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 20:24:48 -0000 Author: glebius Date: Thu Sep 18 20:24:47 2014 New Revision: 271813 URL: http://svnweb.freebsd.org/changeset/base/271813 Log: Mechanically convert to if_inc_counter(). Modified: head/sys/dev/pcn/if_pcn.c Modified: head/sys/dev/pcn/if_pcn.c ============================================================================== --- head/sys/dev/pcn/if_pcn.c Thu Sep 18 20:23:34 2014 (r271812) +++ head/sys/dev/pcn/if_pcn.c Thu Sep 18 20:24:47 2014 (r271813) @@ -856,7 +856,7 @@ pcn_rxeof(sc) * comes up in the ring. */ if (cur_rx->pcn_rxstat & PCN_RXSTAT_ERR) { - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); pcn_newbuf(sc, i, m); PCN_INC(i, PCN_RX_LIST_CNT); continue; @@ -865,7 +865,7 @@ pcn_rxeof(sc) if (pcn_newbuf(sc, i, NULL)) { /* Ran out of mbufs; recycle this one. */ pcn_newbuf(sc, i, m); - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); PCN_INC(i, PCN_RX_LIST_CNT); continue; } @@ -873,7 +873,7 @@ pcn_rxeof(sc) PCN_INC(i, PCN_RX_LIST_CNT); /* No errors; receive the packet. */ - ifp->if_ipackets++; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); m->m_len = m->m_pkthdr.len = cur_rx->pcn_rxlen - ETHER_CRC_LEN; m->m_pkthdr.rcvif = ifp; @@ -921,17 +921,17 @@ pcn_txeof(sc) } if (cur_tx->pcn_txctl & PCN_TXCTL_ERR) { - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); if (cur_tx->pcn_txstat & PCN_TXSTAT_EXDEF) - ifp->if_collisions++; + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1); if (cur_tx->pcn_txstat & PCN_TXSTAT_RTRY) - ifp->if_collisions++; + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1); } - ifp->if_collisions += - cur_tx->pcn_txstat & PCN_TXSTAT_TRC; + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, + cur_tx->pcn_txstat & PCN_TXSTAT_TRC); - ifp->if_opackets++; + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); if (sc->pcn_cdata.pcn_tx_chain[idx] != NULL) { m_freem(sc->pcn_cdata.pcn_tx_chain[idx]); sc->pcn_cdata.pcn_tx_chain[idx] = NULL; @@ -1436,7 +1436,7 @@ pcn_watchdog(struct pcn_softc *sc) PCN_LOCK_ASSERT(sc); ifp = sc->pcn_ifp; - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); if_printf(ifp, "watchdog timeout\n"); pcn_stop(sc);