diff options
author | 2015-06-24 09:40:53 +0000 | |
---|---|---|
committer | 2015-06-24 09:40:53 +0000 | |
commit | db4dc9aafbed936e879d4362ca141e998a6e925c (patch) | |
tree | df98e73a3cab3c7738c665fd003541280cfc7446 /sys/dev | |
parent | Introduce Linux work queue APIs and use them. As a side-effect, this will (diff) | |
download | wireguard-openbsd-db4dc9aafbed936e879d4362ca141e998a6e925c.tar.xz wireguard-openbsd-db4dc9aafbed936e879d4362ca141e998a6e925c.zip |
Increment if_ipackets in if_input().
Note that pseudo-drivers not using if_input() are not affected by this
conversion.
ok mikeb@, kettenis@, claudio@, dlg@
Diffstat (limited to 'sys/dev')
81 files changed, 97 insertions, 219 deletions
diff --git a/sys/dev/ic/aic6915.c b/sys/dev/ic/aic6915.c index e28f14ee777..4bdfec419fc 100644 --- a/sys/dev/ic/aic6915.c +++ b/sys/dev/ic/aic6915.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic6915.c,v 1.16 2015/05/19 11:24:01 mpi Exp $ */ +/* $OpenBSD: aic6915.c,v 1.17 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: aic6915.c,v 1.15 2005/12/24 20:27:29 perry Exp $ */ /*- @@ -815,7 +815,6 @@ sf_rxintr(struct sf_softc *sc) m->m_pkthdr.len = m->m_len = len; ml_enqueue(&ml, m); - ifp->if_ipackets++; } if_input(ifp, &ml); @@ -876,8 +875,6 @@ sf_stats_update(struct sf_softc *sc) stats.TransmitAbortDueToExcessingDeferral + stats.FramesLostDueToInternalTransmitErrors; - ifp->if_ipackets += stats.ReceiveOKFrames; - ifp->if_ierrors += stats.ReceiveCRCErrors + stats.AlignmentErrors + stats.ReceiveFramesTooLong + stats.ReceiveFramesTooShort + stats.ReceiveFramesJabbersError + diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index 5a398cd7ca4..ac2dbe30e7d 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.140 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: dc.c,v 1.141 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -131,7 +131,7 @@ int dc_coal(struct dc_softc *, struct mbuf **); void dc_pnic_rx_bug_war(struct dc_softc *, int); int dc_rx_resync(struct dc_softc *); -void dc_rxeof(struct dc_softc *); +int dc_rxeof(struct dc_softc *); void dc_txeof(struct dc_softc *); void dc_tick(void *); void dc_tx_underrun(struct dc_softc *); @@ -2065,14 +2065,14 @@ dc_rx_resync(struct dc_softc *sc) * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ -void +int dc_rxeof(struct dc_softc *sc) { struct mbuf *m; struct ifnet *ifp; struct dc_desc *cur_rx; struct mbuf_list ml = MBUF_LIST_INITIALIZER(); - int i, offset, total_len = 0; + int i, offset, total_len = 0, consumed = 0; u_int32_t rxstat; ifp = &sc->sc_arpcom.ac_if; @@ -2135,7 +2135,7 @@ dc_rxeof(struct dc_softc *sc) continue; } else { dc_init(sc); - return; + break; } } } @@ -2152,13 +2152,15 @@ dc_rxeof(struct dc_softc *sc) } m = m0; - ifp->if_ipackets++; + consumed++; ml_enqueue(&ml, m); } sc->dc_cdata.dc_rx_prod = i; if_input(ifp, &ml); + + return (consumed); } /* @@ -2443,10 +2445,7 @@ dc_intr(void *arg) CSR_WRITE_4(sc, DC_ISR, status); if (status & DC_ISR_RX_OK) { - int curpkts; - curpkts = ifp->if_ipackets; - dc_rxeof(sc); - if (curpkts == ifp->if_ipackets) { + if (dc_rxeof(sc) == 0) { while(dc_rx_resync(sc)) dc_rxeof(sc); } @@ -2468,10 +2467,7 @@ dc_intr(void *arg) if ((status & DC_ISR_RX_WATDOGTIMEO) || (status & DC_ISR_RX_NOBUF)) { - int curpkts; - curpkts = ifp->if_ipackets; - dc_rxeof(sc); - if (curpkts == ifp->if_ipackets) { + if (dc_rxeof(sc) == 0) { while(dc_rx_resync(sc)) dc_rxeof(sc); } diff --git a/sys/dev/ic/dp8390.c b/sys/dev/ic/dp8390.c index 85487004587..fb1f3d28c51 100644 --- a/sys/dev/ic/dp8390.c +++ b/sys/dev/ic/dp8390.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dp8390.c,v 1.54 2015/05/21 09:44:32 mpi Exp $ */ +/* $OpenBSD: dp8390.c,v 1.55 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: dp8390.c,v 1.13 1998/07/05 06:49:11 jonathan Exp $ */ /* @@ -578,7 +578,6 @@ loop: ifp->if_ierrors++; goto exit; } - ifp->if_ipackets++; ml_enqueue(&ml, m); } else { /* Really BAD. The ring pointers are corrupted. */ diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c index 838d7cfe9fa..9df535f2022 100644 --- a/sys/dev/ic/elink3.c +++ b/sys/dev/ic/elink3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elink3.c,v 1.84 2015/03/30 10:04:11 mpi Exp $ */ +/* $OpenBSD: elink3.c,v 1.85 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: elink3.c,v 1.32 1997/05/14 00:22:00 thorpej Exp $ */ /* @@ -1294,8 +1294,6 @@ again: goto done; } - ++ifp->if_ipackets; - ml_enqueue(&ml, m); /* diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 6b28de0c4b2..60f95db8ae2 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.120 2015/03/14 03:38:47 jsg Exp $ */ +/* $OpenBSD: fxp.c,v 1.121 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -957,7 +957,6 @@ fxp_stats_update(void *arg) ifp->if_opackets += letoh32(sp->tx_good); ifp->if_collisions += letoh32(sp->tx_total_collisions); if (sp->rx_good) { - ifp->if_ipackets += letoh32(sp->rx_good); sc->rx_idle_secs = 0; } else if (sc->sc_flags & FXPF_RECV_WORKAROUND) sc->rx_idle_secs++; diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c index bdfad8e66ce..57b1a68ea38 100644 --- a/sys/dev/ic/gem.c +++ b/sys/dev/ic/gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gem.c,v 1.111 2015/03/14 03:38:47 jsg Exp $ */ +/* $OpenBSD: gem.c,v 1.112 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */ /* @@ -996,8 +996,6 @@ gem_rint(struct gem_softc *sc) len = GEM_RD_BUFLEN(rxstat); m->m_data += 2; /* We're already off by two */ - - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = len; ml_enqueue(&ml, m); diff --git a/sys/dev/ic/hme.c b/sys/dev/ic/hme.c index f9245cc04d0..98f8091300c 100644 --- a/sys/dev/ic/hme.c +++ b/sys/dev/ic/hme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hme.c,v 1.72 2015/03/30 09:47:05 mpi Exp $ */ +/* $OpenBSD: hme.c,v 1.73 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: hme.c,v 1.21 2001/07/07 15:59:37 thorpej Exp $ */ /*- @@ -843,8 +843,6 @@ hme_rint(struct hme_softc *sc) len = HME_XD_DECODE_RSIZE(flags); m->m_pkthdr.len = m->m_len = len; - ifp->if_ipackets++; - ml_enqueue(&ml, m); } diff --git a/sys/dev/ic/i82596.c b/sys/dev/ic/i82596.c index 907ea78ecc3..80d70017e85 100644 --- a/sys/dev/ic/i82596.c +++ b/sys/dev/ic/i82596.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i82596.c,v 1.42 2015/05/13 10:42:46 jsg Exp $ */ +/* $OpenBSD: i82596.c,v 1.43 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: i82586.c,v 1.18 1998/08/15 04:42:42 mycroft Exp $ */ /*- @@ -1115,8 +1115,6 @@ i82596_readframe(sc, num) #endif ml_enqueue(&ml, m); - ifp->if_ipackets++; - if_input(ifp, &ml); return (0); } diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c index c83a62f0c9f..b224c99ff13 100644 --- a/sys/dev/ic/if_wi.c +++ b/sys/dev/ic/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.161 2015/05/19 11:34:30 mpi Exp $ */ +/* $OpenBSD: if_wi.c,v 1.162 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -760,8 +760,6 @@ wi_rxeof(struct wi_softc *sc) break; } - ifp->if_ipackets++; - if (sc->wi_use_wep && rx_frame.wi_frame_ctl & htole16(WI_FCTL_WEP)) { int len; diff --git a/sys/dev/ic/lance.c b/sys/dev/ic/lance.c index 1eb8d7ad5ca..287c61f87fa 100644 --- a/sys/dev/ic/lance.c +++ b/sys/dev/ic/lance.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lance.c,v 1.6 2015/05/01 14:56:18 mpi Exp $ */ +/* $OpenBSD: lance.c,v 1.7 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: lance.c,v 1.46 2012/02/02 19:43:03 tls Exp $ */ /*- @@ -427,8 +427,6 @@ lance_read(struct lance_softc *sc, int boff, int len) return (NULL); } - ifp->if_ipackets++; - eh = mtod(m, struct ether_header *); #ifdef LANCE_REVC_BUG diff --git a/sys/dev/ic/lemac.c b/sys/dev/ic/lemac.c index d9c16ccac71..d82155d8975 100644 --- a/sys/dev/ic/lemac.c +++ b/sys/dev/ic/lemac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lemac.c,v 1.19 2015/04/06 09:13:55 miod Exp $ */ +/* $OpenBSD: lemac.c,v 1.20 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: lemac.c,v 1.20 2001/06/13 10:46:02 wiz Exp $ */ /*- @@ -312,7 +312,6 @@ lemac_rne_intr(struct lemac_softc *sc) unsigned rxpg = LEMAC_INB(sc, LEMAC_REG_RQ); u_int32_t rxlen; - ifp->if_ipackets++; if (LEMAC_USE_PIO_MODE(sc)) { LEMAC_OUTB(sc, LEMAC_REG_IOP, rxpg); LEMAC_OUTB(sc, LEMAC_REG_PI1, 0); diff --git a/sys/dev/ic/mtd8xx.c b/sys/dev/ic/mtd8xx.c index 954f22570e4..085e0d37217 100644 --- a/sys/dev/ic/mtd8xx.c +++ b/sys/dev/ic/mtd8xx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mtd8xx.c,v 1.26 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: mtd8xx.c,v 1.27 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru> @@ -79,7 +79,7 @@ static void mtd_start(struct ifnet *); static void mtd_stop(struct ifnet *); static void mtd_watchdog(struct ifnet *); -static void mtd_rxeof(struct mtd_softc *); +static int mtd_rxeof(struct mtd_softc *); static int mtd_rx_resync(struct mtd_softc *); static void mtd_txeof(struct mtd_softc *); @@ -834,10 +834,7 @@ mtd_intr(void *xsc) /* RX interrupt. */ if (status & ISR_RI) { - int curpkts = ifp->if_ipackets; - - mtd_rxeof(sc); - if (curpkts == ifp->if_ipackets) + if (mtd_rxeof(sc) == 0) while(mtd_rx_resync(sc)) mtd_rxeof(sc); } @@ -871,14 +868,14 @@ mtd_intr(void *xsc) * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ -static void +static int mtd_rxeof(struct mtd_softc *sc) { struct mbuf_list ml = MBUF_LIST_INITIALIZER(); struct mbuf *m; struct ifnet *ifp; struct mtd_rx_desc *cur_rx; - int i, total_len = 0; + int i, total_len = 0, consumed = 0; u_int32_t rxstat; ifp = &sc->sc_arpcom.ac_if; @@ -933,14 +930,15 @@ mtd_rxeof(struct mtd_softc *sc) } m = m0; - ifp->if_ipackets++; - + consumed++; ml_enqueue(&ml, m); } if_input(ifp, &ml); sc->mtd_cdata.mtd_rx_prod = i; + + return (consumed); } diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index c7099caa114..3b96306adb1 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.178 2015/04/13 20:45:49 sthen Exp $ */ +/* $OpenBSD: re.c,v 1.179 2015/06/24 09:40:54 mpi Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1398,8 +1398,6 @@ re_rxeof(struct rl_softc *sc) m->m_pkthdr.len = m->m_len = (total_len - ETHER_CRC_LEN); - ifp->if_ipackets++; - /* Do RX checksumming */ if (sc->rl_flags & RL_FLAG_DESCV2) { diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c index 23c5204a5a5..3a9d0161a50 100644 --- a/sys/dev/ic/rtl81x9.c +++ b/sys/dev/ic/rtl81x9.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtl81x9.c,v 1.90 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: rtl81x9.c,v 1.91 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1997, 1998 @@ -672,8 +672,6 @@ rl_rxeof(struct rl_softc *sc) continue; } - ifp->if_ipackets++; - ml_enqueue(&ml, m); bus_dmamap_sync(sc->sc_dmat, sc->sc_rx_dmamap, diff --git a/sys/dev/ic/smc83c170.c b/sys/dev/ic/smc83c170.c index 3cdd049dd94..e6258492ddc 100644 --- a/sys/dev/ic/smc83c170.c +++ b/sys/dev/ic/smc83c170.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smc83c170.c,v 1.20 2015/05/19 11:24:01 mpi Exp $ */ +/* $OpenBSD: smc83c170.c,v 1.21 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: smc83c170.c,v 1.59 2005/02/27 00:27:02 perry Exp $ */ /*- @@ -706,7 +706,6 @@ epic_intr(void *arg) m->m_pkthdr.len = m->m_len = len; ml_enqueue(&ml, m); - ifp->if_ipackets++; } /* Update the receive pointer. */ diff --git a/sys/dev/ic/smc91cxx.c b/sys/dev/ic/smc91cxx.c index d6e5ec558e4..d3abd0d7fde 100644 --- a/sys/dev/ic/smc91cxx.c +++ b/sys/dev/ic/smc91cxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smc91cxx.c,v 1.39 2015/05/19 11:24:01 mpi Exp $ */ +/* $OpenBSD: smc91cxx.c,v 1.40 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: smc91cxx.c,v 1.11 1998/08/08 23:51:41 mycroft Exp $ */ /*- @@ -990,7 +990,6 @@ smc91cxx_read(sc) *data = bus_space_read_1(bst, bsh, DATA_REG_B); } - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = packetlen; ml_enqueue(&ml, m); diff --git a/sys/dev/ic/ti.c b/sys/dev/ic/ti.c index 008ef34a26f..f7d4147327c 100644 --- a/sys/dev/ic/ti.c +++ b/sys/dev/ic/ti.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ti.c,v 1.14 2015/05/19 11:24:01 mpi Exp $ */ +/* $OpenBSD: ti.c,v 1.15 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1602,7 +1602,6 @@ ti_rxeof(struct ti_softc *sc) panic("%s: couldn't get mbuf", sc->sc_dv.dv_xname); m->m_pkthdr.len = m->m_len = cur_rx->ti_len; - ifp->if_ipackets++; #if NVLAN > 0 if (cur_rx->ti_flags & TI_BDFLAG_VLAN_TAG) { diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c index 2ac64111f74..a0af31e0ba3 100644 --- a/sys/dev/ic/xl.c +++ b/sys/dev/ic/xl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xl.c,v 1.124 2015/05/21 09:25:18 mpi Exp $ */ +/* $OpenBSD: xl.c,v 1.125 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1194,7 +1194,6 @@ again: continue; } - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = total_len; if (sc->xl_type == XL_TYPE_905B) { diff --git a/sys/dev/isa/if_ef_isapnp.c b/sys/dev/isa/if_ef_isapnp.c index 18508c38fa2..24fcada01f4 100644 --- a/sys/dev/isa/if_ef_isapnp.c +++ b/sys/dev/isa/if_ef_isapnp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ef_isapnp.c,v 1.28 2015/05/19 11:24:01 mpi Exp $ */ +/* $OpenBSD: if_ef_isapnp.c,v 1.29 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -719,9 +719,7 @@ efread(sc) return; } - ifp->if_ipackets++; ml_enqueue(&ml, m); - if_input(ifp, &ml); } diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c index 45ee45cea6a..f4a348016dd 100644 --- a/sys/dev/isa/if_eg.c +++ b/sys/dev/isa/if_eg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_eg.c,v 1.38 2015/05/19 11:24:01 mpi Exp $ */ +/* $OpenBSD: if_eg.c,v 1.39 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_eg.c,v 1.26 1996/05/12 23:52:27 mycroft Exp $ */ /* @@ -688,9 +688,7 @@ egread(struct eg_softc *sc, caddr_t buf, int len) return; } - ifp->if_ipackets++; ml_enqueue(&ml, m); - if_input(ifp, &ml); } diff --git a/sys/dev/isa/if_el.c b/sys/dev/isa/if_el.c index 744ece69ad9..637368398f1 100644 --- a/sys/dev/isa/if_el.c +++ b/sys/dev/isa/if_el.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_el.c,v 1.26 2015/05/19 11:24:01 mpi Exp $ */ +/* $OpenBSD: if_el.c,v 1.27 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_el.c,v 1.39 1996/05/12 23:52:32 mycroft Exp $ */ /* @@ -508,9 +508,7 @@ elread(sc, len) return; } - ifp->if_ipackets++; ml_enqueue(&ml, m); - if_input(ifp, &ml); } diff --git a/sys/dev/isa/if_ex.c b/sys/dev/isa/if_ex.c index 3366ffe80d9..7f1f7c4091f 100644 --- a/sys/dev/isa/if_ex.c +++ b/sys/dev/isa/if_ex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ex.c,v 1.38 2015/05/19 11:24:01 mpi Exp $ */ +/* $OpenBSD: if_ex.c,v 1.39 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1997, Donald A. Schmidt * Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es) @@ -710,7 +710,6 @@ ex_rx_intr(struct ex_softc *sc) } /* QQQ */ } #endif - ifp->if_ipackets++; ml_enqueue(&ml, ipkt); } } else diff --git a/sys/dev/isa/if_ie.c b/sys/dev/isa/if_ie.c index 932e12743e8..7457b0aeb58 100644 --- a/sys/dev/isa/if_ie.c +++ b/sys/dev/isa/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.42 2015/05/26 11:23:15 mpi Exp $ */ +/* $OpenBSD: if_ie.c,v 1.43 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_ie.c,v 1.51 1996/05/12 23:52:48 mycroft Exp $ */ /*- @@ -1314,7 +1314,6 @@ ie_readframe(sc, num) ml_enqueue(&ml, m); if_input(&sc->sc_arpcom.ac_if, &ml); - sc->sc_arpcom.ac_if.if_ipackets++; } void diff --git a/sys/dev/pci/if_age.c b/sys/dev/pci/if_age.c index e73c408623c..b020bdbac36 100644 --- a/sys/dev/pci/if_age.c +++ b/sys/dev/pci/if_age.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_age.c,v 1.27 2015/04/30 07:51:07 mpi Exp $ */ +/* $OpenBSD: if_age.c,v 1.28 2015/06/24 09:40:54 mpi Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org> @@ -1958,8 +1958,6 @@ age_stats_update(struct age_softc *sc) smb->tx_late_colls + smb->tx_underrun + smb->tx_pkts_truncated; - ifp->if_ipackets += smb->rx_frames; - ifp->if_ierrors += smb->rx_crcerrs + smb->rx_lenerrs + smb->rx_runts + smb->rx_pkts_truncated + smb->rx_fifo_oflows + smb->rx_desc_oflows + diff --git a/sys/dev/pci/if_alc.c b/sys/dev/pci/if_alc.c index c18df3db820..1fe1d168780 100644 --- a/sys/dev/pci/if_alc.c +++ b/sys/dev/pci/if_alc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_alc.c,v 1.32 2015/03/20 16:48:13 mpi Exp $ */ +/* $OpenBSD: if_alc.c,v 1.33 2015/06/24 09:40:54 mpi Exp $ */ /*- * Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org> * All rights reserved. @@ -1655,8 +1655,6 @@ alc_stats_update(struct alc_softc *sc) ifp->if_oerrors += smb->tx_late_colls + smb->tx_excess_colls + smb->tx_underrun + smb->tx_pkts_truncated; - ifp->if_ipackets += smb->rx_frames; - ifp->if_ierrors += smb->rx_crcerrs + smb->rx_lenerrs + smb->rx_runts + smb->rx_pkts_truncated + smb->rx_fifo_oflows + smb->rx_rrs_errs + diff --git a/sys/dev/pci/if_ale.c b/sys/dev/pci/if_ale.c index f7947878ff5..a8a5a3c6789 100644 --- a/sys/dev/pci/if_ale.c +++ b/sys/dev/pci/if_ale.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ale.c,v 1.38 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: if_ale.c,v 1.39 2015/06/24 09:40:54 mpi Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org> * All rights reserved. @@ -1251,8 +1251,6 @@ ale_stats_update(struct ale_softc *sc) ifp->if_oerrors += smb->tx_late_colls + smb->tx_excess_colls + smb->tx_underrun + smb->tx_pkts_truncated; - ifp->if_ipackets += smb->rx_frames; - ifp->if_ierrors += smb->rx_crcerrs + smb->rx_lenerrs + smb->rx_runts + smb->rx_pkts_truncated + smb->rx_fifo_oflows + smb->rx_rrs_errs + diff --git a/sys/dev/pci/if_bce.c b/sys/dev/pci/if_bce.c index 6f06ab072cb..dec598999b7 100644 --- a/sys/dev/pci/if_bce.c +++ b/sys/dev/pci/if_bce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bce.c,v 1.45 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: if_bce.c,v 1.46 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_bce.c,v 1.3 2003/09/29 01:53:02 mrg Exp $ */ /* @@ -740,7 +740,6 @@ bce_rxintr(struct bce_softc *sc) m = m_devget(sc->bce_data + i * MCLBYTES + BCE_PREPKT_HEADER_SIZE, len, ETHER_ALIGN); - ifp->if_ipackets++; ml_enqueue(&ml, m); diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index 60660dccff9..990d4c4657e 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bge.c,v 1.367 2015/05/19 12:50:53 mikeb Exp $ */ +/* $OpenBSD: if_bge.c,v 1.368 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -3497,7 +3497,6 @@ bge_rxeof(struct bge_softc *sc) } } - ifp->if_ipackets++; #ifdef __STRICT_ALIGNMENT /* * The i386 allows unaligned accesses, but for other diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c index 8774cfcf988..9d1249ea436 100644 --- a/sys/dev/pci/if_bnx.c +++ b/sys/dev/pci/if_bnx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bnx.c,v 1.110 2015/03/10 15:28:48 mpi Exp $ */ +/* $OpenBSD: if_bnx.c,v 1.111 2015/06/24 09:40:54 mpi Exp $ */ /*- * Copyright (c) 2006 Broadcom Corporation @@ -4478,9 +4478,6 @@ bnx_rx_intr(struct bnx_softc *sc) #endif } - /* Pass the mbuf off to the upper layers. */ - ifp->if_ipackets++; - bnx_rx_int_next_rx: sw_prod = NEXT_RX_BD(sw_prod); } diff --git a/sys/dev/pci/if_cas.c b/sys/dev/pci/if_cas.c index 19c9e0c1554..83d532514af 100644 --- a/sys/dev/pci/if_cas.c +++ b/sys/dev/pci/if_cas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cas.c,v 1.40 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: if_cas.c,v 1.41 2015/06/24 09:40:54 mpi Exp $ */ /* * @@ -1202,7 +1202,6 @@ cas_rint(struct cas_softc *sc) cas_add_rxbuf(sc, idx); if (m != NULL) { - ifp->if_ipackets++; ml_enqueue(&ml, m); } else ifp->if_ierrors++; @@ -1228,7 +1227,6 @@ cas_rint(struct cas_softc *sc) cas_add_rxbuf(sc, idx); if (m != NULL) { - ifp->if_ipackets++; ml_enqueue(&ml, m); } else ifp->if_ierrors++; diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c index bfc8d8e4260..a6d3d9a82b8 100644 --- a/sys/dev/pci/if_de.c +++ b/sys/dev/pci/if_de.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_de.c,v 1.120 2015/05/15 11:36:30 mpi Exp $ */ +/* $OpenBSD: if_de.c,v 1.121 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_de.c,v 1.58 1998/01/12 09:39:58 thorpej Exp $ */ /*- @@ -3327,7 +3327,6 @@ tulip_rx_intr(tulip_softc_t * const sc) #if defined(TULIP_DEBUG) cnt++; #endif - ifp->if_ipackets++; if (++eop == ri->ri_last) eop = ri->ri_first; ri->ri_nextin = eop; diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index efc3f7f3ad5..de174d95ba9 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.298 2015/06/04 18:33:41 dms Exp $ */ +/* $OpenBSD: if_em.c,v 1.299 2015/06/24 09:40:54 mpi Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include <dev/pci/if_em.h> @@ -2969,8 +2969,6 @@ em_rxeof(struct em_softc *sc) } if (eop) { - ifp->if_ipackets++; - m = sc->fmp; em_receive_checksum(sc, desc, m); diff --git a/sys/dev/pci/if_et.c b/sys/dev/pci/if_et.c index 7e63cea4725..6c7e56470e5 100644 --- a/sys/dev/pci/if_et.c +++ b/sys/dev/pci/if_et.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_et.c,v 1.27 2015/04/30 07:51:07 mpi Exp $ */ +/* $OpenBSD: if_et.c,v 1.28 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. * @@ -1746,7 +1746,6 @@ et_rxeof(struct et_softc *sc) m->m_pkthdr.len = m->m_len = buflen - ETHER_CRC_LEN; ml_enqueue(&ml, m); - ifp->if_ipackets++; } } else { ifp->if_ierrors++; diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c index a6085689931..c2f7d29d053 100644 --- a/sys/dev/pci/if_ix.c +++ b/sys/dev/pci/if_ix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ix.c,v 1.120 2015/05/21 07:39:52 gerhard Exp $ */ +/* $OpenBSD: if_ix.c,v 1.121 2015/06/24 09:40:54 mpi Exp $ */ /****************************************************************************** @@ -2919,7 +2919,6 @@ ixgbe_rxeof(struct ix_queue *que) sendmp = NULL; mp->m_next = nxbuf->buf; } else { /* Sending this frame? */ - ifp->if_ipackets++; rxr->rx_packets++; /* capture data for AIM */ rxr->bytes += sendmp->m_pkthdr.len; diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c index a6e54d0b1de..9bebe61ad34 100644 --- a/sys/dev/pci/if_ixgb.c +++ b/sys/dev/pci/if_ixgb.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_ixgb.c,v 1.64 2015/04/30 07:51:07 mpi Exp $ */ +/* $OpenBSD: if_ixgb.c,v 1.65 2015/06/24 09:40:54 mpi Exp $ */ #include <dev/pci/if_ixgb.h> @@ -1770,7 +1770,6 @@ ixgb_rxeof(struct ixgb_softc *sc, int count) if (eop) { eop_desc = i; - ifp->if_ipackets++; ixgb_receive_checksum(sc, current_desc, sc->fmp); #if NVLAN > 0 diff --git a/sys/dev/pci/if_jme.c b/sys/dev/pci/if_jme.c index e8a08f4855c..74f70e5e55f 100644 --- a/sys/dev/pci/if_jme.c +++ b/sys/dev/pci/if_jme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_jme.c,v 1.40 2015/04/30 07:52:00 mpi Exp $ */ +/* $OpenBSD: if_jme.c,v 1.41 2015/06/24 09:40:54 mpi Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org> * All rights reserved. @@ -1726,8 +1726,6 @@ jme_rxpkt(struct jme_softc *sc) } #endif - ifp->if_ipackets++; - ml_enqueue(&ml, m); /* Reset mbuf chains. */ diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c index 5c33421ca02..b68176610d7 100644 --- a/sys/dev/pci/if_lge.c +++ b/sys/dev/pci/if_lge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lge.c,v 1.66 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: if_lge.c,v 1.67 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -730,8 +730,6 @@ lge_rxeof(struct lge_softc *sc, int cnt) m->m_pkthdr.len = m->m_len = total_len; } - ifp->if_ipackets++; - /* Do IP checksum checking. */ if (rxsts & LGE_RXSTS_ISIP) { if (!(rxsts & LGE_RXSTS_IPCSUMERR)) diff --git a/sys/dev/pci/if_lii.c b/sys/dev/pci/if_lii.c index 519d9e80806..88adc7016c9 100644 --- a/sys/dev/pci/if_lii.c +++ b/sys/dev/pci/if_lii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lii.c,v 1.36 2015/04/11 14:40:42 jsing Exp $ */ +/* $OpenBSD: if_lii.c,v 1.37 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2007 The NetBSD Foundation. @@ -933,7 +933,6 @@ lii_rxintr(struct lii_softc *sc) /* Copy the packet withhout the FCS */ m->m_pkthdr.len = m->m_len = size; memcpy(mtod(m, void *), &rxp->rxp_data[0], size); - ++ifp->if_ipackets; ml_enqueue(&ml, m); } diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c index cde67d0b0bb..3f7bbbc3f47 100644 --- a/sys/dev/pci/if_msk.c +++ b/sys/dev/pci/if_msk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_msk.c,v 1.114 2015/04/30 07:51:07 mpi Exp $ */ +/* $OpenBSD: if_msk.c,v 1.115 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1669,8 +1669,6 @@ msk_rxeof(struct sk_if_softc *sc_if, u_int16_t len, u_int32_t rxstat) m->m_pkthdr.len = m->m_len = total_len; ml_enqueue(&ml, m); - ifp->if_ipackets++; - if_input(ifp, &ml); } diff --git a/sys/dev/pci/if_myx.c b/sys/dev/pci/if_myx.c index ff9e09d3bc6..2affae02057 100644 --- a/sys/dev/pci/if_myx.c +++ b/sys/dev/pci/if_myx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_myx.c,v 1.77 2015/05/17 02:33:09 chris Exp $ */ +/* $OpenBSD: if_myx.c,v 1.78 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org> @@ -1886,8 +1886,6 @@ myx_rxeof(struct myx_softc *sc) timeout_add(&sc->sc_refill, 0); } - ifp->if_ipackets += ml_len(&ml); - if_input(ifp, &ml); } diff --git a/sys/dev/pci/if_nep.c b/sys/dev/pci/if_nep.c index 63166932c53..50caf2bc240 100644 --- a/sys/dev/pci/if_nep.c +++ b/sys/dev/pci/if_nep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nep.c,v 1.18 2015/04/13 20:02:58 kettenis Exp $ */ +/* $OpenBSD: if_nep.c,v 1.19 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2014, 2015 Mark Kettenis * @@ -1029,7 +1029,6 @@ nep_rx_proc(struct nep_softc *sc) m->m_pkthdr.len = m->m_len = len; m->m_data += ETHER_ALIGN; - ifp->if_ipackets++; ml_enqueue(&ml, m); } diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c index 2d1cf873be7..51a2439c6e1 100644 --- a/sys/dev/pci/if_nfe.c +++ b/sys/dev/pci/if_nfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nfe.c,v 1.110 2015/03/20 18:42:25 mpi Exp $ */ +/* $OpenBSD: if_nfe.c,v 1.111 2015/06/24 09:40:54 mpi Exp $ */ /*- * Copyright (c) 2006, 2007 Damien Bergamini <damien.bergamini@free.fr> @@ -763,7 +763,6 @@ nfe_rxeof(struct nfe_softc *sc) } #endif - ifp->if_ipackets++; ml_enqueue(&ml, m); /* update mapping address in h/w descriptor */ diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c index b813dcd7d7d..bbe2c4aadb4 100644 --- a/sys/dev/pci/if_nge.c +++ b/sys/dev/pci/if_nge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nge.c,v 1.83 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: if_nge.c,v 1.84 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -1080,8 +1080,6 @@ nge_rxeof(struct nge_softc *sc) } #endif - ifp->if_ipackets++; - #if NVLAN > 0 if (extsts & NGE_RXEXTSTS_VLANPKT) { m->m_pkthdr.ether_vtag = diff --git a/sys/dev/pci/if_oce.c b/sys/dev/pci/if_oce.c index b77aebb23c8..2aa13db54a8 100644 --- a/sys/dev/pci/if_oce.c +++ b/sys/dev/pci/if_oce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_oce.c,v 1.83 2015/04/30 07:51:07 mpi Exp $ */ +/* $OpenBSD: if_oce.c,v 1.84 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2012 Mike Belopuhov @@ -1628,8 +1628,6 @@ oce_rxeof(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe) } #endif - ifp->if_ipackets++; - #ifdef OCE_LRO /* Try to queue to LRO */ if (IF_LRO_ENABLED(ifp) && !(m->m_flags & M_VLANTAG) && diff --git a/sys/dev/pci/if_pcn.c b/sys/dev/pci/if_pcn.c index de5cb87dd8a..895334b3b85 100644 --- a/sys/dev/pci/if_pcn.c +++ b/sys/dev/pci/if_pcn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pcn.c,v 1.36 2015/03/14 03:38:48 jsg Exp $ */ +/* $OpenBSD: if_pcn.c,v 1.37 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_pcn.c,v 1.26 2005/05/07 09:15:44 is Exp $ */ /* @@ -1415,7 +1415,6 @@ pcn_rxintr(struct pcn_softc *sc) m->m_pkthdr.len = m->m_len = len; ml_enqueue(&ml, m); - ifp->if_ipackets++; } /* Update the receive pointer. */ diff --git a/sys/dev/pci/if_se.c b/sys/dev/pci/if_se.c index d4cce3eb905..5f3bdb369ef 100644 --- a/sys/dev/pci/if_se.c +++ b/sys/dev/pci/if_se.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_se.c,v 1.12 2015/04/30 07:51:07 mpi Exp $ */ +/* $OpenBSD: if_se.c,v 1.13 2015/06/24 09:40:54 mpi Exp $ */ /*- * Copyright (c) 2009, 2010 Christopher Zimmermann <madroach@zakweb.de> @@ -962,7 +962,6 @@ se_rxeof(struct se_softc *sc) SE_RX_BYTES(rxstat) - SE_RX_PAD_BYTES; ml_enqueue(&ml, m); - ifp->if_ipackets++; } if_input(ifp, &ml); diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index 54014128003..dede1d2062a 100644 --- a/sys/dev/pci/if_sis.c +++ b/sys/dev/pci/if_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sis.c,v 1.126 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: if_sis.c,v 1.127 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -1434,7 +1434,6 @@ sis_rxeof(struct sis_softc *sc) #else m->m_pkthdr.len = m->m_len = total_len; #endif - ifp->if_ipackets++; ml_enqueue(&ml, m); } diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index 8a9f591b831..e21b07733fc 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sk.c,v 1.175 2015/04/30 09:25:13 mpi Exp $ */ +/* $OpenBSD: if_sk.c,v 1.176 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1639,7 +1639,6 @@ sk_rxeof(struct sk_if_softc *sc_if) m->m_pkthdr.len = m->m_len = total_len; ml_enqueue(&ml, m); - ifp->if_ipackets++; } sc_if->sk_cdata.sk_rx_cons = cur; diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c index e3177f6e6ac..7050d81534a 100644 --- a/sys/dev/pci/if_ste.c +++ b/sys/dev/pci/if_ste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ste.c,v 1.58 2015/05/15 11:36:31 mpi Exp $ */ +/* $OpenBSD: if_ste.c,v 1.59 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -689,7 +689,6 @@ ste_rxeof(struct ste_softc *sc) m->m_pkthdr.len = m->m_len = total_len; ml_enqueue(&ml, m); - ifp->if_ipackets++; cur_rx->ste_ptr->ste_status = 0; count++; diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c index 5afbe346e44..8b4672db272 100644 --- a/sys/dev/pci/if_stge.c +++ b/sys/dev/pci/if_stge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_stge.c,v 1.60 2015/04/30 07:51:07 mpi Exp $ */ +/* $OpenBSD: if_stge.c,v 1.61 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_stge.c,v 1.27 2005/05/16 21:35:32 bouyer Exp $ */ /*- @@ -1035,9 +1035,6 @@ stge_stats_update(struct stge_softc *sc) (void) CSR_READ_4(sc, STGE_OctetRcvOk); - ifp->if_ipackets += - CSR_READ_4(sc, STGE_FramesRcvdOk); - ifp->if_ierrors += (u_int) CSR_READ_2(sc, STGE_FramesLostRxErrors); diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c index 56c6ffaa1f1..e4f5c9d051d 100644 --- a/sys/dev/pci/if_tht.c +++ b/sys/dev/pci/if_tht.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tht.c,v 1.131 2015/04/30 07:51:07 mpi Exp $ */ +/* $OpenBSD: if_tht.c,v 1.132 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -1371,9 +1371,6 @@ tht_rxd(struct tht_softc *sc) tht_fifo_read(sc, &sc->sc_rxd, &pad, sizeof(pad)); bc -= sizeof(pad); } - - ifp->if_ipackets++; - } while (sc->sc_rxd.tf_ready >= sizeof(rxd)); tht_fifo_post(sc, &sc->sc_rxd); diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c index 499ca6a71a7..8a21fdfd824 100644 --- a/sys/dev/pci/if_tl.c +++ b/sys/dev/pci/if_tl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tl.c,v 1.63 2015/04/30 07:51:07 mpi Exp $ */ +/* $OpenBSD: if_tl.c,v 1.64 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1330,7 +1330,6 @@ tl_stats_update(void *xsc) ifp->if_opackets += tl_tx_goodframes(tl_stats); ifp->if_collisions += tl_stats.tl_tx_single_collision + tl_stats.tl_tx_multi_collision; - ifp->if_ipackets += tl_rx_goodframes(tl_stats); ifp->if_ierrors += tl_stats.tl_crc_errors + tl_stats.tl_code_errors + tl_rx_overrun(tl_stats); ifp->if_oerrors += tl_tx_underrun(tl_stats); diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c index 2ac49288666..6b2e568c71e 100644 --- a/sys/dev/pci/if_txp.c +++ b/sys/dev/pci/if_txp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_txp.c,v 1.115 2015/04/30 07:51:07 mpi Exp $ */ +/* $OpenBSD: if_txp.c,v 1.116 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2001 @@ -1267,7 +1267,6 @@ txp_tick(void *vsc) ifp->if_collisions += ext[0].ext_2 + ext[0].ext_3 + ext[1].ext_2 + ext[1].ext_3; ifp->if_opackets += rsp->rsp_par2; - ifp->if_ipackets += ext[2].ext_3; out: if (rsp != NULL) diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c index 0db21fd640e..f5fab40cc94 100644 --- a/sys/dev/pci/if_vge.c +++ b/sys/dev/pci/if_vge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vge.c,v 1.62 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: if_vge.c,v 1.63 2015/06/24 09:40:54 mpi Exp $ */ /* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */ /* * Copyright (c) 2004 @@ -1119,8 +1119,6 @@ vge_rxeof(struct vge_softc *sc) bcopy(m->m_data, m->m_data + ETHER_ALIGN, total_len); m->m_data += ETHER_ALIGN; #endif - ifp->if_ipackets++; - /* Do RX checksumming */ /* Check IP header checksum */ diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c index 815cc0f442b..dc32eea2b4a 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.90 2015/05/29 00:37:10 uebayasi Exp $ */ +/* $OpenBSD: if_vic.c,v 1.91 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org> @@ -862,8 +862,6 @@ vic_rx_proc(struct vic_softc *sc, int q) m->m_pkthdr.len = m->m_len = len; - ifp->if_ipackets++; - ml_enqueue(&ml, m); nextp: diff --git a/sys/dev/pci/if_vio.c b/sys/dev/pci/if_vio.c index 0a39301c086..ce4f35db668 100644 --- a/sys/dev/pci/if_vio.c +++ b/sys/dev/pci/if_vio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vio.c,v 1.32 2015/06/11 04:38:23 jsg Exp $ */ +/* $OpenBSD: if_vio.c,v 1.33 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2012 Stefan Fritsch, Alexander Fiveg. @@ -1039,7 +1039,6 @@ vio_rxeof(struct vio_softc *sc) } if (bufs_left == 0) { - ifp->if_ipackets++; ml_enqueue(&ml, m0); m0 = NULL; } diff --git a/sys/dev/pci/if_vmx.c b/sys/dev/pci/if_vmx.c index 0f1090b1c61..91e9cb78f61 100644 --- a/sys/dev/pci/if_vmx.c +++ b/sys/dev/pci/if_vmx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vmx.c,v 1.29 2015/06/04 17:10:33 mikeb Exp $ */ +/* $OpenBSD: if_vmx.c,v 1.30 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2013 Tsubai Masanari @@ -767,7 +767,6 @@ skip_buffer: } } - ifp->if_ipackets += ml_len(&ml); if_input(ifp, &ml); /* XXX Should we (try to) allocate buffers for ring 2 too? */ diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 6c8e302fdac..5887ac497b0 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.140 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: if_vr.c,v 1.141 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1997, 1998 @@ -910,8 +910,6 @@ vr_rxeof(struct vr_softc *sc) m->m_pkthdr.len = m->m_len = total_len; #endif - ifp->if_ipackets++; - if (sc->vr_quirks & VR_Q_CSUM && (rxstat & VR_RXSTAT_FRAG) == 0 && (rxctl & VR_RXCTL_IP) != 0) { diff --git a/sys/dev/pci/if_vte.c b/sys/dev/pci/if_vte.c index a226b8a03a7..cc4a3242644 100644 --- a/sys/dev/pci/if_vte.c +++ b/sys/dev/pci/if_vte.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vte.c,v 1.12 2015/04/30 07:51:07 mpi Exp $ */ +/* $OpenBSD: if_vte.c,v 1.13 2015/06/24 09:40:54 mpi Exp $ */ /*- * Copyright (c) 2010, Pyun YongHyeon <yongari@FreeBSD.org> * All rights reserved. @@ -849,7 +849,6 @@ vte_stats_update(struct vte_softc *sc) ifp->if_opackets = stat->tx_frames; ifp->if_collisions = stat->tx_late_colls; ifp->if_oerrors = stat->tx_late_colls + stat->tx_underruns; - ifp->if_ipackets = stat->rx_frames; ifp->if_ierrors = stat->rx_crcerrs + stat->rx_runts + stat->rx_long_frames + stat->rx_fifo_full; } diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c index 1da679a51b1..41e7ec3c9f4 100644 --- a/sys/dev/pci/if_wb.c +++ b/sys/dev/pci/if_wb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wb.c,v 1.60 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: if_wb.c,v 1.61 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1997, 1998 @@ -977,8 +977,6 @@ void wb_rxeof(sc) break; } - ifp->if_ipackets++; - ml_enqueue(&ml, m); } diff --git a/sys/dev/pci/if_xge.c b/sys/dev/pci/if_xge.c index 94d3de68124..bd24381cdf2 100644 --- a/sys/dev/pci/if_xge.c +++ b/sys/dev/pci/if_xge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xge.c,v 1.61 2015/04/30 07:51:07 mpi Exp $ */ +/* $OpenBSD: if_xge.c,v 1.62 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_xge.c,v 1.1 2005/09/09 10:30:27 ragge Exp $ */ /* @@ -911,8 +911,6 @@ xge_intr(void *pv) break; } - ifp->if_ipackets++; - if (RXD_CTL1_PROTOS(val) & RXD_CTL1_P_IPv4) m->m_pkthdr.csum_flags |= M_IPV4_CSUM_IN_OK; if (RXD_CTL1_PROTOS(val) & RXD_CTL1_P_TCP) diff --git a/sys/dev/pcmcia/if_cnw.c b/sys/dev/pcmcia/if_cnw.c index d544b08b9ef..cd5000e03a3 100644 --- a/sys/dev/pcmcia/if_cnw.c +++ b/sys/dev/pcmcia/if_cnw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cnw.c,v 1.30 2015/05/21 09:36:20 mpi Exp $ */ +/* $OpenBSD: if_cnw.c,v 1.31 2015/06/24 09:40:54 mpi Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -652,7 +652,6 @@ cnw_recv(sc) ++ifp->if_ierrors; break; } - ++ifp->if_ipackets; ml_enqueue(&ml, m); } diff --git a/sys/dev/pcmcia/if_malo.c b/sys/dev/pcmcia/if_malo.c index ad1fac43386..06740aac977 100644 --- a/sys/dev/pcmcia/if_malo.c +++ b/sys/dev/pcmcia/if_malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_malo.c,v 1.84 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: if_malo.c,v 1.85 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org> @@ -975,7 +975,6 @@ cmalo_rx(struct malo_softc *sc) /* push the frame up to the network stack if not in monitor mode */ if (ic->ic_opmode != IEEE80211_M_MONITOR) { - ifp->if_ipackets++; ml_enqueue(&ml, m); if_input(ifp, &ml); #if NBPFILTER > 0 diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c index ef2c8e37f72..f95ddbfc617 100644 --- a/sys/dev/pcmcia/if_xe.c +++ b/sys/dev/pcmcia/if_xe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xe.c,v 1.49 2015/05/19 11:24:01 mpi Exp $ */ +/* $OpenBSD: if_xe.c,v 1.50 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist, Brandon Creighton, Job de Haas @@ -824,7 +824,6 @@ xe_get(sc) bus_space_write_2(sc->sc_bst, sc->sc_bsh, sc->sc_offset + DO0, DO_SKIP_RX_PKT); - ifp->if_ipackets++; ml_enqueue(&ml, top); if_input(ifp, &ml); diff --git a/sys/dev/sbus/be.c b/sys/dev/sbus/be.c index 04fae5de770..a8b1b394f1e 100644 --- a/sys/dev/sbus/be.c +++ b/sys/dev/sbus/be.c @@ -1,4 +1,4 @@ -/* $OpenBSD: be.c,v 1.30 2015/05/13 10:42:46 jsg Exp $ */ +/* $OpenBSD: be.c,v 1.31 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: be.c,v 1.26 2001/03/20 15:39:20 pk Exp $ */ /*- @@ -549,7 +549,6 @@ be_read(struct be_softc *sc, int idx, int len) ifp->if_ierrors++; return; } - ifp->if_ipackets++; ml_enqueue(&ml, m); if_input(ifp, &ml); diff --git a/sys/dev/sbus/qe.c b/sys/dev/sbus/qe.c index 481e0749269..e8b5a387d75 100644 --- a/sys/dev/sbus/qe.c +++ b/sys/dev/sbus/qe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qe.c,v 1.28 2015/04/07 14:59:06 mpi Exp $ */ +/* $OpenBSD: qe.c,v 1.29 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: qe.c,v 1.16 2001/03/30 17:30:18 christos Exp $ */ /*- @@ -420,7 +420,6 @@ qe_read(sc, idx, len) ifp->if_ierrors++; return; } - ifp->if_ipackets++; ml_enqueue(&ml, m); if_input(ifp, &ml); diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c index 77939bc9946..6423773fbf4 100644 --- a/sys/dev/usb/if_atu.c +++ b/sys/dev/usb/if_atu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atu.c,v 1.111 2015/02/10 23:25:46 mpi Exp $ */ +/* $OpenBSD: if_atu.c,v 1.112 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2003, 2004 * Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved. @@ -1699,8 +1699,6 @@ atu_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) wh = mtod(m, struct ieee80211_frame *); ni = ieee80211_find_rxnode(ic, wh); - ifp->if_ipackets++; - s = splnet(); if (atu_newbuf(sc, c, NULL) == ENOBUFS) { diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index bb69039722b..126de08da56 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_aue.c,v 1.99 2015/06/18 10:02:49 mpi Exp $ */ +/* $OpenBSD: if_aue.c,v 1.100 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1052,7 +1052,6 @@ aue_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m = c->aue_mbuf; total_len -= ETHER_CRC_LEN + 4; m->m_pkthdr.len = m->m_len = total_len; - ifp->if_ipackets++; ml_enqueue(&ml, m); if (aue_newbuf(sc, c, NULL) == ENOBUFS) { diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index 3d37736ebd6..c86d8eb3045 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_axe.c,v 1.131 2015/06/12 15:47:31 mpi Exp $ */ +/* $OpenBSD: if_axe.c,v 1.132 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org> @@ -1059,7 +1059,6 @@ axe_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done; } - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = pktlen; memcpy(mtod(m, char *), buf, pktlen); diff --git a/sys/dev/usb/if_axen.c b/sys/dev/usb/if_axen.c index 6d7e9c65c83..18fabf24945 100644 --- a/sys/dev/usb/if_axen.c +++ b/sys/dev/usb/if_axen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_axen.c,v 1.13 2015/06/12 15:47:31 mpi Exp $ */ +/* $OpenBSD: if_axen.c,v 1.14 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2013 Yojiro UO <yuo@openbsd.org> @@ -1036,7 +1036,6 @@ axen_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) } /* skip pseudo header (2byte) */ - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = pkt_len - 2; #ifdef AXEN_TOE diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c index eeace64dc53..d0b458588ae 100644 --- a/sys/dev/usb/if_cdce.c +++ b/sys/dev/usb/if_cdce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cdce.c,v 1.64 2015/04/10 08:41:43 mpi Exp $ */ +/* $OpenBSD: if_cdce.c,v 1.65 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com> @@ -767,7 +767,6 @@ cdce_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done; } - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = total_len; ml_enqueue(&ml, m); diff --git a/sys/dev/usb/if_cdcef.c b/sys/dev/usb/if_cdcef.c index f85a2029c03..1fe0adc8205 100644 --- a/sys/dev/usb/if_cdcef.c +++ b/sys/dev/usb/if_cdcef.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cdcef.c,v 1.36 2015/04/10 08:41:43 mpi Exp $ */ +/* $OpenBSD: if_cdcef.c,v 1.37 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2007 Dale Rahn <drahn@openbsd.org> @@ -415,7 +415,6 @@ cdcef_rxeof(struct usbf_xfer *xfer, void *priv, m->m_pkthdr.len = m->m_len = total_len; bcopy(sc->sc_buffer_out, mtod(m, char *), total_len); - ifp->if_ipackets++; ml_enqueue(&ml, m); } diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index b96b718f4c5..9c62e5fa436 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cue.c,v 1.70 2015/04/10 08:41:43 mpi Exp $ */ +/* $OpenBSD: if_cue.c,v 1.71 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_cue.c,v 1.40 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -719,7 +719,6 @@ cue_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done; } - ifp->if_ipackets++; m_adj(m, sizeof(u_int16_t)); m->m_pkthdr.len = m->m_len = total_len; ml_enqueue(&ml, m); diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index 0e1630eeee5..9881333159e 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_kue.c,v 1.79 2015/04/10 08:41:43 mpi Exp $ */ +/* $OpenBSD: if_kue.c,v 1.80 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -727,7 +727,6 @@ kue_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done; } - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = total_len; ml_enqueue(&ml, m); diff --git a/sys/dev/usb/if_mos.c b/sys/dev/usb/if_mos.c index c97b6455f87..b0a737deb7c 100644 --- a/sys/dev/usb/if_mos.c +++ b/sys/dev/usb/if_mos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mos.c,v 1.30 2015/05/02 10:44:29 jsg Exp $ */ +/* $OpenBSD: if_mos.c,v 1.31 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2008 Johann Christian Rode <jcrode@gmx.net> @@ -962,7 +962,6 @@ mos_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done; } - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = pktlen; memcpy(mtod(m, char *), buf, pktlen); diff --git a/sys/dev/usb/if_smsc.c b/sys/dev/usb/if_smsc.c index 697d436aa10..616f0756612 100644 --- a/sys/dev/usb/if_smsc.c +++ b/sys/dev/usb/if_smsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_smsc.c,v 1.19 2015/06/18 09:28:54 mpi Exp $ */ +/* $OpenBSD: if_smsc.c,v 1.20 2015/06/24 09:40:54 mpi Exp $ */ /* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */ /*- * Copyright (c) 2012 @@ -1211,7 +1211,6 @@ smsc_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done; } - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = pktlen; m_adj(m, ETHER_ALIGN); diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index b45214b0e55..715b94b360a 100644 --- a/sys/dev/usb/if_udav.c +++ b/sys/dev/usb/if_udav.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_udav.c,v 1.71 2015/06/19 20:39:34 uaa Exp $ */ +/* $OpenBSD: if_udav.c,v 1.72 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_udav.c,v 1.3 2004/04/23 17:25:25 itojun Exp $ */ /* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */ /* @@ -1104,7 +1104,6 @@ udav_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m = c->udav_mbuf; memcpy(mtod(m, char *), c->udav_buf + UDAV_RX_HDRLEN, total_len); - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = total_len; ml_enqueue(&ml, m); diff --git a/sys/dev/usb/if_ugl.c b/sys/dev/usb/if_ugl.c index 74a483fe6ea..6e1692813f4 100644 --- a/sys/dev/usb/if_ugl.c +++ b/sys/dev/usb/if_ugl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ugl.c,v 1.12 2015/06/20 11:35:27 mpi Exp $ */ +/* $OpenBSD: if_ugl.c,v 1.13 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 2013 SASANO Takayoshi <uaa@uaa.org.uk> @@ -478,7 +478,6 @@ ugl_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m = c->ugl_mbuf; memcpy(mtod(c->ugl_mbuf, char *), c->ugl_buf->pkt_data, packet_len); - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = packet_len; ml_enqueue(&ml, m); diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c index 78a8b105331..429fa99089c 100644 --- a/sys/dev/usb/if_upl.c +++ b/sys/dev/usb/if_upl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_upl.c,v 1.65 2015/05/21 09:22:39 mpi Exp $ */ +/* $OpenBSD: if_upl.c,v 1.66 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -455,7 +455,6 @@ upl_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m = c->upl_mbuf; memcpy(mtod(c->upl_mbuf, char *), c->upl_buf, total_len); - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = total_len; ml_enqueue(&ml, m); diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c index 82fd68d2bb1..e785409e7ed 100644 --- a/sys/dev/usb/if_url.c +++ b/sys/dev/usb/if_url.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_url.c,v 1.74 2015/03/27 19:20:56 uaa Exp $ */ +/* $OpenBSD: if_url.c,v 1.75 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */ /* * Copyright (c) 2001, 2002 @@ -965,7 +965,6 @@ url_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done; } - ifp->if_ipackets++; total_len -= ETHER_CRC_LEN; m = c->url_mbuf; diff --git a/sys/dev/usb/if_urndis.c b/sys/dev/usb/if_urndis.c index 3b654ef6346..e059263cb44 100644 --- a/sys/dev/usb/if_urndis.c +++ b/sys/dev/usb/if_urndis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_urndis.c,v 1.54 2015/03/14 03:38:49 jsg Exp $ */ +/* $OpenBSD: if_urndis.c,v 1.55 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2010 Jonathan Armani <armani@openbsd.org> @@ -868,8 +868,6 @@ urndis_decap(struct urndis_softc *sc, struct urndis_chain *c, u_int32_t len) letoh32(msg->rm_datalen)); m->m_pkthdr.len = m->m_len = letoh32(msg->rm_datalen); - ifp->if_ipackets++; - if (urndis_newbuf(sc, c) == ENOBUFS) { ifp->if_ierrors++; } else { |