svn commit: r271863 - head/sys/netinet

Gleb Smirnoff glebius at FreeBSD.org
Fri Sep 19 10:19:51 UTC 2014


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;


More information about the svn-src-all mailing list