From db4dc9aafbed936e879d4362ca141e998a6e925c Mon Sep 17 00:00:00 2001 From: mpi Date: Wed, 24 Jun 2015 09:40:53 +0000 Subject: [PATCH] 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@ --- sys/arch/armv7/imx/imxenet.c | 3 +-- sys/arch/armv7/omap/if_cpsw.c | 4 +--- sys/arch/armv7/sunxi/sxie.c | 3 +-- sys/arch/macppc/dev/if_bm.c | 3 +-- sys/arch/macppc/dev/if_mc.c | 3 +-- sys/arch/octeon/dev/cn30xxgmx.c | 4 +--- sys/arch/sgi/dev/if_iec.c | 4 +--- sys/arch/sgi/dev/if_mec.c | 4 +--- sys/arch/sgi/hpc/if_sq.c | 4 +--- sys/arch/socppc/dev/if_tsec.c | 4 +--- sys/arch/sparc/dev/be.c | 3 +-- sys/arch/sparc/dev/hme.c | 4 +--- sys/arch/sparc/dev/if_ie.c | 4 +--- sys/arch/sparc/dev/qe.c | 3 +-- sys/arch/sparc64/dev/vnet.c | 5 +---- sys/arch/vax/if/if_de.c | 4 +--- sys/arch/vax/if/sgec.c | 3 +-- sys/dev/ic/aic6915.c | 5 +---- sys/dev/ic/dc.c | 24 ++++++++++-------------- sys/dev/ic/dp8390.c | 3 +-- sys/dev/ic/elink3.c | 4 +--- sys/dev/ic/fxp.c | 3 +-- sys/dev/ic/gem.c | 4 +--- sys/dev/ic/hme.c | 4 +--- sys/dev/ic/i82596.c | 4 +--- sys/dev/ic/if_wi.c | 4 +--- sys/dev/ic/lance.c | 4 +--- sys/dev/ic/lemac.c | 3 +-- sys/dev/ic/mtd8xx.c | 18 ++++++++---------- sys/dev/ic/re.c | 4 +--- sys/dev/ic/rtl81x9.c | 4 +--- sys/dev/ic/smc83c170.c | 3 +-- sys/dev/ic/smc91cxx.c | 3 +-- sys/dev/ic/ti.c | 3 +-- sys/dev/ic/xl.c | 3 +-- sys/dev/isa/if_ef_isapnp.c | 4 +--- sys/dev/isa/if_eg.c | 4 +--- sys/dev/isa/if_el.c | 4 +--- sys/dev/isa/if_ex.c | 3 +-- sys/dev/isa/if_ie.c | 3 +-- sys/dev/pci/if_age.c | 4 +--- sys/dev/pci/if_alc.c | 4 +--- sys/dev/pci/if_ale.c | 4 +--- sys/dev/pci/if_bce.c | 3 +-- sys/dev/pci/if_bge.c | 3 +-- sys/dev/pci/if_bnx.c | 5 +---- sys/dev/pci/if_cas.c | 4 +--- sys/dev/pci/if_de.c | 3 +-- sys/dev/pci/if_em.c | 4 +--- sys/dev/pci/if_et.c | 3 +-- sys/dev/pci/if_ix.c | 3 +-- sys/dev/pci/if_ixgb.c | 3 +-- sys/dev/pci/if_jme.c | 4 +--- sys/dev/pci/if_lge.c | 4 +--- sys/dev/pci/if_lii.c | 3 +-- sys/dev/pci/if_msk.c | 4 +--- sys/dev/pci/if_myx.c | 4 +--- sys/dev/pci/if_nep.c | 3 +-- sys/dev/pci/if_nfe.c | 3 +-- sys/dev/pci/if_nge.c | 4 +--- sys/dev/pci/if_oce.c | 4 +--- sys/dev/pci/if_pcn.c | 3 +-- sys/dev/pci/if_se.c | 3 +-- sys/dev/pci/if_sis.c | 3 +-- sys/dev/pci/if_sk.c | 3 +-- sys/dev/pci/if_ste.c | 3 +-- sys/dev/pci/if_stge.c | 5 +---- sys/dev/pci/if_tht.c | 5 +---- sys/dev/pci/if_tl.c | 3 +-- sys/dev/pci/if_txp.c | 3 +-- sys/dev/pci/if_vge.c | 4 +--- sys/dev/pci/if_vic.c | 4 +--- sys/dev/pci/if_vio.c | 3 +-- sys/dev/pci/if_vmx.c | 3 +-- sys/dev/pci/if_vr.c | 4 +--- sys/dev/pci/if_vte.c | 3 +-- sys/dev/pci/if_wb.c | 4 +--- sys/dev/pci/if_xge.c | 4 +--- sys/dev/pcmcia/if_cnw.c | 3 +-- sys/dev/pcmcia/if_malo.c | 3 +-- sys/dev/pcmcia/if_xe.c | 3 +-- sys/dev/sbus/be.c | 3 +-- sys/dev/sbus/qe.c | 3 +-- sys/dev/usb/if_atu.c | 4 +--- sys/dev/usb/if_aue.c | 3 +-- sys/dev/usb/if_axe.c | 3 +-- sys/dev/usb/if_axen.c | 3 +-- sys/dev/usb/if_cdce.c | 3 +-- sys/dev/usb/if_cdcef.c | 3 +-- sys/dev/usb/if_cue.c | 3 +-- sys/dev/usb/if_kue.c | 3 +-- sys/dev/usb/if_mos.c | 3 +-- sys/dev/usb/if_smsc.c | 3 +-- sys/dev/usb/if_udav.c | 3 +-- sys/dev/usb/if_ugl.c | 3 +-- sys/dev/usb/if_upl.c | 3 +-- sys/dev/usb/if_url.c | 3 +-- sys/dev/usb/if_urndis.c | 4 +--- sys/net/if.c | 4 +++- sys/net/if_bridge.c | 5 +---- sys/net/if_trunk.c | 3 +-- sys/net/if_tun.c | 3 +-- sys/net/if_vlan.c | 3 +-- sys/net/if_vxlan.c | 4 +--- sys/net80211/ieee80211_input.c | 4 ++-- sys/netinet/ip_carp.c | 4 +--- 106 files changed, 125 insertions(+), 283 deletions(-) diff --git a/sys/arch/armv7/imx/imxenet.c b/sys/arch/armv7/imx/imxenet.c index af51ca91950..77eafd3b255 100644 --- a/sys/arch/armv7/imx/imxenet.c +++ b/sys/arch/armv7/imx/imxenet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxenet.c,v 1.15 2015/05/14 02:10:29 djm Exp $ */ +/* $OpenBSD: imxenet.c,v 1.16 2015/06/24 09:40:53 mpi Exp $ */ /* * Copyright (c) 2012-2013 Patrick Wildt * @@ -970,7 +970,6 @@ imxenet_recv(struct imxenet_softc *sc) goto done; } - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = sc->rx_desc_base[sc->cur_rx].data_length; m_adj(m, ETHER_ALIGN); diff --git a/sys/arch/armv7/omap/if_cpsw.c b/sys/arch/armv7/omap/if_cpsw.c index b32bb0e84df..136bdae1b91 100644 --- a/sys/arch/armv7/omap/if_cpsw.c +++ b/sys/arch/armv7/omap/if_cpsw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cpsw.c,v 1.25 2015/03/16 16:21:21 mpi Exp $ */ +/* $OpenBSD: if_cpsw.c,v 1.26 2015/06/24 09:40:53 mpi Exp $ */ /* $NetBSD: if_cpsw.c,v 1.3 2013/04/17 14:36:34 bouyer Exp $ */ /* @@ -1026,8 +1026,6 @@ cpsw_rxintr(void *arg) m->m_pkthdr.len = m->m_len = len; m->m_data += off; - ifp->if_ipackets++; - ml_enqueue(&ml, m); next: diff --git a/sys/arch/armv7/sunxi/sxie.c b/sys/arch/armv7/sunxi/sxie.c index 8765fc5a3b0..1cfa1b68581 100644 --- a/sys/arch/armv7/sunxi/sxie.c +++ b/sys/arch/armv7/sunxi/sxie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sxie.c,v 1.8 2015/04/03 06:48:58 mpi Exp $ */ +/* $OpenBSD: sxie.c,v 1.9 2015/06/24 09:40:53 mpi Exp $ */ /* * Copyright (c) 2012-2013 Patrick Wildt * Copyright (c) 2013 Artturi Alm @@ -600,7 +600,6 @@ trynext: if (pktlen > SXIE_MAX_PKT_SIZE) pktlen = SXIE_MAX_PKT_SIZE; /* XXX is truncating ok? */ - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = pktlen; /* XXX m->m_pkthdr.csum_flags ? */ m_adj(m, ETHER_ALIGN); diff --git a/sys/arch/macppc/dev/if_bm.c b/sys/arch/macppc/dev/if_bm.c index 45f4da2146a..a37ab4ec488 100644 --- a/sys/arch/macppc/dev/if_bm.c +++ b/sys/arch/macppc/dev/if_bm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bm.c,v 1.32 2015/05/13 10:42:46 jsg Exp $ */ +/* $OpenBSD: if_bm.c,v 1.33 2015/06/24 09:40:53 mpi Exp $ */ /* $NetBSD: if_bm.c,v 1.1 1999/01/01 01:27:52 tsubai Exp $ */ /*- @@ -549,7 +549,6 @@ bmac_rint(void *v) } ml_enqueue(&ml, m); - ifp->if_ipackets++; next: DBDMA_BUILD_CMD(cmd, DBDMA_CMD_IN_LAST, 0, DBDMA_INT_ALWAYS, diff --git a/sys/arch/macppc/dev/if_mc.c b/sys/arch/macppc/dev/if_mc.c index 7f7d46df12a..bf48196051f 100644 --- a/sys/arch/macppc/dev/if_mc.c +++ b/sys/arch/macppc/dev/if_mc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mc.c,v 1.20 2015/02/09 03:09:57 dlg Exp $ */ +/* $OpenBSD: if_mc.c,v 1.21 2015/06/24 09:40:53 mpi Exp $ */ /* $NetBSD: if_mc.c,v 1.9.16.1 2006/06/21 14:53:13 yamt Exp $ */ /*- @@ -896,7 +896,6 @@ mace_read(struct mc_softc *sc, caddr_t pkt, int len) ml_enqueue(&ml, m); if_input(ifp, &ml); - ifp->if_ipackets++; } /* diff --git a/sys/arch/octeon/dev/cn30xxgmx.c b/sys/arch/octeon/dev/cn30xxgmx.c index a2ce29348fd..70d6c8ac5c7 100644 --- a/sys/arch/octeon/dev/cn30xxgmx.c +++ b/sys/arch/octeon/dev/cn30xxgmx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cn30xxgmx.c,v 1.18 2015/02/11 07:05:39 dlg Exp $ */ +/* $OpenBSD: cn30xxgmx.c,v 1.19 2015/06/24 09:40:53 mpi Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -1113,8 +1113,6 @@ cn30xxgmx_stats(struct cn30xxgmx_port_softc *sc) struct ifnet *ifp = &sc->sc_port_ac->ac_if; uint64_t tmp; - ifp->if_ipackets += - (uint32_t)_GMX_PORT_RD8(sc, GMX0_RX0_STATS_PKTS); ifp->if_ierrors += (uint32_t)_GMX_PORT_RD8(sc, GMX0_RX0_STATS_PKTS_BAD); ifp->if_iqdrops += diff --git a/sys/arch/sgi/dev/if_iec.c b/sys/arch/sgi/dev/if_iec.c index f9c7495ae78..6a66bf32e45 100644 --- a/sys/arch/sgi/dev/if_iec.c +++ b/sys/arch/sgi/dev/if_iec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iec.c,v 1.13 2015/03/11 22:14:43 mpi Exp $ */ +/* $OpenBSD: if_iec.c,v 1.14 2015/06/24 09:40:53 mpi Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. @@ -1302,8 +1302,6 @@ dropit: rxd->rxd_stat = 0; IEC_RXSTATSYNC(sc, i, BUS_DMASYNC_PREREAD); - ifp->if_ipackets++; - ml_enqueue(&ml, m); } diff --git a/sys/arch/sgi/dev/if_mec.c b/sys/arch/sgi/dev/if_mec.c index 33859bf96bc..1acf49eb7b4 100644 --- a/sys/arch/sgi/dev/if_mec.c +++ b/sys/arch/sgi/dev/if_mec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mec.c,v 1.29 2015/03/11 16:08:54 mpi Exp $ */ +/* $OpenBSD: if_mec.c,v 1.30 2015/06/24 09:40:53 mpi Exp $ */ /* $NetBSD: if_mec_mace.c,v 1.5 2004/08/01 06:36:36 tsutsui Exp $ */ /* @@ -1308,8 +1308,6 @@ mec_rxintr(struct mec_softc *sc, uint32_t stat) m->m_pkthdr.len = m->m_len = len - ETHER_CRC_LEN; - ifp->if_ipackets++; - ml_enqueue(&ml, m); } diff --git a/sys/arch/sgi/hpc/if_sq.c b/sys/arch/sgi/hpc/if_sq.c index 6c6b33b6691..621fe6fb237 100644 --- a/sys/arch/sgi/hpc/if_sq.c +++ b/sys/arch/sgi/hpc/if_sq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sq.c,v 1.13 2015/03/29 11:03:34 mpi Exp $ */ +/* $OpenBSD: if_sq.c,v 1.14 2015/06/24 09:40:53 mpi Exp $ */ /* $NetBSD: if_sq.c,v 1.42 2011/07/01 18:53:47 dyoung Exp $ */ /* @@ -1188,8 +1188,6 @@ sq_rxintr(struct sq_softc *sc) m->m_data += 2; m->m_pkthdr.len = m->m_len = framelen; - ifp->if_ipackets++; - SQ_DPRINTF(("%s: sq_rxintr: buf %d len %d\n", sc->sc_dev.dv_xname, i, framelen)); diff --git a/sys/arch/socppc/dev/if_tsec.c b/sys/arch/socppc/dev/if_tsec.c index 95f91e3628c..0802d0b898f 100644 --- a/sys/arch/socppc/dev/if_tsec.c +++ b/sys/arch/socppc/dev/if_tsec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tsec.c,v 1.36 2015/04/08 10:49:25 mpi Exp $ */ +/* $OpenBSD: if_tsec.c,v 1.37 2015/06/24 09:40:53 mpi Exp $ */ /* * Copyright (c) 2008 Mark Kettenis @@ -882,8 +882,6 @@ tsec_rx_proc(struct tsec_softc *sc) rxb->tb_m = NULL; m->m_pkthdr.len = m->m_len = len; - ifp->if_ipackets++; - ml_enqueue(&ml, m); if_rxr_put(&sc->sc_rx_ring, 1); diff --git a/sys/arch/sparc/dev/be.c b/sys/arch/sparc/dev/be.c index 256ce82f21f..1fdd86b11cb 100644 --- a/sys/arch/sparc/dev/be.c +++ b/sys/arch/sparc/dev/be.c @@ -1,4 +1,4 @@ -/* $OpenBSD: be.c,v 1.50 2015/03/29 10:59:47 mpi Exp $ */ +/* $OpenBSD: be.c,v 1.51 2015/06/24 09:40:53 mpi Exp $ */ /* * Copyright (c) 1998 Theo de Raadt and Jason L. Wright. @@ -1009,7 +1009,6 @@ be_read(sc, idx, len) ifp->if_ierrors++; return; } - ifp->if_ipackets++; ml_enqueue(&ml, m); if_input(ifp, &ml); diff --git a/sys/arch/sparc/dev/hme.c b/sys/arch/sparc/dev/hme.c index f2c48147eba..79d6a966675 100644 --- a/sys/arch/sparc/dev/hme.c +++ b/sys/arch/sparc/dev/hme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hme.c,v 1.69 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: hme.c,v 1.70 2015/06/24 09:40:53 mpi Exp $ */ /* * Copyright (c) 1998 Jason L. Wright (jason@thought.net) @@ -834,8 +834,6 @@ hme_read(sc, idx, len, flags) return; } - ifp->if_ipackets++; - ml_enqueue(&ml, m); if_input(ifp, &ml); } diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c index 6930e5e784c..536b6f73a79 100644 --- a/sys/arch/sparc/dev/if_ie.c +++ b/sys/arch/sparc/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.52 2015/05/25 12:40:04 miod Exp $ */ +/* $OpenBSD: if_ie.c,v 1.53 2015/06/24 09:40:53 mpi Exp $ */ /* $NetBSD: if_ie.c,v 1.33 1997/07/29 17:55:38 fair Exp $ */ /*- @@ -783,7 +783,6 @@ ierint(sc) status = sc->rframes[i]->ie_fd_status; if ((status & IE_FD_COMPLETE) && (status & IE_FD_OK)) { - sc->sc_arpcom.ac_if.if_ipackets++; if (!--timesthru) { sc->sc_arpcom.ac_if.if_ierrors += SWAP(scb->ie_err_crc) + @@ -1260,7 +1259,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/arch/sparc/dev/qe.c b/sys/arch/sparc/dev/qe.c index 399c76d85fe..9295dc16dc7 100644 --- a/sys/arch/sparc/dev/qe.c +++ b/sys/arch/sparc/dev/qe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qe.c,v 1.39 2015/03/29 10:59:47 mpi Exp $ */ +/* $OpenBSD: qe.c,v 1.40 2015/06/24 09:40:53 mpi Exp $ */ /* * Copyright (c) 1998, 2000 Jason L. Wright. @@ -768,7 +768,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/arch/sparc64/dev/vnet.c b/sys/arch/sparc64/dev/vnet.c index 4bb9beddff5..5d87b971661 100644 --- a/sys/arch/sparc64/dev/vnet.c +++ b/sys/arch/sparc64/dev/vnet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnet.c,v 1.45 2015/06/21 20:04:30 kettenis Exp $ */ +/* $OpenBSD: vnet.c,v 1.46 2015/06/24 09:40:53 mpi Exp $ */ /* * Copyright (c) 2009, 2015 Mark Kettenis * @@ -741,8 +741,6 @@ vnet_rx_vio_desc_data(struct vnet_softc *sc, struct vio_msg_tag *tag) goto skip; } - ifp->if_ipackets++; - /* Pass it on. */ ml_enqueue(&ml, m); if_input(ifp, &ml); @@ -826,7 +824,6 @@ vnet_rx_vio_dring_data(struct vnet_softc *sc, struct vio_msg_tag *tag) m = MCLGETI(NULL, M_DONTWAIT, NULL, desc.nbytes); if (!m) break; - ifp->if_ipackets++; m->m_len = m->m_pkthdr.len = desc.nbytes; nbytes = roundup(desc.nbytes + VNET_ETHER_ALIGN, 8); diff --git a/sys/arch/vax/if/if_de.c b/sys/arch/vax/if/if_de.c index cc895ab8c8e..8b8c062c507 100644 --- a/sys/arch/vax/if/if_de.c +++ b/sys/arch/vax/if/if_de.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_de.c,v 1.28 2015/05/13 10:42:46 jsg Exp $ */ +/* $OpenBSD: if_de.c,v 1.29 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_de.c,v 1.27 1997/04/19 15:02:29 ragge Exp $ */ /* @@ -440,7 +440,6 @@ deintr(unit) ds->ds_if.if_collisions += 2; /* guess */ } else if (rp->r_flags & XFLG_MTCH) { /* received our own packet */ - ds->ds_if.if_ipackets++; deread(ds, &ifxp->ifrw, rp->r_slen - sizeof (struct ether_header)); } @@ -483,7 +482,6 @@ derecv(unit) rp = &ds->ds_rrent[ds->ds_rindex]; while ((rp->r_flags & RFLG_OWN) == 0) { - ds->ds_if.if_ipackets++; if (ds->ds_deuba.iff_flags & UBA_NEEDBDP) { struct uba_softc *uh = (void *)ds->ds_dev.dv_parent; diff --git a/sys/arch/vax/if/sgec.c b/sys/arch/vax/if/sgec.c index 4c459bdee94..9431e050089 100644 --- a/sys/arch/vax/if/sgec.c +++ b/sys/arch/vax/if/sgec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sgec.c,v 1.28 2015/05/13 10:42:46 jsg Exp $ */ +/* $OpenBSD: sgec.c,v 1.29 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: sgec.c,v 1.5 2000/06/04 02:14:14 matt Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved. @@ -484,7 +484,6 @@ sgec_rxintr(struct ze_softc *sc) ifp->if_collisions++; m = NULL; } else { - ifp->if_ipackets++; m = sc->sc_rxmbuf[sc->sc_nextrx]; len = zc->zc_recv[sc->sc_nextrx].ze_framelen; } 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 @@ -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 @@ -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 * 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 * 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 @@ -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 @@ -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 * 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 @@ -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 @@ -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 @@ -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 . 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 . 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 @@ -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 @@ -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 * 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 @@ -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 . 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 { diff --git a/sys/net/if.c b/sys/net/if.c index 453c43e0a07..c4bff326dd9 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.341 2015/06/23 09:42:23 mpi Exp $ */ +/* $OpenBSD: if.c,v 1.342 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -485,6 +485,8 @@ if_input(struct ifnet *ifp, struct mbuf_list *ml) splassert(IPL_NET); + ifp->if_ipackets += ml_len(ml); + MBUF_LIST_FOREACH(ml, m) { m->m_pkthdr.ph_ifidx = ifp->if_index; m->m_pkthdr.ph_rtableid = ifp->if_rdomain; diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 9bf5fda2476..122dab66d59 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.245 2015/06/23 09:42:23 mpi Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.246 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -1387,7 +1387,6 @@ bridge_input(struct mbuf *m) m->m_flags |= M_PROTO1; ml_enqueue(&ml, m); if_input(ifl->ifp, &ml); - ifl->ifp->if_ipackets++; return (NULL); } } @@ -1432,7 +1431,6 @@ bridge_input(struct mbuf *m) m->m_flags |= M_PROTO1; ml_enqueue(&ml, m); if_input(ifl->ifp, &ml); - ifl->ifp->if_ipackets++; return (NULL); } if (bcmp(ac->ac_enaddr, eh->ether_shost, ETHER_ADDR_LEN) == 0 @@ -1596,7 +1594,6 @@ bridge_localbroadcast(struct bridge_softc *sc, struct ifnet *ifp, s = splnet(); if_input(ifp, &ml); splx(s); - ifp->if_ipackets++; } void diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c index ba3887168db..ebd3211d57b 100644 --- a/sys/net/if_trunk.c +++ b/sys/net/if_trunk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.c,v 1.103 2015/06/16 11:09:39 mpi Exp $ */ +/* $OpenBSD: if_trunk.c,v 1.104 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Reyk Floeter @@ -1130,7 +1130,6 @@ trunk_input(struct mbuf *m) ml_enqueue(&ml, m); if_input(trifp, &ml); - trifp->if_ipackets++; return (1); bad: diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 41ef1053770..70a9df3f289 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.146 2015/06/16 11:09:39 mpi Exp $ */ +/* $OpenBSD: if_tun.c,v 1.147 2015/06/24 09:40:54 mpi Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -879,7 +879,6 @@ tunwrite(dev_t dev, struct uio *uio, int ioflag) s = splnet(); if_input(ifp, &ml); splx(s); - ifp->if_ipackets++; return (0); } diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 8c359fde4e9..1ed43aff7ca 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan.c,v 1.130 2015/06/23 09:42:23 mpi Exp $ */ +/* $OpenBSD: if_vlan.c,v 1.131 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology @@ -339,7 +339,6 @@ vlan_input(struct mbuf *m) ml_enqueue(&ml, m); if_input(&ifv->ifv_if, &ml); - ifv->ifv_if.if_ipackets++; return (1); } diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index 4ffa46ec6a7..bde92058a93 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vxlan.c,v 1.24 2015/04/13 08:40:32 mpi Exp $ */ +/* $OpenBSD: if_vxlan.c,v 1.25 2015/06/24 09:40:54 mpi Exp $ */ /* * Copyright (c) 2013 Reyk Floeter @@ -529,9 +529,7 @@ vxlan_lookup(struct mbuf *m, struct udphdr *uh, int iphlen, pf_pkt_addr_changed(m); #endif - ifp->if_ipackets++; ml_enqueue(&ml, m); - if_input(ifp, &ml); /* success */ diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index aae984764dd..f1d539b9028 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_input.c,v 1.134 2015/05/26 15:34:00 mpi Exp $ */ +/* $OpenBSD: ieee80211_input.c,v 1.135 2015/06/24 09:40:54 mpi Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe @@ -815,7 +815,6 @@ ieee80211_deliver_data(struct ieee80211com *ic, struct mbuf *m, m_freem(m); return; } - ifp->if_ipackets++; /* * Perform as a bridge within the AP. Notice that we do not @@ -851,6 +850,7 @@ ieee80211_deliver_data(struct ieee80211com *ic, struct mbuf *m, if (m != NULL) { if ((ic->ic_flags & IEEE80211_F_RSNON) && eh->ether_type == htons(ETHERTYPE_PAE)) { + ifp->if_ipackets++; #if NBPFILTER > 0 /* * If we forward frame into transmitter of the AP, diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 76bd3a3367d..5916e1b2fa7 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.260 2015/06/16 11:09:40 mpi Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.261 2015/06/24 09:40:55 mpi Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -1456,7 +1456,6 @@ carp_input(struct mbuf *m) ml_enqueue(&ml, m0); if_input(&vh->sc_if, &ml); - vh->sc_if.if_ipackets++; } return (0); @@ -1476,7 +1475,6 @@ carp_input(struct mbuf *m) ml_enqueue(&ml, m); if_input(ifp, &ml); - ifp->if_ipackets++; return (1); } -- 2.20.1