summaryrefslogtreecommitdiff
path: root/sys/dev/re
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/re
parentd3c24fcffe1e1fab13dd9763580f96fac214e36d (diff)
Notes
Diffstat (limited to 'sys/dev/re')
-rw-r--r--sys/dev/re/if_re.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index e7f1361b4967..7068e6f4af78 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -2241,7 +2241,7 @@ re_rxeof(struct rl_softc *sc, int *rx_npktsp)
(rxstat & RL_RDESC_STAT_ERRS) == RL_RDESC_STAT_GIANT)
rxerr = 0;
if (rxerr != 0) {
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
/*
* If this is part of a multi-fragment packet,
* discard all the pieces.
@@ -2264,7 +2264,7 @@ re_rxeof(struct rl_softc *sc, int *rx_npktsp)
else
rxerr = re_newbuf(sc, i);
if (rxerr != 0) {
- ifp->if_iqdrops++;
+ if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
if (sc->rl_head != NULL) {
m_freem(sc->rl_head);
sc->rl_head = sc->rl_tail = NULL;
@@ -2306,7 +2306,7 @@ re_rxeof(struct rl_softc *sc, int *rx_npktsp)
#ifdef RE_FIXUP_RX
re_fixup_rx(m);
#endif
- ifp->if_ipackets++;
+ if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
m->m_pkthdr.rcvif = ifp;
/* Do RX checksumming if enabled */
@@ -2425,11 +2425,11 @@ re_txeof(struct rl_softc *sc)
txd->tx_m = NULL;
if (txstat & (RL_TDESC_STAT_EXCESSCOL|
RL_TDESC_STAT_COLCNT))
- ifp->if_collisions++;
+ if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1);
if (txstat & RL_TDESC_STAT_TXERRSUM)
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
else
- ifp->if_opackets++;
+ if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
}
sc->rl_ldata.rl_tx_free++;
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
@@ -3539,7 +3539,7 @@ re_watchdog(struct rl_softc *sc)
}
if_printf(ifp, "watchdog timeout\n");
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
re_rxeof(sc, NULL);
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;