From b3b337a80e78f4cc2d0c75f98e4685bee9c749c9 Mon Sep 17 00:00:00 2001 From: glebius Date: Fri, 19 Sep 2014 03:51:26 +0000 Subject: Mechanically convert to if_inc_counter(). --- sys/dev/hatm/if_hatm_rx.c | 8 ++++---- sys/dev/hatm/if_hatm_tx.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'sys/dev/hatm') diff --git a/sys/dev/hatm/if_hatm_rx.c b/sys/dev/hatm/if_hatm_rx.c index bf17294..af0b925 100644 --- a/sys/dev/hatm/if_hatm_rx.c +++ b/sys/dev/hatm/if_hatm_rx.c @@ -149,7 +149,7 @@ hatm_rx(struct hatm_softc *sc, u_int cid, u_int flags, struct mbuf *m0, m_freem(vcc->chain); vcc->chain = vcc->last = NULL; sc->istats.crc_error++; - sc->ifp->if_ierrors++; + if_inc_counter(sc->ifp, IFCOUNTER_IERRORS, 1); return; } if (flags & HE_REGM_RBRQ_LEN_ERROR) { @@ -157,7 +157,7 @@ hatm_rx(struct hatm_softc *sc, u_int cid, u_int flags, struct mbuf *m0, m_freem(vcc->chain); vcc->chain = vcc->last = NULL; sc->istats.len_error++; - sc->ifp->if_ierrors++; + if_inc_counter(sc->ifp, IFCOUNTER_IERRORS, 1); return; } @@ -240,9 +240,9 @@ hatm_rx(struct hatm_softc *sc, u_int cid, u_int flags, struct mbuf *m0, ATM_PH_VPI(&aph) = vpi; ATM_PH_SETVCI(&aph, vci); - sc->ifp->if_ipackets++; + if_inc_counter(sc->ifp, IFCOUNTER_IPACKETS, 1); /* this is in if_atmsubr.c */ - /* sc->ifp->if_ibytes += len; */ + /* if_inc_counter(sc->ifp, IFCOUNTER_IBYTES, len); */ vcc->ibytes += len; vcc->ipackets++; diff --git a/sys/dev/hatm/if_hatm_tx.c b/sys/dev/hatm/if_hatm_tx.c index 8e03e9d..d0a28ba 100644 --- a/sys/dev/hatm/if_hatm_tx.c +++ b/sys/dev/hatm/if_hatm_tx.c @@ -452,7 +452,7 @@ hatm_start(struct ifnet *ifp) if ((tpd = hatm_alloc_tpd(sc, M_NOWAIT)) == NULL) { hatm_free_txmbuf(sc); m_freem(m); - sc->ifp->if_oerrors++; + if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); continue; } tpd->cid = cid; @@ -472,7 +472,7 @@ hatm_start(struct ifnet *ifp) tpd->mbuf = NULL; hatm_free_txmbuf(sc); hatm_free_tpd(sc, tpd); - sc->ifp->if_oerrors++; + if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); continue; } arg.mbuf = m; @@ -484,17 +484,17 @@ hatm_start(struct ifnet *ifp) if_printf(sc->ifp, "mbuf loaded error=%d\n", error); hatm_free_tpd(sc, tpd); - sc->ifp->if_oerrors++; + if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); continue; } if (arg.error) { hatm_free_tpd(sc, tpd); - sc->ifp->if_oerrors++; + if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); continue; } arg.vcc->opackets++; arg.vcc->obytes += len; - sc->ifp->if_opackets++; + if_inc_counter(sc->ifp, IFCOUNTER_OPACKETS, 1); } mtx_unlock(&sc->mtx); } -- cgit v1.1