From 32c7c51c2a2519e364f779d37e9bd8ad9fcfaba6 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Fri, 19 Sep 2014 10:19:51 +0000 Subject: [PATCH] Mechanically convert to if_inc_counter(). --- sys/netinet/ip_gre.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c index 21a665a99e2..53fecabf1b2 100644 --- a/sys/netinet/ip_gre.c +++ b/sys/netinet/ip_gre.c @@ -142,8 +142,8 @@ gre_input2(struct mbuf *m ,int hlen, u_char proto) } 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 *offp, int proto) 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;