From owner-svn-src-all@FreeBSD.ORG Thu Sep 18 20:03:46 2014 Return-Path: Delivered-To: svn-src-all@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 559239D0; Thu, 18 Sep 2014 20:03:46 +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 26E03C68; Thu, 18 Sep 2014 20:03:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8IK3k4p033069; Thu, 18 Sep 2014 20:03:46 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8IK3kr8033068; Thu, 18 Sep 2014 20:03:46 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409182003.s8IK3kr8033068@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:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271803 - head/sys/dev/tl 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:03:46 -0000 Author: glebius Date: Thu Sep 18 20:03:45 2014 New Revision: 271803 URL: http://svnweb.freebsd.org/changeset/base/271803 Log: Mechanically convert to if_inc_counter(). Modified: head/sys/dev/tl/if_tl.c Modified: head/sys/dev/tl/if_tl.c ============================================================================== --- head/sys/dev/tl/if_tl.c Thu Sep 18 20:00:36 2014 (r271802) +++ head/sys/dev/tl/if_tl.c Thu Sep 18 20:03:45 2014 (r271803) @@ -1430,7 +1430,7 @@ tl_intvec_rxeof(xsc, type) total_len = cur_rx->tl_ptr->tlist_frsize; if (tl_newbuf(sc, cur_rx) == ENOBUFS) { - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); cur_rx->tl_ptr->tlist_frsize = MCLBYTES; cur_rx->tl_ptr->tlist_cstat = TL_CSTAT_READY; cur_rx->tl_ptr->tl_frag.tlist_dcnt = MCLBYTES; @@ -1726,13 +1726,13 @@ tl_stats_update(xsc) *p++ = CSR_READ_4(sc, TL_DIO_DATA); *p++ = CSR_READ_4(sc, TL_DIO_DATA); - ifp->if_opackets += tl_tx_goodframes(tl_stats); - ifp->if_collisions += tl_stats.tl_tx_single_collision + - tl_stats.tl_tx_multi_collision; - ifp->if_ipackets += tl_rx_goodframes(tl_stats); - ifp->if_ierrors += tl_stats.tl_crc_errors + tl_stats.tl_code_errors + - tl_rx_overrun(tl_stats); - ifp->if_oerrors += tl_tx_underrun(tl_stats); + if_inc_counter(ifp, IFCOUNTER_OPACKETS, tl_tx_goodframes(tl_stats)); + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, + tl_stats.tl_tx_single_collision + tl_stats.tl_tx_multi_collision); + if_inc_counter(ifp, IFCOUNTER_IPACKETS, tl_rx_goodframes(tl_stats)); + if_inc_counter(ifp, IFCOUNTER_IERRORS, tl_stats.tl_crc_errors + + tl_stats.tl_code_errors + tl_rx_overrun(tl_stats)); + if_inc_counter(ifp, IFCOUNTER_OERRORS, tl_tx_underrun(tl_stats)); if (tl_tx_underrun(tl_stats)) { u_int8_t tx_thresh; @@ -2186,7 +2186,7 @@ tl_watchdog(sc) if_printf(ifp, "device timeout\n"); - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); tl_softreset(sc, 1); tl_init_locked(sc);