aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ce
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/ce
parentd3c24fcffe1e1fab13dd9763580f96fac214e36d (diff)
Notes
Diffstat (limited to 'sys/dev/ce')
-rw-r--r--sys/dev/ce/if_ce.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/ce/if_ce.c b/sys/dev/ce/if_ce.c
index 6d77a1cd6d0d..6c5b7bb21a18 100644
--- a/sys/dev/ce/if_ce.c
+++ b/sys/dev/ce/if_ce.c
@@ -1097,7 +1097,7 @@ static void ce_transmit (ce_chan_t *c, void *attachment, int len)
d->timeout = 0;
#ifndef NETGRAPH
- ++d->ifp->if_opackets;
+ if_inc_counter(d->ifp, IFCOUNTER_OPACKETS, 1);
#if __FreeBSD_version >= 600034
d->ifp->if_flags &= ~IFF_DRV_OACTIVE;
#else
@@ -1119,7 +1119,7 @@ static void ce_receive (ce_chan_t *c, unsigned char *data, int len)
if (! m) {
CE_DEBUG (d, ("no memory for packet\n"));
#ifndef NETGRAPH
- ++d->ifp->if_iqdrops;
+ if_inc_counter(d->ifp, IFCOUNTER_IQDROPS, 1);
#endif
return;
}
@@ -1129,7 +1129,7 @@ static void ce_receive (ce_chan_t *c, unsigned char *data, int len)
m->m_pkthdr.rcvif = 0;
IF_ENQUEUE(&d->rqueue, m);
#else
- ++d->ifp->if_ipackets;
+ if_inc_counter(d->ifp, IFCOUNTER_IPACKETS, 1);
m->m_pkthdr.rcvif = d->ifp;
/* Check if there's a BPF listener on this interface.
* If so, hand off the raw packet to bpf. */
@@ -1151,33 +1151,33 @@ static void ce_error (ce_chan_t *c, int data)
case CE_FRAME:
CE_DEBUG (d, ("frame error\n"));
#ifndef NETGRAPH
- ++d->ifp->if_ierrors;
+ if_inc_counter(d->ifp, IFCOUNTER_IERRORS, 1);
#endif
break;
case CE_CRC:
CE_DEBUG (d, ("crc error\n"));
#ifndef NETGRAPH
- ++d->ifp->if_ierrors;
+ if_inc_counter(d->ifp, IFCOUNTER_IERRORS, 1);
#endif
break;
case CE_OVERRUN:
CE_DEBUG (d, ("overrun error\n"));
#ifndef NETGRAPH
- ++d->ifp->if_collisions;
- ++d->ifp->if_ierrors;
+ if_inc_counter(d->ifp, IFCOUNTER_COLLISIONS, 1);
+ if_inc_counter(d->ifp, IFCOUNTER_IERRORS, 1);
#endif
break;
case CE_OVERFLOW:
CE_DEBUG (d, ("overflow error\n"));
#ifndef NETGRAPH
- ++d->ifp->if_ierrors;
+ if_inc_counter(d->ifp, IFCOUNTER_IERRORS, 1);
#endif
break;
case CE_UNDERRUN:
CE_DEBUG (d, ("underrun error\n"));
d->timeout = 0;
#ifndef NETGRAPH
- ++d->ifp->if_oerrors;
+ if_inc_counter(d->ifp, IFCOUNTER_OERRORS, 1);
#if __FreeBSD_version >= 600034
d->ifp->if_flags &= ~IFF_DRV_OACTIVE;
#else