summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2017-01-22 10:17:40 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2017-01-22 10:17:40 +0000
commitf6129f414cbe94169beb11dd59307556f48ba33a (patch)
treee5c7e9e39df56a638f353df59c91293716e91790
parentdc8502d359a9b47a4fc9b0ee84cfd6ce8b1cd350 (diff)
move counting if_opackets next to counting if_obytes in if_enqueue.
this means packets are consistently counted in one place, unlike the many and various ways that drivers thought they should do it. ok mpi@ deraadt@
-rw-r--r--sys/arch/armv7/imx/if_fec.c4
-rw-r--r--sys/arch/armv7/omap/if_cpsw.c4
-rw-r--r--sys/arch/armv7/sunxi/sxie.c6
-rw-r--r--sys/arch/macppc/dev/if_bm.c4
-rw-r--r--sys/arch/macppc/dev/if_mc.c4
-rw-r--r--sys/arch/octeon/dev/cn30xxgmx.c4
-rw-r--r--sys/arch/sgi/dev/if_iec.c3
-rw-r--r--sys/arch/sgi/dev/if_mec.c3
-rw-r--r--sys/arch/sgi/hpc/if_sq.c4
-rw-r--r--sys/arch/socppc/dev/if_tsec.c3
-rw-r--r--sys/arch/sparc64/dev/vnet.c4
-rw-r--r--sys/dev/ic/acx.c5
-rw-r--r--sys/dev/ic/aic6915.c4
-rw-r--r--sys/dev/ic/am7990.c3
-rw-r--r--sys/dev/ic/am79900.c3
-rw-r--r--sys/dev/ic/an.c5
-rw-r--r--sys/dev/ic/ar5008.c3
-rw-r--r--sys/dev/ic/ar9003.c3
-rw-r--r--sys/dev/ic/ath.c3
-rw-r--r--sys/dev/ic/atw.c4
-rw-r--r--sys/dev/ic/bwi.c4
-rw-r--r--sys/dev/ic/dc.c3
-rw-r--r--sys/dev/ic/dp8390.c8
-rw-r--r--sys/dev/ic/dwc_gmac.c5
-rw-r--r--sys/dev/ic/elink3.c4
-rw-r--r--sys/dev/ic/fxp.c3
-rw-r--r--sys/dev/ic/gem.c3
-rw-r--r--sys/dev/ic/hme.c4
-rw-r--r--sys/dev/ic/i82596.c3
-rw-r--r--sys/dev/ic/if_wi.c4
-rw-r--r--sys/dev/ic/lemac.c3
-rw-r--r--sys/dev/ic/malo.c3
-rw-r--r--sys/dev/ic/mtd8xx.c3
-rw-r--r--sys/dev/ic/pgt.c3
-rw-r--r--sys/dev/ic/re.c4
-rw-r--r--sys/dev/ic/rt2560.c4
-rw-r--r--sys/dev/ic/rt2661.c3
-rw-r--r--sys/dev/ic/rt2860.c4
-rw-r--r--sys/dev/ic/rtl81x9.c6
-rw-r--r--sys/dev/ic/rtw.c3
-rw-r--r--sys/dev/ic/smc83c170.c4
-rw-r--r--sys/dev/ic/smc91cxx.c3
-rw-r--r--sys/dev/ic/ti.c7
-rw-r--r--sys/dev/ic/xl.c5
-rw-r--r--sys/dev/isa/if_ef_isapnp.c4
-rw-r--r--sys/dev/isa/if_eg.c5
-rw-r--r--sys/dev/isa/if_el.c3
-rw-r--r--sys/dev/isa/if_ex.c7
-rw-r--r--sys/dev/isa/if_ie.c3
-rw-r--r--sys/dev/pci/if_age.c5
-rw-r--r--sys/dev/pci/if_alc.c5
-rw-r--r--sys/dev/pci/if_ale.c5
-rw-r--r--sys/dev/pci/if_bce.c3
-rw-r--r--sys/dev/pci/if_bge.c4
-rw-r--r--sys/dev/pci/if_bnx.c4
-rw-r--r--sys/dev/pci/if_cas.c3
-rw-r--r--sys/dev/pci/if_de.c3
-rw-r--r--sys/dev/pci/if_em.c4
-rw-r--r--sys/dev/pci/if_et.c3
-rw-r--r--sys/dev/pci/if_ipw.c5
-rw-r--r--sys/dev/pci/if_iwi.c4
-rw-r--r--sys/dev/pci/if_iwm.c4
-rw-r--r--sys/dev/pci/if_iwn.c5
-rw-r--r--sys/dev/pci/if_ix.c3
-rw-r--r--sys/dev/pci/if_ixgb.c4
-rw-r--r--sys/dev/pci/if_jme.c3
-rw-r--r--sys/dev/pci/if_lge.c3
-rw-r--r--sys/dev/pci/if_lii.c6
-rw-r--r--sys/dev/pci/if_msk.c4
-rw-r--r--sys/dev/pci/if_myx.c4
-rw-r--r--sys/dev/pci/if_nep.c3
-rw-r--r--sys/dev/pci/if_nfe.c8
-rw-r--r--sys/dev/pci/if_nge.c3
-rw-r--r--sys/dev/pci/if_nxe.c3
-rw-r--r--sys/dev/pci/if_oce.c5
-rw-r--r--sys/dev/pci/if_pcn.c3
-rw-r--r--sys/dev/pci/if_rtwn.c3
-rw-r--r--sys/dev/pci/if_se.c5
-rw-r--r--sys/dev/pci/if_sis.c3
-rw-r--r--sys/dev/pci/if_sk.c4
-rw-r--r--sys/dev/pci/if_ste.c3
-rw-r--r--sys/dev/pci/if_stge.c5
-rw-r--r--sys/dev/pci/if_tht.c4
-rw-r--r--sys/dev/pci/if_tl.c3
-rw-r--r--sys/dev/pci/if_txp.c4
-rw-r--r--sys/dev/pci/if_vge.c4
-rw-r--r--sys/dev/pci/if_vic.c3
-rw-r--r--sys/dev/pci/if_vmx.c3
-rw-r--r--sys/dev/pci/if_vr.c3
-rw-r--r--sys/dev/pci/if_vte.c3
-rw-r--r--sys/dev/pci/if_wb.c3
-rw-r--r--sys/dev/pci/if_wpi.c4
-rw-r--r--sys/dev/pci/if_xge.c3
-rw-r--r--sys/dev/pcmcia/if_malo.c3
-rw-r--r--sys/dev/pcmcia/if_xe.c7
-rw-r--r--sys/dev/pv/if_hvn.c2
-rw-r--r--sys/dev/pv/if_vio.c3
-rw-r--r--sys/dev/pv/if_xnf.c3
-rw-r--r--sys/dev/sbus/be.c3
-rw-r--r--sys/dev/sbus/qe.c3
-rw-r--r--sys/dev/usb/if_athn_usb.c3
-rw-r--r--sys/dev/usb/if_atu.c4
-rw-r--r--sys/dev/usb/if_aue.c4
-rw-r--r--sys/dev/usb/if_axe.c3
-rw-r--r--sys/dev/usb/if_axen.c3
-rw-r--r--sys/dev/usb/if_cdce.c4
-rw-r--r--sys/dev/usb/if_cue.c4
-rw-r--r--sys/dev/usb/if_kue.c4
-rw-r--r--sys/dev/usb/if_mos.c3
-rw-r--r--sys/dev/usb/if_otus.c3
-rw-r--r--sys/dev/usb/if_ral.c3
-rw-r--r--sys/dev/usb/if_rsu.c3
-rw-r--r--sys/dev/usb/if_rum.c3
-rw-r--r--sys/dev/usb/if_run.c3
-rw-r--r--sys/dev/usb/if_smsc.c3
-rw-r--r--sys/dev/usb/if_uath.c3
-rw-r--r--sys/dev/usb/if_udav.c4
-rw-r--r--sys/dev/usb/if_ugl.c4
-rw-r--r--sys/dev/usb/if_umb.c3
-rw-r--r--sys/dev/usb/if_upgt.c3
-rw-r--r--sys/dev/usb/if_upl.c4
-rw-r--r--sys/dev/usb/if_ure.c3
-rw-r--r--sys/dev/usb/if_url.c4
-rw-r--r--sys/dev/usb/if_urndis.c4
-rw-r--r--sys/dev/usb/if_urtw.c4
-rw-r--r--sys/dev/usb/if_urtwn.c3
-rw-r--r--sys/dev/usb/if_zyd.c3
-rw-r--r--sys/net/if.c3
-rw-r--r--sys/net/if_etherip.c4
-rw-r--r--sys/net/if_gif.c3
-rw-r--r--sys/net/if_pair.c3
-rw-r--r--sys/net/if_pppoe.c3
-rw-r--r--sys/net/if_trunk.c6
-rw-r--r--sys/net/if_tun.c4
-rw-r--r--sys/net/if_vether.c3
-rw-r--r--sys/net/if_vlan.c3
-rw-r--r--sys/net/if_vxlan.c4
137 files changed, 149 insertions, 366 deletions
diff --git a/sys/arch/armv7/imx/if_fec.c b/sys/arch/armv7/imx/if_fec.c
index fd2c5484e78..899c1904144 100644
--- a/sys/arch/armv7/imx/if_fec.c
+++ b/sys/arch/armv7/imx/if_fec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fec.c,v 1.19 2016/10/21 22:34:00 jsg Exp $ */
+/* $OpenBSD: if_fec.c,v 1.20 2017/01/22 10:17:37 dlg Exp $ */
/*
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
*
@@ -811,8 +811,6 @@ fec_start(struct ifnet *ifp)
ifq_deq_commit(&ifp->if_snd, m_head);
- ifp->if_opackets++;
-
#if NBPFILTER > 0
if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m_head, BPF_DIRECTION_OUT);
diff --git a/sys/arch/armv7/omap/if_cpsw.c b/sys/arch/armv7/omap/if_cpsw.c
index 8717b4b21fa..0fb3c9c92b9 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.41 2016/10/02 23:38:32 jsg Exp $ */
+/* $OpenBSD: if_cpsw.c,v 1.42 2017/01/22 10:17:37 dlg Exp $ */
/* $NetBSD: if_cpsw.c,v 1.3 2013/04/17 14:36:34 bouyer Exp $ */
/*
@@ -1200,8 +1200,6 @@ cpsw_txintr(void *arg)
m_freem(rdp->tx_mb[sc->sc_txhead]);
rdp->tx_mb[sc->sc_txhead] = NULL;
- ifp->if_opackets++;
-
handled = true;
ifq_clr_oactive(&ifp->if_snd);
diff --git a/sys/arch/armv7/sunxi/sxie.c b/sys/arch/armv7/sunxi/sxie.c
index c4bc430d582..1cd713cd52a 100644
--- a/sys/arch/armv7/sunxi/sxie.c
+++ b/sys/arch/armv7/sunxi/sxie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sxie.c,v 1.24 2017/01/21 08:26:49 patrick Exp $ */
+/* $OpenBSD: sxie.c,v 1.25 2017/01/22 10:17:37 dlg Exp $ */
/*
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
* Copyright (c) 2013 Artturi Alm
@@ -440,10 +440,6 @@ sxie_intr(void *arg)
if (pending & (SXIE_TX_FIFO0 | SXIE_TX_FIFO1)) {
ifq_clr_oactive(&ifp->if_snd);
- if (pending & SXIE_TX_FIFO0)
- ifp->if_opackets++;
- if (pending & SXIE_TX_FIFO1)
- ifp->if_opackets++;
sc->txf_inuse &= ~pending;
if (sc->txf_inuse == 0)
ifp->if_timer = 0;
diff --git a/sys/arch/macppc/dev/if_bm.c b/sys/arch/macppc/dev/if_bm.c
index 79933a52740..4cb561f38dd 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.40 2016/04/13 11:34:00 mpi Exp $ */
+/* $OpenBSD: if_bm.c,v 1.41 2017/01/22 10:17:37 dlg Exp $ */
/* $NetBSD: if_bm.c,v 1.1 1999/01/01 01:27:52 tsubai Exp $ */
/*-
@@ -484,7 +484,6 @@ bmac_intr(void *v)
if (stat & IntFrameSent) {
ifq_clr_oactive(&ifp->if_snd);
ifp->if_timer = 0;
- ifp->if_opackets++;
bmac_start(ifp);
}
@@ -633,7 +632,6 @@ bmac_start(struct ifnet *ifp)
/* 5 seconds to watch for failing to transmit */
ifp->if_timer = 5;
- ifp->if_opackets++; /* # of pkts */
bmac_transmit_packet(sc, sc->sc_txbuf_pa, tlen);
}
diff --git a/sys/arch/macppc/dev/if_mc.c b/sys/arch/macppc/dev/if_mc.c
index 874c82b4f49..4fd36fb5748 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.28 2016/04/13 11:34:00 mpi Exp $ */
+/* $OpenBSD: if_mc.c,v 1.29 2017/01/22 10:17:37 dlg Exp $ */
/* $NetBSD: if_mc.c,v 1.9.16.1 2006/06/21 14:53:13 yamt Exp $ */
/*-
@@ -570,8 +570,6 @@ mc_start(struct ifnet *ifp)
*/
ifq_set_oactive(&ifp->if_snd);
maceput(sc, m);
-
- ifp->if_opackets++; /* # of pkts */
}
}
diff --git a/sys/arch/octeon/dev/cn30xxgmx.c b/sys/arch/octeon/dev/cn30xxgmx.c
index 6af8194bb52..eaad8dc3dd2 100644
--- a/sys/arch/octeon/dev/cn30xxgmx.c
+++ b/sys/arch/octeon/dev/cn30xxgmx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cn30xxgmx.c,v 1.31 2016/11/26 15:36:10 martijn Exp $ */
+/* $OpenBSD: cn30xxgmx.c,v 1.32 2017/01/22 10:17:37 dlg Exp $ */
/*
* Copyright (c) 2007 Internet Initiative Japan, Inc.
@@ -1323,8 +1323,6 @@ cn30xxgmx_stats(struct cn30xxgmx_port_softc *sc)
(uint32_t)_GMX_PORT_RD8(sc, GMX0_RX0_STATS_PKTS_BAD);
ifp->if_iqdrops +=
(uint32_t)_GMX_PORT_RD8(sc, GMX0_RX0_STATS_PKTS_DRP);
- ifp->if_opackets +=
- (uint32_t)_GMX_PORT_RD8(sc, GMX0_TX0_STAT3);
tmp = _GMX_PORT_RD8(sc, GMX0_TX0_STAT0);
ifp->if_oerrors +=
(uint32_t)tmp + ((uint32_t)(tmp >> 32) * 16);
diff --git a/sys/arch/sgi/dev/if_iec.c b/sys/arch/sgi/dev/if_iec.c
index 4b5c2636db3..d0083e465b1 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.22 2016/11/29 10:22:30 jsg Exp $ */
+/* $OpenBSD: if_iec.c,v 1.23 2017/01/22 10:17:37 dlg Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@@ -1354,7 +1354,6 @@ iec_txintr(struct iec_softc *sc, uint32_t stat)
} else {
ifp->if_collisions += IOC3_ENET_TCDC_COLLISION_MASK &
bus_space_read_4(st, sh, IOC3_ENET_TCDC);
- ifp->if_opackets++;
}
}
diff --git a/sys/arch/sgi/dev/if_mec.c b/sys/arch/sgi/dev/if_mec.c
index 8a686a0ad26..8475133d729 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.36 2016/04/13 11:34:00 mpi Exp $ */
+/* $OpenBSD: if_mec.c,v 1.37 2017/01/22 10:17:37 dlg Exp $ */
/* $NetBSD: if_mec_mace.c,v 1.5 2004/08/01 06:36:36 tsutsui Exp $ */
/*
@@ -1371,7 +1371,6 @@ mec_txintr(struct mec_softc *sc, uint32_t stat)
col = (txstat & MEC_TXSTAT_COLCNT) >>
MEC_TXSTAT_COLCNT_SHIFT;
ifp->if_collisions += col;
- ifp->if_opackets++;
}
}
diff --git a/sys/arch/sgi/hpc/if_sq.c b/sys/arch/sgi/hpc/if_sq.c
index b34677074e9..b2a34badc5c 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.27 2016/11/29 10:22:30 jsg Exp $ */
+/* $OpenBSD: if_sq.c,v 1.28 2017/01/22 10:17:37 dlg Exp $ */
/* $NetBSD: if_sq.c,v 1.42 2011/07/01 18:53:47 dyoung Exp $ */
/*
@@ -1319,7 +1319,6 @@ sq_txring_hpc1(struct sq_softc *sc)
m_freem(sc->sc_txmbuf[i]);
sc->sc_txmbuf[i] = NULL;
- ifp->if_opackets++;
sc->sc_nfreetx++;
SQ_TRACE(SQ_DONE_DMA, sc, i, status);
@@ -1407,7 +1406,6 @@ sq_txring_hpc3(struct sq_softc *sc)
m_freem(sc->sc_txmbuf[i]);
sc->sc_txmbuf[i] = NULL;
- ifp->if_opackets++;
sc->sc_nfreetx++;
SQ_TRACE(SQ_DONE_DMA, sc, i, status);
diff --git a/sys/arch/socppc/dev/if_tsec.c b/sys/arch/socppc/dev/if_tsec.c
index bd2068e8f23..832345ade8d 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.43 2016/04/13 11:34:00 mpi Exp $ */
+/* $OpenBSD: if_tsec.c,v 1.44 2017/01/22 10:17:37 dlg Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@ -824,7 +824,6 @@ tsec_tx_proc(struct tsec_softc *sc)
m_freem(txb->tb_m);
txb->tb_m = NULL;
- ifp->if_opackets++;
}
ifq_clr_oactive(&ifp->if_snd);
diff --git a/sys/arch/sparc64/dev/vnet.c b/sys/arch/sparc64/dev/vnet.c
index fbd8cd4caa1..0cd73a3376b 100644
--- a/sys/arch/sparc64/dev/vnet.c
+++ b/sys/arch/sparc64/dev/vnet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnet.c,v 1.57 2016/09/15 02:00:17 dlg Exp $ */
+/* $OpenBSD: vnet.c,v 1.58 2017/01/22 10:17:37 dlg Exp $ */
/*
* Copyright (c) 2009, 2015 Mark Kettenis
*
@@ -763,7 +763,6 @@ vnet_rx_vio_desc_data(struct vnet_softc *sc, struct vio_msg_tag *tag)
pool_put(&sc->sc_pool, sc->sc_vsd[cons].vsd_buf);
sc->sc_vsd[cons].vsd_buf = NULL;
- ifp->if_opackets++;
sc->sc_tx_cons++;
break;
@@ -877,7 +876,6 @@ vnet_rx_vio_dring_data(struct vnet_softc *sc, struct vio_msg_tag *tag)
pool_put(&sc->sc_pool, sc->sc_vsd[cons].vsd_buf);
sc->sc_vsd[cons].vsd_buf = NULL;
- ifp->if_opackets++;
sc->sc_vd->vd_desc[cons].hdr.dstate = VIO_DESC_FREE;
sc->sc_tx_cons++;
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c
index 8fef75e2ed7..9d29f577421 100644
--- a/sys/dev/ic/acx.c
+++ b/sys/dev/ic/acx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acx.c,v 1.119 2016/09/02 09:04:56 tom Exp $ */
+/* $OpenBSD: acx.c,v 1.120 2017/01/22 10:17:37 dlg Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -1178,8 +1178,7 @@ acx_txeof(struct acx_softc *sc)
if (error) {
acx_txerr(sc, error);
ifp->if_oerrors++;
- } else
- ifp->if_opackets++;
+ }
/* Update rate control statistics for the node */
if (buf->tb_node != NULL) {
diff --git a/sys/dev/ic/aic6915.c b/sys/dev/ic/aic6915.c
index 72b2c86a258..78239f2804c 100644
--- a/sys/dev/ic/aic6915.c
+++ b/sys/dev/ic/aic6915.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic6915.c,v 1.21 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: aic6915.c,v 1.22 2017/01/22 10:17:37 dlg Exp $ */
/* $NetBSD: aic6915.c,v 1.15 2005/12/24 20:27:29 perry Exp $ */
/*-
@@ -865,8 +865,6 @@ sf_stats_update(struct sf_softc *sc)
sf_genreg_write(sc, SF_STATS_BASE + (i * sizeof(uint32_t)), 0);
}
- ifp->if_opackets += stats.TransmitOKFrames;
-
ifp->if_collisions += stats.SingleCollisionFrames +
stats.MultipleCollisionFrames;
diff --git a/sys/dev/ic/am7990.c b/sys/dev/ic/am7990.c
index 18581038d9c..ce092ebf5ac 100644
--- a/sys/dev/ic/am7990.c
+++ b/sys/dev/ic/am7990.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: am7990.c,v 1.52 2015/11/25 03:09:58 dlg Exp $ */
+/* $OpenBSD: am7990.c,v 1.53 2017/01/22 10:17:37 dlg Exp $ */
/* $NetBSD: am7990.c,v 1.74 2012/02/02 19:43:02 tls Exp $ */
/*-
@@ -355,7 +355,6 @@ am7990_tint(struct lance_softc *sc)
else if (tmd.tmd1_bits & LE_T1_MORE)
/* Real number is unknown. */
ifp->if_collisions += 2;
- ifp->if_opackets++;
}
if (++bix == sc->sc_ntbuf)
diff --git a/sys/dev/ic/am79900.c b/sys/dev/ic/am79900.c
index 0aa9aca9c7b..79e1c9e28cc 100644
--- a/sys/dev/ic/am79900.c
+++ b/sys/dev/ic/am79900.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: am79900.c,v 1.6 2015/11/25 03:09:58 dlg Exp $ */
+/* $OpenBSD: am79900.c,v 1.7 2017/01/22 10:17:37 dlg Exp $ */
/* $NetBSD: am79900.c,v 1.23 2012/02/02 19:43:02 tls Exp $ */
/*-
@@ -382,7 +382,6 @@ am79900_tint(struct lance_softc *sc)
else if (tmd.tmd1 & LE_T1_MORE)
/* Real number is unknown. */
ifp->if_collisions += 2;
- ifp->if_opackets++;
}
if (++bix == sc->sc_ntbuf)
diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c
index 58862f8fd47..ee4c17d3ec6 100644
--- a/sys/dev/ic/an.c
+++ b/sys/dev/ic/an.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: an.c,v 1.71 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: an.c,v 1.72 2017/01/22 10:17:37 dlg Exp $ */
/* $NetBSD: an.c,v 1.34 2005/06/20 02:49:18 atatat Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -494,8 +494,6 @@ an_txeof(struct an_softc *sc, u_int16_t status)
if (status & AN_EV_TX_EXC)
ifp->if_oerrors++;
- else
- ifp->if_opackets++;
cur = sc->sc_txcur;
if (sc->sc_txd[cur].d_fid == id) {
@@ -1107,7 +1105,6 @@ an_start(struct ifnet *ifp)
break;
}
ifq_deq_commit(&ifp->if_snd, m);
- ifp->if_opackets++;
#if NBPFILTER > 0
if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT);
diff --git a/sys/dev/ic/ar5008.c b/sys/dev/ic/ar5008.c
index 942f6700637..000d675c73c 100644
--- a/sys/dev/ic/ar5008.c
+++ b/sys/dev/ic/ar5008.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5008.c,v 1.38 2017/01/12 16:32:28 stsp Exp $ */
+/* $OpenBSD: ar5008.c,v 1.39 2017/01/22 10:17:37 dlg Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -981,7 +981,6 @@ ar5008_tx_process(struct athn_softc *sc, int qid)
return (EBUSY);
SIMPLEQ_REMOVE_HEAD(&txq->head, bf_list);
- ifp->if_opackets++;
sc->sc_tx_timer = 0;
diff --git a/sys/dev/ic/ar9003.c b/sys/dev/ic/ar9003.c
index 0e299c9adbf..ee91e04bbf1 100644
--- a/sys/dev/ic/ar9003.c
+++ b/sys/dev/ic/ar9003.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar9003.c,v 1.42 2017/01/12 16:32:28 stsp Exp $ */
+/* $OpenBSD: ar9003.c,v 1.43 2017/01/22 10:17:37 dlg Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -1098,7 +1098,6 @@ ar9003_tx_process(struct athn_softc *sc)
return (0);
}
SIMPLEQ_REMOVE_HEAD(&txq->head, bf_list);
- ifp->if_opackets++;
sc->sc_tx_timer = 0;
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c
index 71f10cf6e2b..704eb5d50a3 100644
--- a/sys/dev/ic/ath.c
+++ b/sys/dev/ic/ath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ath.c,v 1.111 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: ath.c,v 1.112 2017/01/22 10:17:37 dlg Exp $ */
/* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */
/*-
@@ -874,7 +874,6 @@ ath_start(struct ifnet *ifp)
splx(s);
break;
}
- ifp->if_opackets++;
#if NBPFILTER > 0
if (ifp->if_bpf)
diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c
index 43feecbe846..24521747aef 100644
--- a/sys/dev/ic/atw.c
+++ b/sys/dev/ic/atw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atw.c,v 1.94 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: atw.c,v 1.95 2017/01/22 10:17:37 dlg Exp $ */
/* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */
/*-
@@ -3292,8 +3292,6 @@ atw_txintr(struct atw_softc *sc)
MASK_AND_RSHIFT(txstat, ATW_TXSTAT_ARC_MASK);
else
ifp->if_oerrors++;
-
- ifp->if_opackets++;
}
/*
diff --git a/sys/dev/ic/bwi.c b/sys/dev/ic/bwi.c
index 6c8a3e5be3a..9374ecc8e85 100644
--- a/sys/dev/ic/bwi.c
+++ b/sys/dev/ic/bwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bwi.c,v 1.123 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: bwi.c,v 1.124 2017/01/22 10:17:37 dlg Exp $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
@@ -9152,8 +9152,6 @@ bwi_txeof(struct bwi_softc *sc)
continue;
_bwi_txeof(sc, letoh16(tx_id));
-
- ifp->if_opackets++;
}
if (ifq_is_oactive(&ifp->if_snd) == 0)
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c
index 714b3a51473..5e8b8fce451 100644
--- a/sys/dev/ic/dc.c
+++ b/sys/dev/ic/dc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dc.c,v 1.151 2016/05/04 18:38:57 kettenis Exp $ */
+/* $OpenBSD: dc.c,v 1.152 2017/01/22 10:17:37 dlg Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -2264,7 +2264,6 @@ dc_txeof(struct dc_softc *sc)
ifp->if_collisions += (txstat & DC_TXSTAT_COLLCNT) >> 3;
- ifp->if_opackets++;
if (sc->dc_cdata.dc_tx_chain[idx].sd_map->dm_nsegs != 0) {
bus_dmamap_t map = sc->dc_cdata.dc_tx_chain[idx].sd_map;
diff --git a/sys/dev/ic/dp8390.c b/sys/dev/ic/dp8390.c
index 64884e85115..083100c51a3 100644
--- a/sys/dev/ic/dp8390.c
+++ b/sys/dev/ic/dp8390.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dp8390.c,v 1.60 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: dp8390.c,v 1.61 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: dp8390.c,v 1.13 1998/07/05 06:49:11 jonathan Exp $ */
/*
@@ -692,12 +692,6 @@ dp8390_intr(void *arg)
* and late collisions here.
*/
(void)NIC_GET(regt, regh, ED_P0_TSR);
-
- /*
- * Update total number of successfully
- * transmitted packets.
- */
- ++ifp->if_opackets;
}
/* Clear watchdog timer. */
diff --git a/sys/dev/ic/dwc_gmac.c b/sys/dev/ic/dwc_gmac.c
index 5895dc7a39d..7b47cb20415 100644
--- a/sys/dev/ic/dwc_gmac.c
+++ b/sys/dev/ic/dwc_gmac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc_gmac.c,v 1.4 2016/11/29 10:22:30 jsg Exp $ */
+/* $OpenBSD: dwc_gmac.c,v 1.5 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: dwc_gmac.c,v 1.34 2015/08/21 20:12:29 jmcneill Exp $ */
/*-
@@ -808,8 +808,6 @@ dwc_gmac_start(struct ifnet *ifp)
ifq_deq_commit(&ifp->if_snd, m_head);
- ifp->if_opackets++;
-
#if NBPFILTER > 0
if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m_head, BPF_DIRECTION_OUT);
@@ -1082,7 +1080,6 @@ dwc_gmac_tx_intr(struct dwc_gmac_softc *sc)
if (data->td_m == NULL)
continue;
- ifp->if_opackets++;
nsegs = data->td_active->dm_nsegs;
bus_dmamap_sync(sc->sc_dmat, data->td_active, 0,
data->td_active->dm_mapsize, BUS_DMASYNC_POSTWRITE);
diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c
index 08836a751ce..34db83599a4 100644
--- a/sys/dev/ic/elink3.c
+++ b/sys/dev/ic/elink3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elink3.c,v 1.94 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: elink3.c,v 1.95 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: elink3.c,v 1.32 1997/05/14 00:22:00 thorpej Exp $ */
/*
@@ -1047,8 +1047,6 @@ startagain:
splx(sh);
- ++ifp->if_opackets;
-
readcheck:
if ((bus_space_read_2(iot, ioh, ep_w1_reg(sc, EP_W1_RX_STATUS)) &
ERR_INCOMPLETE) == 0) {
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c
index c3948bea5f5..9041fbb8af8 100644
--- a/sys/dev/ic/fxp.c
+++ b/sys/dev/ic/fxp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxp.c,v 1.130 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: fxp.c,v 1.131 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
@@ -941,7 +941,6 @@ fxp_stats_update(void *arg)
int s;
FXP_STATS_SYNC(sc, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
- ifp->if_opackets += letoh32(sp->tx_good);
ifp->if_collisions += letoh32(sp->tx_total_collisions);
if (sp->rx_good) {
sc->rx_idle_secs = 0;
diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c
index 8f5e70e3213..9c5fd6a8072 100644
--- a/sys/dev/ic/gem.c
+++ b/sys/dev/ic/gem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gem.c,v 1.120 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: gem.c,v 1.121 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */
/*
@@ -1638,7 +1638,6 @@ gem_tint(struct gem_softc *sc, u_int32_t status)
bus_dmamap_unload(sc->sc_dmatag, sd->sd_map);
m_freem(sd->sd_mbuf);
sd->sd_mbuf = NULL;
- ifp->if_opackets++;
}
free++;
if (++cons == GEM_NTXDESC)
diff --git a/sys/dev/ic/hme.c b/sys/dev/ic/hme.c
index cc6137654d7..9ab36cf07a3 100644
--- a/sys/dev/ic/hme.c
+++ b/sys/dev/ic/hme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hme.c,v 1.80 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: hme.c,v 1.81 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: hme.c,v 1.21 2001/07/07 15:59:37 thorpej Exp $ */
/*-
@@ -762,8 +762,6 @@ hme_tint(struct hme_softc *sc)
break;
ifq_clr_oactive(&ifp->if_snd);
- if (txflags & HME_XD_EOP)
- ifp->if_opackets++;
if (sd->sd_mbuf != NULL) {
bus_dmamap_sync(sc->sc_dmatag, sd->sd_map,
diff --git a/sys/dev/ic/i82596.c b/sys/dev/ic/i82596.c
index 29c0f1c2947..f01a1c02929 100644
--- a/sys/dev/ic/i82596.c
+++ b/sys/dev/ic/i82596.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82596.c,v 1.52 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: i82596.c,v 1.53 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: i82586.c,v 1.18 1998/08/15 04:42:42 mycroft Exp $ */
/*-
@@ -753,7 +753,6 @@ i82596_tint(sc, scbstatus)
}
if (status & IE_STAT_OK) {
- ifp->if_opackets++;
ifp->if_collisions += (status & IE_XS_MAXCOLL);
} else {
ifp->if_oerrors++;
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c
index adee6ffca2e..df0ac264b10 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.166 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: if_wi.c,v 1.167 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -836,8 +836,6 @@ wi_txeof(struct wi_softc *sc, int status)
if (status & WI_EV_TX_EXC)
ifp->if_oerrors++;
- else
- ifp->if_opackets++;
return;
}
diff --git a/sys/dev/ic/lemac.c b/sys/dev/ic/lemac.c
index 49a96de9706..6d6644070cc 100644
--- a/sys/dev/ic/lemac.c
+++ b/sys/dev/ic/lemac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lemac.c,v 1.29 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: lemac.c,v 1.30 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: lemac.c,v 1.20 2001/06/13 10:46:02 wiz Exp $ */
/*-
@@ -153,7 +153,6 @@ lemac_tne_intr(struct lemac_softc *sc)
sc->sc_cntrs.cntr_tne_intrs++;
while (txcount-- > 0) {
unsigned txsts = LEMAC_INB(sc, LEMAC_REG_TDQ);
- sc->sc_if.if_opackets++; /* another one done */
if ((txsts & (LEMAC_TDQ_LCL|LEMAC_TDQ_NCL))
|| (txsts & LEMAC_TDQ_COL) == LEMAC_TDQ_EXCCOL) {
if (txsts & LEMAC_TDQ_NCL)
diff --git a/sys/dev/ic/malo.c b/sys/dev/ic/malo.c
index 915db259caa..47889f3ec4d 100644
--- a/sys/dev/ic/malo.c
+++ b/sys/dev/ic/malo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: malo.c,v 1.112 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: malo.c,v 1.113 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -1333,7 +1333,6 @@ malo_tx_intr(struct malo_softc *sc)
case 0x1:
DPRINTF(2, "%s: data frame was sent successfully\n",
sc->sc_dev.dv_xname);
- ifp->if_opackets++;
break;
default:
DPRINTF(1, "%s: data frame sending error\n",
diff --git a/sys/dev/ic/mtd8xx.c b/sys/dev/ic/mtd8xx.c
index f38c706acbd..1e98c2cac10 100644
--- a/sys/dev/ic/mtd8xx.c
+++ b/sys/dev/ic/mtd8xx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mtd8xx.c,v 1.30 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: mtd8xx.c,v 1.31 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru>
@@ -1031,7 +1031,6 @@ mtd_txeof(struct mtd_softc *sc)
ifp->if_collisions += TSW_NCR_GET(txstat);
}
- ifp->if_opackets++;
if (sc->mtd_cdata.mtd_tx_chain[idx].sd_map->dm_nsegs != 0) {
bus_dmamap_t map =
sc->mtd_cdata.mtd_tx_chain[idx].sd_map;
diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c
index edb9624520d..fa43404027e 100644
--- a/sys/dev/ic/pgt.c
+++ b/sys/dev/ic/pgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pgt.c,v 1.88 2016/11/29 10:22:30 jsg Exp $ */
+/* $OpenBSD: pgt.c,v 1.89 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -2181,7 +2181,6 @@ pgt_start(struct ifnet *ifp)
if (ifp->if_bpf != NULL)
bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT);
#endif
- ifp->if_opackets++;
ifp->if_timer = 1;
sc->sc_txtimer = 5;
ni = ieee80211_find_txnode(&sc->sc_ic,
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c
index 4a9c7b28059..205d3569702 100644
--- a/sys/dev/ic/re.c
+++ b/sys/dev/ic/re.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: re.c,v 1.199 2017/01/04 01:47:32 dlg Exp $ */
+/* $OpenBSD: re.c,v 1.200 2017/01/22 10:17:38 dlg Exp $ */
/* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -1443,8 +1443,6 @@ re_txeof(struct rl_softc *sc)
ifp->if_collisions++;
if (txstat & RL_TDESC_STAT_TXERRSUM)
ifp->if_oerrors++;
- else
- ifp->if_opackets++;
cons = RL_NEXT_TX_DESC(sc, idx);
free = 1;
diff --git a/sys/dev/ic/rt2560.c b/sys/dev/ic/rt2560.c
index 9035ad5f40c..87f1d5fddb9 100644
--- a/sys/dev/ic/rt2560.c
+++ b/sys/dev/ic/rt2560.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2560.c,v 1.81 2016/10/06 15:18:48 stsp Exp $ */
+/* $OpenBSD: rt2560.c,v 1.82 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -940,7 +940,6 @@ rt2560_tx_intr(struct rt2560_softc *sc)
case RT2560_TX_SUCCESS:
DPRINTFN(10, ("data frame sent successfully\n"));
rn->amn.amn_txcnt++;
- ifp->if_opackets++;
break;
case RT2560_TX_SUCCESS_RETRY:
@@ -948,7 +947,6 @@ rt2560_tx_intr(struct rt2560_softc *sc)
(letoh32(desc->flags) >> 5) & 0x7));
rn->amn.amn_txcnt++;
rn->amn.amn_retrycnt++;
- ifp->if_opackets++;
break;
case RT2560_TX_FAIL_RETRY:
diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c
index 2f2c9657dcf..dc731e9d478 100644
--- a/sys/dev/ic/rt2661.c
+++ b/sys/dev/ic/rt2661.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2661.c,v 1.90 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: rt2661.c,v 1.91 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2006
@@ -1070,7 +1070,6 @@ rt2661_tx_intr(struct rt2661_softc *sc)
if (retrycnt > 0)
amn->amn.amn_retrycnt++;
}
- ifp->if_opackets++;
break;
case RT2661_TX_RETRY_FAIL:
diff --git a/sys/dev/ic/rt2860.c b/sys/dev/ic/rt2860.c
index 51936f757a8..96a7f7603f4 100644
--- a/sys/dev/ic/rt2860.c
+++ b/sys/dev/ic/rt2860.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2860.c,v 1.91 2016/08/17 11:50:52 stsp Exp $ */
+/* $OpenBSD: rt2860.c,v 1.92 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -1172,8 +1172,6 @@ rt2860_tx_intr(struct rt2860_softc *sc, int qid)
SLIST_INSERT_HEAD(&sc->data_pool, data, next);
ring->data[ring->next] = NULL;
-
- ifp->if_opackets++;
}
ring->queued--;
ring->next = (ring->next + 1) % RT2860_TX_RING_COUNT;
diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c
index 2052680a693..10c95e72058 100644
--- a/sys/dev/ic/rtl81x9.c
+++ b/sys/dev/ic/rtl81x9.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtl81x9.c,v 1.95 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: rtl81x9.c,v 1.96 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -718,9 +718,7 @@ rl_txeof(struct rl_softc *sc)
if ((txstat & RL_TXSTAT_TX_UNDERRUN) &&
(sc->rl_txthresh < 2016))
sc->rl_txthresh += 32;
- if (txstat & RL_TXSTAT_TX_OK)
- ifp->if_opackets++;
- else {
+ if (!ISSET(txstat, RL_TXSTAT_TX_OK)) {
int oldthresh;
ifp->if_oerrors++;
diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c
index 397bf186a05..0ced9313a23 100644
--- a/sys/dev/ic/rtw.c
+++ b/sys/dev/ic/rtw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtw.c,v 1.96 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: rtw.c,v 1.97 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: rtw.c,v 1.29 2004/12/27 19:49:16 dyoung Exp $ */
/*-
@@ -2775,7 +2775,6 @@ rtw_dequeue(struct ifnet *ifp, struct rtw_txsoft_blk **tsbp,
return 0;
}
DPRINTF(sc, RTW_DEBUG_XMIT, ("%s: dequeue data frame\n", __func__));
- ifp->if_opackets++;
#if NBPFILTER > 0
if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT);
diff --git a/sys/dev/ic/smc83c170.c b/sys/dev/ic/smc83c170.c
index 0d24d81c492..c8e27bd5535 100644
--- a/sys/dev/ic/smc83c170.c
+++ b/sys/dev/ic/smc83c170.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smc83c170.c,v 1.26 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: smc83c170.c,v 1.27 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: smc83c170.c,v 1.59 2005/02/27 00:27:02 perry Exp $ */
/*-
@@ -755,8 +755,6 @@ epic_intr(void *arg)
*/
if ((txstatus & ET_TXSTAT_PACKETTX) == 0)
ifp->if_oerrors++;
- else
- ifp->if_opackets++;
ifp->if_collisions +=
TXSTAT_COLLISIONS(txstatus);
if (txstatus & ET_TXSTAT_CARSENSELOST)
diff --git a/sys/dev/ic/smc91cxx.c b/sys/dev/ic/smc91cxx.c
index 83d59bf0043..cf9820e095c 100644
--- a/sys/dev/ic/smc91cxx.c
+++ b/sys/dev/ic/smc91cxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smc91cxx.c,v 1.48 2016/07/13 15:40:26 deraadt Exp $ */
+/* $OpenBSD: smc91cxx.c,v 1.49 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: smc91cxx.c,v 1.11 1998/08/08 23:51:41 mycroft Exp $ */
/*-
@@ -685,7 +685,6 @@ smc91cxx_start(ifp)
bpf_mtap(ifp->if_bpf, top, BPF_DIRECTION_OUT);
#endif
- ifp->if_opackets++;
m_freem(top);
readcheck:
diff --git a/sys/dev/ic/ti.c b/sys/dev/ic/ti.c
index 0f77adb2333..f66162f5f09 100644
--- a/sys/dev/ic/ti.c
+++ b/sys/dev/ic/ti.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ti.c,v 1.24 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: ti.c,v 1.25 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1637,9 +1637,6 @@ ti_txeof_tigon1(struct ti_softc *sc)
ti_mem_read(sc, TI_TX_RING_BASE + idx * sizeof(txdesc),
sizeof(txdesc), (caddr_t)&txdesc);
- if (txdesc.ti_flags & TI_BDFLAG_END)
- ifp->if_opackets++;
-
if (sc->ti_cdata.ti_tx_chain[idx] != NULL) {
m_freem(sc->ti_cdata.ti_tx_chain[idx]);
sc->ti_cdata.ti_tx_chain[idx] = NULL;
@@ -1684,8 +1681,6 @@ ti_txeof_tigon2(struct ti_softc *sc)
idx = sc->ti_tx_saved_considx;
cur_tx = &sc->ti_rdata->ti_tx_ring[idx];
- if (cur_tx->ti_flags & TI_BDFLAG_END)
- ifp->if_opackets++;
if (sc->ti_cdata.ti_tx_chain[idx] != NULL) {
m_freem(sc->ti_cdata.ti_tx_chain[idx]);
sc->ti_cdata.ti_tx_chain[idx] = NULL;
diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c
index 59afc57a29a..18f30c3065e 100644
--- a/sys/dev/ic/xl.c
+++ b/sys/dev/ic/xl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xl.c,v 1.131 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: xl.c,v 1.132 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1272,7 +1272,6 @@ xl_txeof(struct xl_softc *sc)
break;
sc->xl_cdata.xl_tx_head = cur_tx->xl_next;
- ifp->if_opackets++;
if (cur_tx->map->dm_nsegs != 0) {
bus_dmamap_t map = cur_tx->map;
@@ -1334,8 +1333,6 @@ xl_txeof_90xB(struct xl_softc *sc)
bus_dmamap_unload(sc->sc_dmat, cur_tx->map);
}
- ifp->if_opackets++;
-
sc->xl_cdata.xl_tx_cnt--;
XL_INC(idx, XL_TX_LIST_CNT);
}
diff --git a/sys/dev/isa/if_ef_isapnp.c b/sys/dev/isa/if_ef_isapnp.c
index cc69e9ba114..c1f029b73c2 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.38 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: if_ef_isapnp.c,v 1.39 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -320,8 +320,6 @@ startagain:
splx(s);
- ifp->if_opackets++;
-
goto startagain;
}
diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c
index 80df09d2182..0f5f0082077 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.46 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: if_eg.c,v 1.47 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: if_eg.c,v 1.26 1996/05/12 23:52:27 mycroft Exp $ */
/*
@@ -625,8 +625,7 @@ egintr(void *arg)
if (sc->eg_pcb[6] || sc->eg_pcb[7]) {
DPRINTF(("packet dropped\n"));
sc->sc_arpcom.ac_if.if_oerrors++;
- } else
- sc->sc_arpcom.ac_if.if_opackets++;
+ }
sc->sc_arpcom.ac_if.if_collisions +=
sc->eg_pcb[8] & 0xf;
ifq_clr_oactive(&sc->sc_arpcom.ac_if.if_snd);
diff --git a/sys/dev/isa/if_el.c b/sys/dev/isa/if_el.c
index 37dc41ee23f..8713727238a 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.33 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: if_el.c,v 1.34 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: if_el.c,v 1.39 1996/05/12 23:52:32 mycroft Exp $ */
/*
@@ -365,7 +365,6 @@ elstart(ifp)
break;
}
} else {
- ifp->if_opackets++;
break;
}
}
diff --git a/sys/dev/isa/if_ex.c b/sys/dev/isa/if_ex.c
index e9893586243..43bdb0457e5 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.44 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: if_ex.c,v 1.45 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 1997, Donald A. Schmidt
* Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es)
@@ -515,7 +515,6 @@ ex_start(struct ifnet *ifp)
BPF_DIRECTION_OUT);
#endif
ifp->if_timer = 2;
- ifp->if_opackets++;
m_freem(opkt);
} else {
ifq_deq_rollback(&ifp->if_snd, opkt);
@@ -621,9 +620,7 @@ ex_tx_intr(struct ex_softc *sc)
break;
tx_status = CSR_READ_2(sc, IO_PORT_REG);
sc->tx_head = CSR_READ_2(sc, IO_PORT_REG);
- if (tx_status & TX_OK_bit)
- ifp->if_opackets++;
- else
+ if (!ISSET(tx_status, TX_OK_bit))
ifp->if_oerrors++;
ifp->if_collisions += tx_status & No_Collisions_bits;
}
diff --git a/sys/dev/isa/if_ie.c b/sys/dev/isa/if_ie.c
index ade5ef6d876..388e868c278 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.52 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: if_ie.c,v 1.53 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: if_ie.c,v 1.51 1996/05/12 23:52:48 mycroft Exp $ */
/*-
@@ -940,7 +940,6 @@ ietint(sc)
printf("ietint: command still busy!\n");
if (status & IE_STAT_OK) {
- ifp->if_opackets++;
ifp->if_collisions += status & IE_XS_MAXCOLL;
} else {
ifp->if_oerrors++;
diff --git a/sys/dev/pci/if_age.c b/sys/dev/pci/if_age.c
index 84d55a5fa15..3ba504fa5fd 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.33 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_age.c,v 1.34 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
@@ -1933,9 +1933,6 @@ age_stats_update(struct age_softc *sc)
stat->tx_bcast_bytes += smb->tx_bcast_bytes;
stat->tx_mcast_bytes += smb->tx_mcast_bytes;
- /* Update counters in ifnet. */
- ifp->if_opackets += smb->tx_frames;
-
ifp->if_collisions += smb->tx_single_colls +
smb->tx_multi_colls + smb->tx_late_colls +
smb->tx_excess_colls * HDPX_CFG_RETRY_DEFAULT;
diff --git a/sys/dev/pci/if_alc.c b/sys/dev/pci/if_alc.c
index 67a47b9c018..f3651cd5d29 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.40 2016/11/29 10:22:30 jsg Exp $ */
+/* $OpenBSD: if_alc.c,v 1.41 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org>
* All rights reserved.
@@ -1625,9 +1625,6 @@ alc_stats_update(struct alc_softc *sc)
stat->tx_bcast_bytes += smb->tx_bcast_bytes;
stat->tx_mcast_bytes += smb->tx_mcast_bytes;
- /* Update counters in ifnet. */
- ifp->if_opackets += smb->tx_frames;
-
ifp->if_collisions += smb->tx_single_colls +
smb->tx_multi_colls * 2 + smb->tx_late_colls +
smb->tx_excess_colls * HDPX_CFG_RETRY_DEFAULT;
diff --git a/sys/dev/pci/if_ale.c b/sys/dev/pci/if_ale.c
index 04e1f113434..5f4743cb53b 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.44 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_ale.c,v 1.45 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
* All rights reserved.
@@ -1227,9 +1227,6 @@ ale_stats_update(struct ale_softc *sc)
stat->tx_bcast_bytes += smb->tx_bcast_bytes;
stat->tx_mcast_bytes += smb->tx_mcast_bytes;
- /* Update counters in ifnet. */
- ifp->if_opackets += smb->tx_frames;
-
ifp->if_collisions += smb->tx_single_colls +
smb->tx_multi_colls * 2 + smb->tx_late_colls +
smb->tx_excess_colls * HDPX_CFG_RETRY_DEFAULT;
diff --git a/sys/dev/pci/if_bce.c b/sys/dev/pci/if_bce.c
index 5151af89e73..7228bba3904 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.51 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_bce.c,v 1.52 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: if_bce.c,v 1.3 2003/09/29 01:53:02 mrg Exp $ */
/*
@@ -771,7 +771,6 @@ bce_txintr(struct bce_softc *sc)
/* do any post dma memory ops on transmit data */
bus_dmamap_sync(sc->bce_dmatag, sc->bce_txdata_map,
i * MCLBYTES, MCLBYTES, BUS_DMASYNC_POSTWRITE);
- ifp->if_opackets++;
}
sc->bce_txin = curr;
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 78dd0baedc4..5ccd8c1efe6 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.382 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_bge.c,v 1.383 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -3645,8 +3645,6 @@ bge_txeof(struct bge_softc *sc)
freed = 0;
while (cons != newcons) {
cur_tx = &sc->bge_rdata->bge_tx_ring[cons];
- if (cur_tx->bge_flags & BGE_TXBDFLAG_END)
- ifp->if_opackets++;
m = sc->bge_cdata.bge_tx_chain[cons];
if (m != NULL) {
dmamap = sc->bge_cdata.bge_tx_map[cons];
diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c
index 8b3267adb14..f3e6ea52944 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.122 2016/05/05 23:01:28 jmatthew Exp $ */
+/* $OpenBSD: if_bnx.c,v 1.123 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2006 Broadcom Corporation
@@ -4563,8 +4563,6 @@ bnx_tx_intr(struct bnx_softc *sc)
/* Free the mbuf. */
m_freem(sc->tx_mbuf_ptr[sw_tx_chain_cons]);
sc->tx_mbuf_ptr[sw_tx_chain_cons] = NULL;
-
- ifp->if_opackets++;
}
freed++;
diff --git a/sys/dev/pci/if_cas.c b/sys/dev/pci/if_cas.c
index 1687d8be9f6..1c66dd39836 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.50 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_cas.c,v 1.51 2017/01/22 10:17:38 dlg Exp $ */
/*
*
@@ -1846,7 +1846,6 @@ cas_tint(struct cas_softc *sc, u_int32_t status)
bus_dmamap_unload(sc->sc_dmatag, sd->sd_map);
m_freem(sd->sd_mbuf);
sd->sd_mbuf = NULL;
- ifp->if_opackets++;
}
freed++;
if (++cons == CAS_NTXDESC)
diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c
index 57b9799e668..a02167197bf 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.135 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_de.c,v 1.136 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: if_de.c,v 1.58 1998/01/12 09:39:58 thorpej Exp $ */
/*-
@@ -3557,7 +3557,6 @@ tulip_tx_intr(tulip_softc_t * const sc)
sc->tulip_txtimer = 0;
else if (xmits > 0)
sc->tulip_txtimer = TULIP_TXTIMER;
- sc->tulip_if.if_opackets += xmits;
TULIP_PERFEND(txintr);
return (descs);
}
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index d870192ec4c..f900706f966 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.332 2016/10/27 03:06:53 dlg Exp $ */
+/* $OpenBSD: if_em.c,v 1.333 2017/01/22 10:17:38 dlg Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -2416,8 +2416,6 @@ em_txeof(struct em_softc *sc)
if (free == 0)
return;
- ifp->if_opackets += free;
-
sc->sc_tx_desc_tail = tail;
if (ifq_is_oactive(&ifp->if_snd))
diff --git a/sys/dev/pci/if_et.c b/sys/dev/pci/if_et.c
index fa9e719f045..b56bf1fc9ea 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.34 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_et.c,v 1.35 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
*
@@ -1912,7 +1912,6 @@ et_txeof(struct et_softc *sc)
bus_dmamap_unload(sc->sc_dmat, tb->tb_dmap);
m_freem(tb->tb_mbuf);
tb->tb_mbuf = NULL;
- ifp->if_opackets++;
}
if (++tbd->tbd_start_index == ET_TX_NDESC) {
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c
index 8dabd37d389..a75f4600219 100644
--- a/sys/dev/pci/if_ipw.c
+++ b/sys/dev/pci/if_ipw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ipw.c,v 1.118 2016/09/05 10:17:30 tedu Exp $ */
+/* $OpenBSD: if_ipw.c,v 1.119 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -1020,9 +1020,6 @@ ipw_tx_intr(struct ipw_softc *sc)
for (i = (sc->txold + 1) % IPW_NTBD; i != r; i = (i + 1) % IPW_NTBD) {
sbd = &sc->stbd_list[i];
- if (sbd->type == IPW_SBD_TYPE_DATA)
- ifp->if_opackets++;
-
ipw_release_sbd(sc, sbd);
sc->txfree++;
}
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c
index a2c2d24d76c..f68ec205e60 100644
--- a/sys/dev/pci/if_iwi.c
+++ b/sys/dev/pci/if_iwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwi.c,v 1.133 2016/09/05 08:17:48 tedu Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.134 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -1127,8 +1127,6 @@ iwi_tx_intr(struct iwi_softc *sc, struct iwi_tx_ring *txq)
ieee80211_release_node(ic, data->ni);
data->ni = NULL;
- ifp->if_opackets++;
-
txq->queued--;
txq->next = (txq->next + 1) % IWI_TX_RING_COUNT;
}
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index 7f866c49c29..5b4d4c3992e 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.157 2017/01/21 11:21:41 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.158 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -3437,8 +3437,6 @@ iwm_rx_tx_cmd_single(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
if (txfail)
ifp->if_oerrors++;
- else
- ifp->if_opackets++;
}
void
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index b49cc9f458e..70d08e55408 100644
--- a/sys/dev/pci/if_iwn.c
+++ b/sys/dev/pci/if_iwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwn.c,v 1.181 2017/01/12 18:06:57 stsp Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.182 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2399,8 +2399,7 @@ iwn_tx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, uint8_t nframes,
if (txfail) {
DPRINTF(("%s: status=0x%x\n", __func__, status));
ifp->if_oerrors++;
- } else
- ifp->if_opackets++;
+ }
/* Unmap and free mbuf. */
bus_dmamap_sync(sc->sc_dmat, data->map, 0, data->map->dm_mapsize,
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index e056b59821d..72d5a3eaaaf 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.148 2016/12/09 17:41:39 mikeb Exp $ */
+/* $OpenBSD: if_ix.c,v 1.149 2017/01/22 10:17:38 dlg Exp $ */
/******************************************************************************
@@ -2386,7 +2386,6 @@ ixgbe_txeof(struct tx_ring *txr)
&txr->tx_base[first];
}
++txr->packets;
- ++ifp->if_opackets;
/* See if there is more work now */
last = tx_buffer->eop_index;
if (last != -1) {
diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c
index 2ee11993d47..99e74146100 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.70 2016/11/29 10:22:30 jsg Exp $ */
+/* $OpenBSD: if_ixgb.c,v 1.71 2017/01/22 10:17:38 dlg Exp $ */
#include <dev/pci/if_ixgb.h>
@@ -1383,8 +1383,6 @@ ixgb_txeof(struct ixgb_softc *sc)
num_avail++;
if (tx_buffer->m_head != NULL) {
- ifp->if_opackets++;
-
if (tx_buffer->map->dm_nsegs > 0) {
bus_dmamap_sync(sc->txtag, tx_buffer->map,
0, tx_buffer->map->dm_mapsize,
diff --git a/sys/dev/pci/if_jme.c b/sys/dev/pci/if_jme.c
index 682cd490b03..f4db392702a 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.48 2016/11/29 10:22:30 jsg Exp $ */
+/* $OpenBSD: if_jme.c,v 1.49 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
* All rights reserved.
@@ -1525,7 +1525,6 @@ jme_txeof(struct jme_softc *sc)
if (status & (JME_TD_TMOUT | JME_TD_RETRY_EXP)) {
ifp->if_oerrors++;
} else {
- ifp->if_opackets++;
if (status & JME_TD_COLLISION) {
ifp->if_collisions +=
letoh32(txd->tx_desc->buflen) &
diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c
index 75f44e4286f..81a54a8a289 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.72 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_lge.c,v 1.73 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -777,7 +777,6 @@ lge_txeof(struct lge_softc *sc)
while (idx != sc->lge_cdata.lge_tx_prod && txdone) {
cur_tx = &sc->lge_ldata->lge_tx_list[idx];
- ifp->if_opackets++;
if (cur_tx->lge_mbuf != NULL) {
m_freem(cur_tx->lge_mbuf);
cur_tx->lge_mbuf = NULL;
diff --git a/sys/dev/pci/if_lii.c b/sys/dev/pci/if_lii.c
index b96aa497626..352ea240f14 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.43 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_lii.c,v 1.44 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2007 The NetBSD Foundation.
@@ -976,9 +976,7 @@ lii_txintr(struct lii_softc *sc)
sc->sc_txd_ack = (sc->sc_txd_ack + txph->txph_size + 7 ) & ~3;
sc->sc_txd_ack %= AT_TXD_BUFFER_SIZE;
- if (txs->txps_flags & LII_TXF_SUCCESS)
- ++ifp->if_opackets;
- else
+ if (!ISSET(txs->txps_flags, LII_TXF_SUCCESS))
++ifp->if_oerrors;
ifq_clr_oactive(&ifp->if_snd);
}
diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c
index fe339644b71..caca0ceb95c 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.124 2017/01/08 18:08:14 visa Exp $ */
+/* $OpenBSD: if_msk.c,v 1.125 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -1697,8 +1697,6 @@ msk_txeof(struct sk_if_softc *sc_if)
if (mskdebug >= 2)
msk_dump_txdesc(cur_tx, idx);
#endif
- if (sk_ctl & SK_Y2_TXCTL_LASTFRAG)
- ifp->if_opackets++;
if (sc_if->sk_cdata.sk_tx_chain[idx].sk_mbuf != NULL) {
entry = sc_if->sk_cdata.sk_tx_map[idx];
diff --git a/sys/dev/pci/if_myx.c b/sys/dev/pci/if_myx.c
index 7d39f418961..1d501028ffd 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.99 2016/10/31 01:38:57 dlg Exp $ */
+/* $OpenBSD: if_myx.c,v 1.100 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org>
@@ -1686,8 +1686,6 @@ myx_txeof(struct myx_softc *sc, u_int32_t done_count)
bus_dmamap_unload(sc->sc_dmat, map);
m_freem(ms->ms_m);
- ifp->if_opackets++;
-
if (++cons >= sc->sc_tx_ring_count)
cons = 0;
} while (++sc->sc_tx_count != done_count);
diff --git a/sys/dev/pci/if_nep.c b/sys/dev/pci/if_nep.c
index e0fa899c393..7518b8858dc 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.26 2016/09/15 02:00:17 dlg Exp $ */
+/* $OpenBSD: if_nep.c,v 1.27 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2014, 2015 Mark Kettenis
*
@@ -1091,7 +1091,6 @@ nep_tx_proc(struct nep_softc *sc)
m_freem(txb->nb_m);
txb->nb_m = NULL;
- ifp->if_opackets++;
count--;
}
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c
index daa894e4957..1a7978f9e88 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.118 2016/11/29 10:22:30 jsg Exp $ */
+/* $OpenBSD: if_nfe.c,v 1.119 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2006, 2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -817,8 +817,7 @@ nfe_txeof(struct nfe_softc *sc)
printf("%s: tx v1 error %b\n",
sc->sc_dev.dv_xname, flags, NFE_V1_TXERR);
ifp->if_oerrors++;
- } else
- ifp->if_opackets++;
+ }
} else {
if (!(flags & NFE_TX_LASTFRAG_V2) && data->m == NULL)
goto skip;
@@ -827,8 +826,7 @@ nfe_txeof(struct nfe_softc *sc)
printf("%s: tx v2 error %b\n",
sc->sc_dev.dv_xname, flags, NFE_V2_TXERR);
ifp->if_oerrors++;
- } else
- ifp->if_opackets++;
+ }
}
if (data->m == NULL) { /* should not get there */
diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c
index 058e9535072..ba5f2e9f813 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.91 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_nge.c,v 1.92 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -1143,7 +1143,6 @@ nge_txeof(struct nge_softc *sc)
ifp->if_collisions +=
(cur_tx->nge_txstat & NGE_TXSTAT_COLLCNT) >> 16;
- ifp->if_opackets++;
if (cur_tx->nge_mbuf != NULL) {
m_freem(cur_tx->nge_mbuf);
cur_tx->nge_mbuf = NULL;
diff --git a/sys/dev/pci/if_nxe.c b/sys/dev/pci/if_nxe.c
index b2fdbb6f2a3..9b30900daed 100644
--- a/sys/dev/pci/if_nxe.c
+++ b/sys/dev/pci/if_nxe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nxe.c,v 1.73 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_nxe.c,v 1.74 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -1389,7 +1389,6 @@ nxe_start(struct ifnet *ifp)
bus_dmamap_sync(sc->sc_dmat, dmap, 0, dmap->dm_mapsize,
BUS_DMASYNC_PREWRITE);
- ifp->if_opackets++;
} while (nr->nr_ready >= NXE_TXD_DESCS);
nxe_ring_sync(sc, nr, BUS_DMASYNC_PREWRITE);
diff --git a/sys/dev/pci/if_oce.c b/sys/dev/pci/if_oce.c
index 3e7a908dfd4..2ddbe0576b2 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.98 2016/09/15 02:00:17 dlg Exp $ */
+/* $OpenBSD: if_oce.c,v 1.99 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2012 Mike Belopuhov
@@ -1204,7 +1204,6 @@ oce_start(struct ifnet *ifp)
int
oce_encap(struct oce_softc *sc, struct mbuf **mpp, int wqidx)
{
- struct ifnet *ifp = &sc->sc_ac.ac_if;
struct mbuf *m = *mpp;
struct oce_wq *wq = sc->sc_wq[wqidx];
struct oce_pkt *pkt = NULL;
@@ -1308,8 +1307,6 @@ oce_encap(struct oce_softc *sc, struct mbuf **mpp, int wqidx)
oce_pkt_put(&wq->pkt_list, pkt);
- ifp->if_opackets++;
-
oce_dma_sync(&wq->ring->dma, BUS_DMASYNC_POSTREAD |
BUS_DMASYNC_POSTWRITE);
diff --git a/sys/dev/pci/if_pcn.c b/sys/dev/pci/if_pcn.c
index b2adb5645bd..6d6c367f077 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.42 2016/11/29 10:22:30 jsg Exp $ */
+/* $OpenBSD: if_pcn.c,v 1.43 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: if_pcn.c,v 1.26 2005/05/07 09:15:44 is Exp $ */
/*
@@ -1268,7 +1268,6 @@ pcn_txintr(struct pcn_softc *sc)
/* Real number is unknown. */
ifp->if_collisions += 2;
}
- ifp->if_opackets++;
next_packet:
sc->sc_txfree += txs->txs_dmamap->dm_nsegs;
bus_dmamap_sync(sc->sc_dmat, txs->txs_dmamap,
diff --git a/sys/dev/pci/if_rtwn.c b/sys/dev/pci/if_rtwn.c
index 93d6abec640..37362808386 100644
--- a/sys/dev/pci/if_rtwn.c
+++ b/sys/dev/pci/if_rtwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rtwn.c,v 1.24 2016/07/26 13:00:28 stsp Exp $ */
+/* $OpenBSD: if_rtwn.c,v 1.25 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -1126,7 +1126,6 @@ rtwn_tx_done(struct rtwn_pci_softc *sc, int qid)
ieee80211_release_node(ic, tx_data->ni);
tx_data->ni = NULL;
- ifp->if_opackets++;
sc->sc_sc.sc_tx_timer = 0;
tx_ring->queued--;
}
diff --git a/sys/dev/pci/if_se.c b/sys/dev/pci/if_se.c
index e975860e4b0..33fcdb0f27a 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.19 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_se.c,v 1.20 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2009, 2010 Christopher Zimmermann <madroach@zakweb.de>
@@ -1002,8 +1002,7 @@ se_txeof(struct se_softc *sc)
ifp->if_xname, txstat, TX_ERR_BITS);
ifp->if_oerrors++;
/* TODO: better error differentiation */
- } else
- ifp->if_opackets++;
+ }
if (cd->se_tx_mbuf[i] != NULL) {
bus_dmamap_sync(sc->sc_dmat, cd->se_tx_map[i], 0,
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c
index 2c977c57819..d4ec85a7ed5 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.134 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_sis.c,v 1.135 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -1498,7 +1498,6 @@ sis_txeof(struct sis_softc *sc)
ifp->if_collisions += (txstat & SIS_TXSTAT_COLLCNT) >> 16;
- ifp->if_opackets++;
if (cur_tx->map->dm_nsegs != 0) {
bus_dmamap_t map = cur_tx->map;
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c
index f499c8c5b0c..180bfaa8af9 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.185 2017/01/08 18:08:14 visa Exp $ */
+/* $OpenBSD: if_sk.c,v 1.186 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -1672,8 +1672,6 @@ sk_txeof(struct sk_if_softc *sc_if)
SK_CDTXSYNC(sc_if, idx, 1, BUS_DMASYNC_PREREAD);
break;
}
- if (sk_ctl & SK_TXCTL_LASTFRAG)
- ifp->if_opackets++;
if (sc_if->sk_cdata.sk_tx_chain[idx].sk_mbuf != NULL) {
entry = sc_if->sk_cdata.sk_tx_map[idx];
diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c
index 471eee093da..870443d1148 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.64 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_ste.c,v 1.65 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -749,7 +749,6 @@ ste_txeof(struct ste_softc *sc)
m_freem(cur_tx->ste_mbuf);
cur_tx->ste_mbuf = NULL;
ifq_clr_oactive(&ifp->if_snd);
- ifp->if_opackets++;
STE_INC(idx, STE_TX_LIST_CNT);
}
diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c
index 51ea9e5ef7f..155ed623341 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.68 2016/11/29 10:22:30 jsg Exp $ */
+/* $OpenBSD: if_stge.c,v 1.69 2017/01/22 10:17:38 dlg Exp $ */
/* $NetBSD: if_stge.c,v 1.27 2005/05/16 21:35:32 bouyer Exp $ */
/*-
@@ -1031,9 +1031,6 @@ stge_stats_update(struct stge_softc *sc)
(void) CSR_READ_4(sc, STGE_OctetXmtdOk);
- ifp->if_opackets +=
- CSR_READ_4(sc, STGE_FramesXmtdOk);
-
ifp->if_collisions +=
CSR_READ_4(sc, STGE_LateCollisions) +
CSR_READ_4(sc, STGE_MultiColFrames) +
diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c
index fcce718263a..001c6353389 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.139 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_tht.c,v 1.140 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -1153,8 +1153,6 @@ tht_start(struct ifnet *ifp)
bus_dmamap_sync(sc->sc_thtc->sc_dmat, pkt->tp_dmap, 0,
pkt->tp_dmap->dm_mapsize, BUS_DMASYNC_PREWRITE);
- ifp->if_opackets++;
-
} while (sc->sc_txt.tf_ready > THT_FIFO_DESC_LEN);
tht_fifo_post(sc, &sc->sc_txt);
diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c
index 9b8fbd51a6d..c70443c1b8b 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.69 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_tl.c,v 1.70 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1326,7 +1326,6 @@ tl_stats_update(void *xsc)
*p++ = CSR_READ_4(sc, TL_DIO_DATA);
*p++ = CSR_READ_4(sc, TL_DIO_DATA);
- 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_ierrors += tl_stats.tl_crc_errors + tl_stats.tl_code_errors +
diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c
index b5f124681b2..deede70e9de 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.124 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_txp.c,v 1.125 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2001
@@ -818,7 +818,6 @@ txp_tx_reclaim(struct txp_softc *sc, struct txp_tx_ring *r,
m_freem(m);
txd->tx_addrlo = 0;
txd->tx_addrhi = 0;
- ifp->if_opackets++;
}
}
ifq_clr_oactive(&ifp->if_snd);
@@ -1247,7 +1246,6 @@ txp_tick(void *vsc)
ext[2].ext_1;
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;
out:
if (rsp != NULL)
diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c
index 6355e56ea18..63ab3b1fa0a 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.70 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_vge.c,v 1.71 2017/01/22 10:17:38 dlg Exp $ */
/* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */
/*
* Copyright (c) 2004
@@ -1181,8 +1181,6 @@ vge_txeof(struct vge_softc *sc)
ifp->if_collisions++;
if (txstat & VGE_TDSTS_TXERR)
ifp->if_oerrors++;
- else
- ifp->if_opackets++;
sc->vge_ldata.vge_tx_free++;
VGE_TX_DESC_INC(idx);
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c
index f29db1c04b4..e34a1aa4f27 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.96 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_vic.c,v 1.97 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org>
@@ -1109,7 +1109,6 @@ vic_start(struct ifnet *ifp)
bus_dmamap_sync(sc->sc_dmat, dmap, 0, dmap->dm_mapsize,
BUS_DMASYNC_PREWRITE);
- ifp->if_opackets++;
sc->sc_txpending++;
VIC_INC(sc->sc_data->vd_tx_nextidx, sc->sc_data->vd_tx_length);
diff --git a/sys/dev/pci/if_vmx.c b/sys/dev/pci/if_vmx.c
index ef9a2089e54..953a6e5e86a 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.44 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_vmx.c,v 1.45 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 2013 Tsubai Masanari
@@ -1081,7 +1081,6 @@ vmxnet3_start(struct ifnet *ifp)
/* Change the ownership by flipping the "generation" bit */
txd->tx_word2 ^= htole32(VMXNET3_TX_GEN_M << VMXNET3_TX_GEN_S);
- ifp->if_opackets++;
used += n;
}
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c
index 936568fcc74..b61c0130a83 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.152 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_vr.c,v 1.153 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1033,7 +1033,6 @@ vr_txeof(struct vr_softc *sc)
ifp->if_collisions +=(txstat & VR_TXSTAT_COLLCNT) >> 3;
- ifp->if_opackets++;
if (cur_tx->vr_map != NULL && cur_tx->vr_map->dm_nsegs > 0)
bus_dmamap_unload(sc->sc_dmat, cur_tx->vr_map);
diff --git a/sys/dev/pci/if_vte.c b/sys/dev/pci/if_vte.c
index 7503b14f7db..24517648dcf 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.18 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_vte.c,v 1.19 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2010, Pyun YongHyeon <yongari@FreeBSD.org>
* All rights reserved.
@@ -838,7 +838,6 @@ vte_stats_update(struct vte_softc *sc)
stat->rx_pause_frames += (value & 0xFF);
/* Update ifp counters. */
- 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_ierrors = stat->rx_crcerrs + stat->rx_runts +
diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c
index 467a1666f92..cc644aa596c 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.67 2016/04/13 10:34:32 mpi Exp $ */
+/* $OpenBSD: if_wb.c,v 1.68 2017/01/22 10:17:38 dlg Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1035,7 +1035,6 @@ void wb_txeof(sc)
ifp->if_collisions += (txstat & WB_TXSTAT_COLLCNT) >> 3;
- ifp->if_opackets++;
m_freem(cur_tx->wb_mbuf);
cur_tx->wb_mbuf = NULL;
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c
index 1dc0404c17f..aecdc39e104 100644
--- a/sys/dev/pci/if_wpi.c
+++ b/sys/dev/pci/if_wpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wpi.c,v 1.137 2016/12/23 18:44:51 kettenis Exp $ */
+/* $OpenBSD: if_wpi.c,v 1.138 2017/01/22 10:17:38 dlg Exp $ */
/*-
* Copyright (c) 2006-2008
@@ -1361,8 +1361,6 @@ wpi_tx_done(struct wpi_softc *sc, struct wpi_rx_desc *desc)
if ((letoh32(stat->status) & 0xff) != 1)
ifp->if_oerrors++;
- else
- ifp->if_opackets++;
/* Unmap and free mbuf. */
bus_dmamap_sync(sc->sc_dmat, data->map, 0, data->map->dm_mapsize,
diff --git a/sys/dev/pci/if_xge.c b/sys/dev/pci/if_xge.c
index ddcaca5496b..564e40d3955 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.74 2016/11/29 10:22:30 jsg Exp $ */
+/* $OpenBSD: if_xge.c,v 1.75 2017/01/22 10:17:39 dlg Exp $ */
/* $NetBSD: if_xge.c,v 1.1 2005/09/09 10:30:27 ragge Exp $ */
/*
@@ -901,7 +901,6 @@ xge_intr(void *pv)
}
bus_dmamap_unload(sc->sc_dmat, dmp);
m_freem(sc->sc_txb[i]);
- ifp->if_opackets++;
sc->sc_lasttx = i;
}
diff --git a/sys/dev/pcmcia/if_malo.c b/sys/dev/pcmcia/if_malo.c
index ea72b077022..12c9f9f23a2 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.91 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: if_malo.c,v 1.92 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
@@ -1066,7 +1066,6 @@ cmalo_tx_done(struct malo_softc *sc)
DPRINTF(2, "%s: TX done\n", sc->sc_dev.dv_xname);
- ifp->if_opackets++;
ifq_clr_oactive(&ifp->if_snd);
ifp->if_timer = 0;
cmalo_start(ifp);
diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c
index 26fe80adcbe..eda8f9324e1 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.58 2016/04/13 10:49:26 mpi Exp $ */
+/* $OpenBSD: if_xe.c,v 1.59 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist, Brandon Creighton, Job de Haas
@@ -722,7 +722,7 @@ xe_intr(arg)
xe_start(ifp);
/* Detected excessive collisions? */
- if ((tx_status & EXCESSIVE_COLL) && ifp->if_opackets > 0) {
+ if (tx_status & EXCESSIVE_COLL) {
DPRINTF(XED_INTR,
("%s: excessive collisions\n", sc->sc_dev.dv_xname));
bus_space_write_1(sc->sc_bst, sc->sc_bsh, sc->sc_offset + CR,
@@ -730,7 +730,7 @@ xe_intr(arg)
ifp->if_oerrors++;
}
- if ((tx_status & TX_ABORT) && ifp->if_opackets > 0)
+ if (tx_status & TX_ABORT)
ifp->if_oerrors++;
end:
@@ -1149,7 +1149,6 @@ xe_start(ifp)
splx(s);
ifp->if_timer = 5;
- ++ifp->if_opackets;
}
int
diff --git a/sys/dev/pv/if_hvn.c b/sys/dev/pv/if_hvn.c
index 59f430e96a5..3fd0b1fb353 100644
--- a/sys/dev/pv/if_hvn.c
+++ b/sys/dev/pv/if_hvn.c
@@ -481,8 +481,6 @@ hvn_start(struct ifnet *ifp)
}
sc->sc_tx_next++;
-
- ifp->if_opackets++;
}
}
diff --git a/sys/dev/pv/if_vio.c b/sys/dev/pv/if_vio.c
index 53354b25b72..1762e4325bb 100644
--- a/sys/dev/pv/if_vio.c
+++ b/sys/dev/pv/if_vio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vio.c,v 1.1 2017/01/21 11:21:28 reyk Exp $ */
+/* $OpenBSD: if_vio.c,v 1.2 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2012 Stefan Fritsch, Alexander Fiveg.
@@ -1148,7 +1148,6 @@ vio_txeof(struct virtqueue *vq)
bus_dmamap_unload(vsc->sc_dmat, sc->sc_tx_dmamaps[slot]);
sc->sc_tx_mbufs[slot] = 0;
virtio_dequeue_commit(vq, slot);
- ifp->if_opackets++;
m_freem(m);
}
diff --git a/sys/dev/pv/if_xnf.c b/sys/dev/pv/if_xnf.c
index 0f05e521b4b..9838a8d645a 100644
--- a/sys/dev/pv/if_xnf.c
+++ b/sys/dev/pv/if_xnf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xnf.c,v 1.46 2017/01/05 13:23:51 mikeb Exp $ */
+/* $OpenBSD: if_xnf.c,v 1.47 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2015, 2016 Mike Belopuhov
@@ -510,7 +510,6 @@ xnf_start(struct ifnet *ifp)
m_freem(m);
continue;
}
- ifp->if_opackets++;
#if NBPFILTER > 0
if (ifp->if_bpf)
diff --git a/sys/dev/sbus/be.c b/sys/dev/sbus/be.c
index 06071c2103f..97d51e70966 100644
--- a/sys/dev/sbus/be.c
+++ b/sys/dev/sbus/be.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: be.c,v 1.41 2016/04/13 11:36:00 mpi Exp $ */
+/* $OpenBSD: be.c,v 1.42 2017/01/22 10:17:39 dlg Exp $ */
/* $NetBSD: be.c,v 1.26 2001/03/20 15:39:20 pk Exp $ */
/*-
@@ -850,7 +850,6 @@ betint(struct be_softc *sc)
break;
ifq_clr_oactive(&ifp->if_snd);
- ifp->if_opackets++;
if (++bix == QEC_XD_RING_MAXSIZE)
bix = 0;
diff --git a/sys/dev/sbus/qe.c b/sys/dev/sbus/qe.c
index 3d9aacfbcac..ca02307368f 100644
--- a/sys/dev/sbus/qe.c
+++ b/sys/dev/sbus/qe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qe.c,v 1.39 2016/04/13 11:36:00 mpi Exp $ */
+/* $OpenBSD: qe.c,v 1.40 2017/01/22 10:17:39 dlg Exp $ */
/* $NetBSD: qe.c,v 1.16 2001/03/30 17:30:18 christos Exp $ */
/*-
@@ -627,7 +627,6 @@ qe_tint(sc)
break;
ifq_clr_oactive(&ifp->if_snd);
- ifp->if_opackets++;
if (++bix == QEC_XD_RING_MAXSIZE)
bix = 0;
diff --git a/sys/dev/usb/if_athn_usb.c b/sys/dev/usb/if_athn_usb.c
index 2cc0b6c3089..c31f3d1fed7 100644
--- a/sys/dev/usb/if_athn_usb.c
+++ b/sys/dev/usb/if_athn_usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_athn_usb.c,v 1.44 2017/01/12 16:32:28 stsp Exp $ */
+/* $OpenBSD: if_athn_usb.c,v 1.45 2017/01/22 10:17:39 dlg Exp $ */
/*-
* Copyright (c) 2011 Damien Bergamini <damien.bergamini@free.fr>
@@ -1918,7 +1918,6 @@ athn_usb_txeof(struct usbd_xfer *xfer, void *priv,
return;
}
sc->sc_tx_timer = 0;
- ifp->if_opackets++;
/* We just released a Tx buffer, notify Tx. */
if (ifq_is_oactive(&ifp->if_snd)) {
diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c
index b54ddc945de..725a6dbb66b 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.120 2016/11/06 12:58:01 mpi Exp $ */
+/* $OpenBSD: if_atu.c,v 1.121 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2003, 2004
* Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved.
@@ -1775,8 +1775,6 @@ atu_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
if (err)
ifp->if_oerrors++;
- else
- ifp->if_opackets++;
s = splnet();
SLIST_INSERT_HEAD(&sc->atu_cdata.atu_tx_free, c, atu_list);
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index 63f7e29ce5f..d43ec0e5acb 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.105 2016/04/13 11:03:37 mpi Exp $ */
+/* $OpenBSD: if_aue.c,v 1.106 2017/01/22 10:17:39 dlg Exp $ */
/* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -1111,8 +1111,6 @@ aue_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
return;
}
- ifp->if_opackets++;
-
m_freem(c->aue_mbuf);
c->aue_mbuf = NULL;
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c
index 484c33ed1df..8d197a19b2b 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.137 2016/04/13 11:03:37 mpi Exp $ */
+/* $OpenBSD: if_axe.c,v 1.138 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org>
@@ -1130,7 +1130,6 @@ axe_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
axe_start(ifp);
- ifp->if_opackets++;
splx(s);
return;
}
diff --git a/sys/dev/usb/if_axen.c b/sys/dev/usb/if_axen.c
index fbb41717166..325ae548e7f 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.23 2016/09/14 12:41:09 mpi Exp $ */
+/* $OpenBSD: if_axen.c,v 1.24 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2013 Yojiro UO <yuo@openbsd.org>
@@ -1086,7 +1086,6 @@ axen_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
axen_start(ifp);
- ifp->if_opackets++;
splx(s);
}
diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c
index 983ddae1d22..750382d650b 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.72 2016/10/12 21:51:11 fcambus Exp $ */
+/* $OpenBSD: if_cdce.c,v 1.73 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com>
@@ -814,8 +814,6 @@ cdce_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
if (err)
ifp->if_oerrors++;
- else
- ifp->if_opackets++;
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
cdce_start(ifp);
diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c
index c5c2df36e12..fb13562625e 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.76 2016/11/06 12:58:01 mpi Exp $ */
+/* $OpenBSD: if_cue.c,v 1.77 2017/01/22 10:17:39 dlg Exp $ */
/* $NetBSD: if_cue.c,v 1.40 2002/07/11 21:14:26 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -770,8 +770,6 @@ cue_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
return;
}
- ifp->if_opackets++;
-
m_freem(c->cue_mbuf);
c->cue_mbuf = NULL;
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index 31f226043a4..4b8fad7c36c 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.85 2016/04/13 11:03:37 mpi Exp $ */
+/* $OpenBSD: if_kue.c,v 1.86 2017/01/22 10:17:39 dlg Exp $ */
/* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -784,8 +784,6 @@ kue_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
return;
}
- ifp->if_opackets++;
-
m_freem(c->kue_mbuf);
c->kue_mbuf = NULL;
diff --git a/sys/dev/usb/if_mos.c b/sys/dev/usb/if_mos.c
index e8f12c5320a..761597dbd98 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.37 2016/11/06 12:58:01 mpi Exp $ */
+/* $OpenBSD: if_mos.c,v 1.38 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2008 Johann Christian Rode <jcrode@gmx.net>
@@ -1022,7 +1022,6 @@ mos_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
mos_start(ifp);
- ifp->if_opackets++;
splx(s);
return;
}
diff --git a/sys/dev/usb/if_otus.c b/sys/dev/usb/if_otus.c
index 5b37a1ccb53..1025fa8c8b2 100644
--- a/sys/dev/usb/if_otus.c
+++ b/sys/dev/usb/if_otus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_otus.c,v 1.54 2016/11/06 12:58:01 mpi Exp $ */
+/* $OpenBSD: if_otus.c,v 1.55 2017/01/22 10:17:39 dlg Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -1257,7 +1257,6 @@ otus_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
return;
}
sc->sc_tx_timer = 0;
- ifp->if_opackets++;
ifq_clr_oactive(&ifp->if_snd);
otus_start(ifp);
splx(s);
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c
index e6aebc9d627..add8e74454d 100644
--- a/sys/dev/usb/if_ral.c
+++ b/sys/dev/usb/if_ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ral.c,v 1.141 2016/11/06 12:58:01 mpi Exp $ */
+/* $OpenBSD: if_ral.c,v 1.142 2017/01/22 10:17:39 dlg Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -681,7 +681,6 @@ ural_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
data->ni = NULL;
sc->tx_queued--;
- ifp->if_opackets++;
DPRINTFN(10, ("tx done\n"));
diff --git a/sys/dev/usb/if_rsu.c b/sys/dev/usb/if_rsu.c
index 2ab10514708..b922d0c7580 100644
--- a/sys/dev/usb/if_rsu.c
+++ b/sys/dev/usb/if_rsu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rsu.c,v 1.36 2016/07/26 18:18:04 stsp Exp $ */
+/* $OpenBSD: if_rsu.c,v 1.37 2017/01/22 10:17:39 dlg Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -1453,7 +1453,6 @@ rsu_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
return;
}
sc->sc_tx_timer = 0;
- ifp->if_opackets++;
/* We just released a Tx buffer, notify Tx. */
if (ifq_is_oactive(&ifp->if_snd)) {
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index 2940d4a803e..37bd8926324 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rum.c,v 1.119 2016/04/13 11:03:37 mpi Exp $ */
+/* $OpenBSD: if_rum.c,v 1.120 2017/01/22 10:17:39 dlg Exp $ */
/*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -742,7 +742,6 @@ rum_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
data->ni = NULL;
sc->tx_queued--;
- ifp->if_opackets++;
DPRINTFN(10, ("tx done\n"));
diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c
index 65e60b50577..4cbfa8a67ae 100644
--- a/sys/dev/usb/if_run.c
+++ b/sys/dev/usb/if_run.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_run.c,v 1.116 2016/04/13 11:03:37 mpi Exp $ */
+/* $OpenBSD: if_run.c,v 1.117 2017/01/22 10:17:39 dlg Exp $ */
/*-
* Copyright (c) 2008-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2374,7 +2374,6 @@ run_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
}
sc->sc_tx_timer = 0;
- ifp->if_opackets++;
ifq_clr_oactive(&ifp->if_snd);
run_start(ifp);
splx(s);
diff --git a/sys/dev/usb/if_smsc.c b/sys/dev/usb/if_smsc.c
index 662d4ea8ac7..f3b89ebad91 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.28 2016/07/31 12:51:49 kettenis Exp $ */
+/* $OpenBSD: if_smsc.c,v 1.29 2017/01/22 10:17:39 dlg Exp $ */
/* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
/*-
* Copyright (c) 2012
@@ -1262,7 +1262,6 @@ smsc_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
smsc_start(ifp);
- ifp->if_opackets++;
splx(s);
}
diff --git a/sys/dev/usb/if_uath.c b/sys/dev/usb/if_uath.c
index 3d0d95465f3..1c3ba77970a 100644
--- a/sys/dev/usb/if_uath.c
+++ b/sys/dev/usb/if_uath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_uath.c,v 1.78 2016/11/06 12:58:01 mpi Exp $ */
+/* $OpenBSD: if_uath.c,v 1.79 2017/01/22 10:17:39 dlg Exp $ */
/*-
* Copyright (c) 2006
@@ -1334,7 +1334,6 @@ uath_data_txeof(struct usbd_xfer *xfer, void *priv,
data->ni = NULL;
sc->tx_queued--;
- ifp->if_opackets++;
sc->sc_tx_timer = 0;
ifq_clr_oactive(&ifp->if_snd);
diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c
index 8daa106fa87..b68cf5c1cab 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.78 2016/04/13 11:03:37 mpi Exp $ */
+/* $OpenBSD: if_udav.c,v 1.79 2017/01/22 10:17:39 dlg 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 $ */
/*
@@ -1025,8 +1025,6 @@ udav_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
return;
}
- ifp->if_opackets++;
-
m_freem(c->udav_mbuf);
c->udav_mbuf = NULL;
diff --git a/sys/dev/usb/if_ugl.c b/sys/dev/usb/if_ugl.c
index 31523093598..2ebc4b634ab 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.20 2016/04/13 11:03:37 mpi Exp $ */
+/* $OpenBSD: if_ugl.c,v 1.21 2017/01/22 10:17:39 dlg 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>
@@ -526,8 +526,6 @@ ugl_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
return;
}
- ifp->if_opackets++;
-
m_freem(c->ugl_mbuf);
c->ugl_mbuf = NULL;
diff --git a/sys/dev/usb/if_umb.c b/sys/dev/usb/if_umb.c
index 0cdab04f921..4bed97d0ee1 100644
--- a/sys/dev/usb/if_umb.c
+++ b/sys/dev/usb/if_umb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_umb.c,v 1.8 2016/11/25 12:43:26 gerhard Exp $ */
+/* $OpenBSD: if_umb.c,v 1.9 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2016 genua mbH
@@ -1774,7 +1774,6 @@ umb_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
usbd_clear_endpoint_stall_async(sc->sc_tx_pipe);
}
} else {
- ifp->if_opackets++;
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
umb_start(ifp);
}
diff --git a/sys/dev/usb/if_upgt.c b/sys/dev/usb/if_upgt.c
index 61a699c36ef..19ba4ffc66a 100644
--- a/sys/dev/usb/if_upgt.c
+++ b/sys/dev/usb/if_upgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_upgt.c,v 1.78 2016/11/06 12:58:01 mpi Exp $ */
+/* $OpenBSD: if_upgt.c,v 1.79 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
@@ -1604,7 +1604,6 @@ upgt_tx_done(struct upgt_softc *sc, uint8_t *data)
data_tx->addr = 0;
sc->tx_queued--;
- ifp->if_opackets++;
DPRINTF(2, "%s: TX done: ", sc->sc_dev.dv_xname);
DPRINTF(2, "memaddr=0x%08x, status=0x%04x, rssi=%d, ",
diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c
index f9cf9d529af..1389222126e 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.72 2016/11/06 12:58:01 mpi Exp $ */
+/* $OpenBSD: if_upl.c,v 1.73 2017/01/22 10:17:39 dlg Exp $ */
/* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -507,8 +507,6 @@ upl_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
return;
}
- ifp->if_opackets++;
-
m_freem(c->upl_mbuf);
c->upl_mbuf = NULL;
diff --git a/sys/dev/usb/if_ure.c b/sys/dev/usb/if_ure.c
index e1d38a9e654..5e6ec3a659a 100644
--- a/sys/dev/usb/if_ure.c
+++ b/sys/dev/usb/if_ure.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ure.c,v 1.2 2016/08/07 00:21:57 jmatthew Exp $ */
+/* $OpenBSD: if_ure.c,v 1.3 2017/01/22 10:17:39 dlg Exp $ */
/*-
* Copyright (c) 2015 Kevin Lo <kevlo@FreeBSD.org>
* All rights reserved.
@@ -1156,7 +1156,6 @@ ure_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
ure_start(ifp);
- ifp->if_opackets++;
splx(s);
}
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c
index 13478c8b544..1158788930e 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.81 2016/11/06 12:58:01 mpi Exp $ */
+/* $OpenBSD: if_url.c,v 1.82 2017/01/22 10:17:39 dlg Exp $ */
/* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -885,8 +885,6 @@ url_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
return;
}
- ifp->if_opackets++;
-
m_freem(c->url_mbuf);
c->url_mbuf = NULL;
diff --git a/sys/dev/usb/if_urndis.c b/sys/dev/usb/if_urndis.c
index 112556eceb0..7b584e88b00 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.62 2016/09/16 11:13:37 mikeb Exp $ */
+/* $OpenBSD: if_urndis.c,v 1.63 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2010 Jonathan Armani <armani@openbsd.org>
@@ -1271,8 +1271,6 @@ urndis_txeof(struct usbd_xfer *xfer,
if (err)
ifp->if_oerrors++;
- else
- ifp->if_opackets++;
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
urndis_start(ifp);
diff --git a/sys/dev/usb/if_urtw.c b/sys/dev/usb/if_urtw.c
index 432cd4d8a1e..4a983089f41 100644
--- a/sys/dev/usb/if_urtw.c
+++ b/sys/dev/usb/if_urtw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtw.c,v 1.63 2017/01/09 14:44:28 mpi Exp $ */
+/* $OpenBSD: if_urtw.c,v 1.64 2017/01/22 10:17:39 dlg Exp $ */
/*-
* Copyright (c) 2009 Martynas Venckus <martynas@openbsd.org>
@@ -2524,7 +2524,6 @@ urtw_txeof_low(struct usbd_xfer *xfer, void *priv,
data->ni = NULL;
sc->sc_txtimer = 0;
- ifp->if_opackets++;
sc->sc_tx_low_queued--;
ifq_clr_oactive(&ifp->if_snd);
@@ -2563,7 +2562,6 @@ urtw_txeof_normal(struct usbd_xfer *xfer, void *priv,
data->ni = NULL;
sc->sc_txtimer = 0;
- ifp->if_opackets++;
sc->sc_tx_normal_queued--;
ifq_clr_oactive(&ifp->if_snd);
diff --git a/sys/dev/usb/if_urtwn.c b/sys/dev/usb/if_urtwn.c
index d8f2430391d..22a537315e0 100644
--- a/sys/dev/usb/if_urtwn.c
+++ b/sys/dev/usb/if_urtwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtwn.c,v 1.67 2017/01/08 05:48:27 stsp Exp $ */
+/* $OpenBSD: if_urtwn.c,v 1.68 2017/01/22 10:17:39 dlg Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -1237,7 +1237,6 @@ urtwn_txeof(struct usbd_xfer *xfer, void *priv,
return;
}
sc->sc_sc.sc_tx_timer = 0;
- ifp->if_opackets++;
/* We just released a Tx buffer, notify Tx. */
if (ifq_is_oactive(&ifp->if_snd)) {
diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c
index 5bc9f6bbfda..8acf80fb066 100644
--- a/sys/dev/usb/if_zyd.c
+++ b/sys/dev/usb/if_zyd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_zyd.c,v 1.115 2016/04/13 11:03:37 mpi Exp $ */
+/* $OpenBSD: if_zyd.c,v 1.116 2017/01/22 10:17:39 dlg Exp $ */
/*-
* Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr>
@@ -2079,7 +2079,6 @@ zyd_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
data->ni = NULL;
sc->tx_queued--;
- ifp->if_opackets++;
sc->tx_timer = 0;
ifq_clr_oactive(&ifp->if_snd);
diff --git a/sys/net/if.c b/sys/net/if.c
index 20e9dcbc9de..642ae66c99a 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.474 2017/01/12 09:07:46 mpi Exp $ */
+/* $OpenBSD: if.c,v 1.475 2017/01/22 10:17:39 dlg Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -610,6 +610,7 @@ if_enqueue(struct ifnet *ifp, struct mbuf *m)
if (error)
return (error);
+ ifp->if_opackets++;
ifp->if_obytes += length;
if (mflags & M_MCAST)
ifp->if_omcasts++;
diff --git a/sys/net/if_etherip.c b/sys/net/if_etherip.c
index 91a027f181e..7ff8c76f726 100644
--- a/sys/net/if_etherip.c
+++ b/sys/net/if_etherip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_etherip.c,v 1.10 2016/12/13 06:51:11 dlg Exp $ */
+/* $OpenBSD: if_etherip.c,v 1.11 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2015 Kazuya GODA <goda@openbsd.org>
*
@@ -185,8 +185,6 @@ etherip_start(struct ifnet *ifp)
continue;
}
- ifp->if_opackets++;
-
switch (sc->sc_src.ss_family) {
case AF_INET:
error = ip_etherip_output(ifp, m);
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index 75e82a8d0a3..97e5633b708 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gif.c,v 1.87 2016/12/13 06:51:11 dlg Exp $ */
+/* $OpenBSD: if_gif.c,v 1.88 2017/01/22 10:17:39 dlg Exp $ */
/* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */
/*
@@ -226,7 +226,6 @@ gif_start(struct ifnet *ifp)
m->m_pkthdr.len += offset;
}
#endif
- ifp->if_opackets++;
/* XXX we should cache the outgoing route */
diff --git a/sys/net/if_pair.c b/sys/net/if_pair.c
index 03e66f329ee..bae2ad4fb6e 100644
--- a/sys/net/if_pair.c
+++ b/sys/net/if_pair.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pair.c,v 1.8 2016/11/29 10:09:57 reyk Exp $ */
+/* $OpenBSD: if_pair.c,v 1.9 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
@@ -180,7 +180,6 @@ pairstart(struct ifnet *ifp)
bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT);
#endif /* NBPFILTER > 0 */
- ifp->if_opackets++;
if (pairedifp != NULL) {
if (m->m_flags & M_PKTHDR)
m_resethdr(m);
diff --git a/sys/net/if_pppoe.c b/sys/net/if_pppoe.c
index b15fad205de..51a7b5746b4 100644
--- a/sys/net/if_pppoe.c
+++ b/sys/net/if_pppoe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pppoe.c,v 1.59 2017/01/02 08:44:13 mpi Exp $ */
+/* $OpenBSD: if_pppoe.c,v 1.60 2017/01/22 10:17:39 dlg Exp $ */
/* $NetBSD: if_pppoe.c,v 1.51 2003/11/28 08:56:48 keihan Exp $ */
/*
@@ -778,7 +778,6 @@ pppoe_output(struct pppoe_softc *sc, struct mbuf *m)
/* encapsulated packet is forced into rdomain of physical interface */
m->m_pkthdr.ph_rtableid = eth_if->if_rdomain;
- sc->sc_sppp.pp_if.if_opackets++;
ret = eth_if->if_output(eth_if, m, &dst, NULL);
if_put(eth_if);
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c
index 84a80e1f554..1741ad01d48 100644
--- a/sys/net/if_trunk.c
+++ b/sys/net/if_trunk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_trunk.c,v 1.128 2016/09/16 09:51:21 mikeb Exp $ */
+/* $OpenBSD: if_trunk.c,v 1.129 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -934,9 +934,7 @@ trunk_start(struct ifnet *ifp)
if (tr->tr_proto != TRUNK_PROTO_NONE && tr->tr_count) {
error = (*tr->tr_start)(tr, m);
- if (error == 0)
- ifp->if_opackets++;
- else
+ if (error != 0)
ifp->if_oerrors++;
} else {
m_freem(m);
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 9529a29e84f..d3876ab1b4a 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tun.c,v 1.171 2016/12/21 13:13:01 mikeb Exp $ */
+/* $OpenBSD: if_tun.c,v 1.172 2017/01/22 10:17:39 dlg Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
@@ -590,7 +590,6 @@ tun_output(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
ifp->if_collisions++;
return (error);
}
- ifp->if_opackets++;
tun_wakeup(tp);
return (0);
@@ -832,7 +831,6 @@ tun_dev_read(struct tun_softc *tp, struct uio *uio, int ioflag)
if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT);
#endif
- ifp->if_opackets++;
}
while (m0 != NULL && uio->uio_resid > 0 && error == 0) {
diff --git a/sys/net/if_vether.c b/sys/net/if_vether.c
index 082c05615d6..77938e0b7c8 100644
--- a/sys/net/if_vether.c
+++ b/sys/net/if_vether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vether.c,v 1.28 2016/11/29 10:09:57 reyk Exp $ */
+/* $OpenBSD: if_vether.c,v 1.29 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2009 Theo de Raadt
@@ -133,7 +133,6 @@ vetherstart(struct ifnet *ifp)
bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT);
#endif /* NBPFILTER > 0 */
- ifp->if_opackets++;
m_freem(m);
}
}
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 594c251b767..fcf7ed49ca6 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vlan.c,v 1.167 2016/10/10 02:44:17 dlg Exp $ */
+/* $OpenBSD: if_vlan.c,v 1.168 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright 1998 Massachusetts Institute of Technology
@@ -298,7 +298,6 @@ vlan_start(struct ifnet *ifp)
ifp->if_oerrors++;
continue;
}
- ifp->if_opackets++;
}
leave:
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
index bab97040203..4d8620af63b 100644
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vxlan.c,v 1.56 2017/01/04 12:49:49 mikeb Exp $ */
+/* $OpenBSD: if_vxlan.c,v 1.57 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org>
@@ -310,8 +310,6 @@ vxlanstart(struct ifnet *ifp)
if (m == NULL)
return;
- ifp->if_opackets++;
-
#if NBPFILTER > 0
if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT);