summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_vic.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-05-31 06:46:13 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-05-31 06:46:13 +0000
commit850db274bbcb76df23ac406771570411f17474dc (patch)
treec254c39fdbce95450b37f8488cf3e8982003dd29 /sys/dev/pci/if_vic.c
parentbe8822770de6bb641c77d3f517bbf21f1367b51e (diff)
- stop counting input/output bytes in the driver as this is taken care of
in ether_input/ether_output. - only count input packets when sure the packet can be received as opposed to counting it unconditionally, then potentially running into an error and then dropping the packet. ok reyk@
Diffstat (limited to 'sys/dev/pci/if_vic.c')
-rw-r--r--sys/dev/pci/if_vic.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c
index 1f795490bcf..f3eab35f9c8 100644
--- a/sys/dev/pci/if_vic.c
+++ b/sys/dev/pci/if_vic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vic.c,v 1.8 2006/05/28 00:20:21 brad Exp $ */
+/* $OpenBSD: if_vic.c,v 1.9 2006/05/31 06:46:12 brad Exp $ */
/*
* Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org>
@@ -315,9 +315,6 @@ vic_rx_proc(struct vic_softc *sc)
break;
len = letoh32(desc->rx_length);
- ifp->if_ibytes += len;
- ifp->if_ipackets++;
-
if (len < ETHER_MIN_LEN) {
ifp->if_iqdrops++;
goto nextp;
@@ -350,6 +347,8 @@ vic_rx_proc(struct vic_softc *sc)
}
desc->rx_physaddr = rxb->rxb_map->dm_segs->ds_addr;
+ ifp->if_ipackets++;
+
#if NBPFILTER > 0
if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN);
@@ -597,7 +596,6 @@ vic_tx_start(struct vic_softc *sc, struct mbuf *m)
}
ifp->if_opackets++;
- ifp->if_obytes += m->m_len;
sc->sc_txpending++;
sc->sc_txtimeout = VIC_TX_TIMEOUT;