From 850db274bbcb76df23ac406771570411f17474dc Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Wed, 31 May 2006 06:46:13 +0000 Subject: - 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@ --- sys/dev/pci/if_vic.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sys/dev/pci/if_vic.c') 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 @@ -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; -- cgit v1.2.3