aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hatm
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2014-09-19 03:51:26 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2014-09-19 03:51:26 +0000
commitc8dfaf382fa6df9dc6fd1e1c3356e0c8bf607e6a (patch)
tree6899fa7510de1719ea0a76790446b61cd2d300fe /sys/dev/hatm
parentd3c24fcffe1e1fab13dd9763580f96fac214e36d (diff)
Notes
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 bf17294df211..af0b925410ff 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 8e03e9d55cb6..d0a28bad679a 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);
}