summaryrefslogtreecommitdiffstats
path: root/sys/dev/hatm
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-09-19 03:51:26 +0000
committerglebius <glebius@FreeBSD.org>2014-09-19 03:51:26 +0000
commitb3b337a80e78f4cc2d0c75f98e4685bee9c749c9 (patch)
tree6899fa7510de1719ea0a76790446b61cd2d300fe /sys/dev/hatm
parent094cca2b36ac9809749d6a0b76bcd37556939c00 (diff)
downloadFreeBSD-src-b3b337a80e78f4cc2d0c75f98e4685bee9c749c9.zip
FreeBSD-src-b3b337a80e78f4cc2d0c75f98e4685bee9c749c9.tar.gz
Mechanically convert to if_inc_counter().
Diffstat (limited to 'sys/dev/hatm')
-rw-r--r--sys/dev/hatm/if_hatm_rx.c8
-rw-r--r--sys/dev/hatm/if_hatm_tx.c10
2 files changed, 9 insertions, 9 deletions
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);
}
OpenPOWER on IntegriCloud