From owner-svn-src-all@FreeBSD.ORG Fri Sep 19 09:19:31 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 2B96FBAE; Fri, 19 Sep 2014 09:19:31 +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 F0EA224D; Fri, 19 Sep 2014 09:19:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8J9JUcl005390; Fri, 19 Sep 2014 09:19:30 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8J9JUkl005388; Fri, 19 Sep 2014 09:19:30 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409190919.s8J9JUkl005388@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 09:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271857 - head/sys/netpfil/pf 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: Fri, 19 Sep 2014 09:19:31 -0000 Author: glebius Date: Fri Sep 19 09:19:29 2014 New Revision: 271857 URL: http://svnweb.freebsd.org/changeset/base/271857 Log: Mechanically convert to if_inc_counter(). Modified: head/sys/netpfil/pf/if_pflog.c head/sys/netpfil/pf/if_pfsync.c Modified: head/sys/netpfil/pf/if_pflog.c ============================================================================== --- head/sys/netpfil/pf/if_pflog.c Fri Sep 19 09:01:19 2014 (r271856) +++ head/sys/netpfil/pf/if_pflog.c Fri Sep 19 09:19:29 2014 (r271857) @@ -252,8 +252,8 @@ pflog_packet(struct pfi_kif *kif, struct } #endif /* INET */ - ifn->if_opackets++; - ifn->if_obytes += m->m_pkthdr.len; + if_inc_counter(ifn, IFCOUNTER_OPACKETS, 1); + if_inc_counter(ifn, IFCOUNTER_OBYTES, m->m_pkthdr.len); BPF_MTAP2(ifn, &hdr, PFLOG_HDRLEN, m); return (0); Modified: head/sys/netpfil/pf/if_pfsync.c ============================================================================== --- head/sys/netpfil/pf/if_pfsync.c Fri Sep 19 09:01:19 2014 (r271856) +++ head/sys/netpfil/pf/if_pfsync.c Fri Sep 19 09:19:29 2014 (r271857) @@ -598,8 +598,8 @@ pfsync_input(struct mbuf **mp, int *offp goto done; } - sc->sc_ifp->if_ipackets++; - sc->sc_ifp->if_ibytes += m->m_pkthdr.len; + if_inc_counter(sc->sc_ifp, IFCOUNTER_IPACKETS, 1); + if_inc_counter(sc->sc_ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len); /* verify that the IP TTL is 255. */ if (ip->ip_ttl != PFSYNC_DFLTTL) { V_pfsyncstats.pfsyncs_badttl++; @@ -1525,7 +1525,7 @@ pfsync_sendout(int schedswi) m = m_get2(max_linkhdr + sc->sc_len, M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { - sc->sc_ifp->if_oerrors++; + if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, 1); V_pfsyncstats.pfsyncs_onomem++; return; } @@ -1632,15 +1632,15 @@ pfsync_sendout(int schedswi) return; } - sc->sc_ifp->if_opackets++; - sc->sc_ifp->if_obytes += m->m_pkthdr.len; + if_inc_counter(sc->sc_ifp, IFCOUNTER_OPACKETS, 1); + if_inc_counter(sc->sc_ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len); sc->sc_len = PFSYNC_MINPKT; if (!_IF_QFULL(&sc->sc_ifp->if_snd)) _IF_ENQUEUE(&sc->sc_ifp->if_snd, m); else { m_freem(m); - sc->sc_ifp->if_oqdrops++; + if_inc_counter(sc->sc_ifp, IFCOUNTER_OQDROPS, 1); } if (schedswi) swi_sched(V_pfsync_swi_cookie, 0);