From owner-svn-src-all@FreeBSD.ORG Fri Sep 19 10:19:51 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 D129A7A3; Fri, 19 Sep 2014 10:19:51 +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 BC92DCBE; Fri, 19 Sep 2014 10:19:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8JAJpcs033867; Fri, 19 Sep 2014 10:19:51 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8JAJpnn033866; Fri, 19 Sep 2014 10:19:51 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409191019.s8JAJpnn033866@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:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271863 - head/sys/netinet 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 10:19:51 -0000 Author: glebius Date: Fri Sep 19 10:19:51 2014 New Revision: 271863 URL: http://svnweb.freebsd.org/changeset/base/271863 Log: Mechanically convert to if_inc_counter(). Modified: head/sys/netinet/ip_gre.c Modified: head/sys/netinet/ip_gre.c ============================================================================== --- head/sys/netinet/ip_gre.c Fri Sep 19 10:18:14 2014 (r271862) +++ head/sys/netinet/ip_gre.c Fri Sep 19 10:19:51 2014 (r271863) @@ -142,8 +142,8 @@ gre_input2(struct mbuf *m ,int hlen, u_c } gip = mtod(m, struct greip *); - GRE2IFP(sc)->if_ipackets++; - GRE2IFP(sc)->if_ibytes += m->m_pkthdr.len; + if_inc_counter(GRE2IFP(sc), IFCOUNTER_IPACKETS, 1); + if_inc_counter(GRE2IFP(sc), IFCOUNTER_IBYTES, m->m_pkthdr.len); switch (proto) { case IPPROTO_GRE: @@ -243,8 +243,8 @@ gre_mobile_input(struct mbuf **mp, int * ip = mtod(m, struct ip *); mip = mtod(m, struct mobip_h *); - GRE2IFP(sc)->if_ipackets++; - GRE2IFP(sc)->if_ibytes += m->m_pkthdr.len; + if_inc_counter(GRE2IFP(sc), IFCOUNTER_IPACKETS, 1); + if_inc_counter(GRE2IFP(sc), IFCOUNTER_IBYTES, m->m_pkthdr.len); if (ntohs(mip->mh.proto) & MOB_H_SBIT) { msiz = MOB_H_SIZ_L;