-/* $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 <patrick@blueri.se>
*
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);
-/* $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 $ */
/*
m->m_pkthdr.len = m->m_len = len;
m->m_data += off;
- ifp->if_ipackets++;
-
ml_enqueue(&ml, m);
next:
-/* $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 <patrick@blueri.se>
* Copyright (c) 2013 Artturi Alm
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);
-/* $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 $ */
/*-
}
ml_enqueue(&ml, m);
- ifp->if_ipackets++;
next:
DBDMA_BUILD_CMD(cmd, DBDMA_CMD_IN_LAST, 0, DBDMA_INT_ALWAYS,
-/* $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 $ */
/*-
ml_enqueue(&ml, m);
if_input(ifp, &ml);
- ifp->if_ipackets++;
}
/*
-/* $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.
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 +=
-/* $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.
rxd->rxd_stat = 0;
IEC_RXSTATSYNC(sc, i, BUS_DMASYNC_PREREAD);
- ifp->if_ipackets++;
-
ml_enqueue(&ml, m);
}
-/* $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 $ */
/*
m->m_pkthdr.len = m->m_len = len - ETHER_CRC_LEN;
- ifp->if_ipackets++;
-
ml_enqueue(&ml, m);
}
-/* $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 $ */
/*
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));
-/* $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
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);
-/* $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.
ifp->if_ierrors++;
return;
}
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
if_input(ifp, &ml);
-/* $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)
return;
}
- ifp->if_ipackets++;
-
ml_enqueue(&ml, m);
if_input(ifp, &ml);
}
-/* $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 $ */
/*-
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) +
ml_enqueue(&ml, m);
if_input(&sc->sc_arpcom.ac_if, &ml);
- sc->sc_arpcom.ac_if.if_ipackets++;
}
void
-/* $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.
ifp->if_ierrors++;
return;
}
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
if_input(ifp, &ml);
-/* $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
*
goto skip;
}
- ifp->if_ipackets++;
-
/* Pass it on. */
ml_enqueue(&ml, m);
if_input(ifp, &ml);
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);
-/* $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 $ */
/*
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));
}
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;
-/* $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.
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;
}
-/* $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 $ */
/*-
m->m_pkthdr.len = m->m_len = len;
ml_enqueue(&ml, m);
- ifp->if_ipackets++;
}
if_input(ifp, &ml);
stats.TransmitAbortDueToExcessingDeferral +
stats.FramesLostDueToInternalTransmitErrors;
- ifp->if_ipackets += stats.ReceiveOKFrames;
-
ifp->if_ierrors += stats.ReceiveCRCErrors + stats.AlignmentErrors +
stats.ReceiveFramesTooLong + stats.ReceiveFramesTooShort +
stats.ReceiveFramesJabbersError +
-/* $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
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 *);
* 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;
continue;
} else {
dc_init(sc);
- return;
+ break;
}
}
}
}
m = m0;
- ifp->if_ipackets++;
+ consumed++;
ml_enqueue(&ml, m);
}
sc->dc_cdata.dc_rx_prod = i;
if_input(ifp, &ml);
+
+ return (consumed);
}
/*
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);
}
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);
}
-/* $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 $ */
/*
ifp->if_ierrors++;
goto exit;
}
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
} else {
/* Really BAD. The ring pointers are corrupted. */
-/* $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 $ */
/*
goto done;
}
- ++ifp->if_ipackets;
-
ml_enqueue(&ml, m);
/*
-/* $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 $ */
/*
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++;
-/* $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 $ */
/*
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);
-/* $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 $ */
/*-
len = HME_XD_DECODE_RSIZE(flags);
m->m_pkthdr.len = m->m_len = len;
- ifp->if_ipackets++;
-
ml_enqueue(&ml, m);
}
-/* $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 $ */
/*-
#endif
ml_enqueue(&ml, m);
- ifp->if_ipackets++;
-
if_input(ifp, &ml);
return (0);
}
-/* $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
break;
}
- ifp->if_ipackets++;
-
if (sc->wi_use_wep &&
rx_frame.wi_frame_ctl & htole16(WI_FCTL_WEP)) {
int len;
-/* $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 $ */
/*-
return (NULL);
}
- ifp->if_ipackets++;
-
eh = mtod(m, struct ether_header *);
#ifdef LANCE_REVC_BUG
-/* $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 $ */
/*-
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);
-/* $OpenBSD: mtd8xx.c,v 1.26 2015/04/13 08:45:48 mpi Exp $ */
+/* $OpenBSD: mtd8xx.c,v 1.27 2015/06/24 09:40:54 mpi Exp $ */
/*
* Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru>
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 *);
/* 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);
}
* 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;
}
m = m0;
- ifp->if_ipackets++;
-
+ consumed++;
ml_enqueue(&ml, m);
}
if_input(ifp, &ml);
sc->mtd_cdata.mtd_rx_prod = i;
+
+ return (consumed);
}
-/* $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
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) {
-/* $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
continue;
}
- ifp->if_ipackets++;
-
ml_enqueue(&ml, m);
bus_dmamap_sync(sc->sc_dmat, sc->sc_rx_dmamap,
-/* $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 $ */
/*-
m->m_pkthdr.len = m->m_len = len;
ml_enqueue(&ml, m);
- ifp->if_ipackets++;
}
/* Update the receive pointer. */
-/* $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 $ */
/*-
*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);
-/* $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
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) {
-/* $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
continue;
}
- ifp->if_ipackets++;
m->m_pkthdr.len = m->m_len = total_len;
if (sc->xl_type == XL_TYPE_905B) {
-/* $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)
return;
}
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
-
if_input(ifp, &ml);
}
-/* $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 $ */
/*
return;
}
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
-
if_input(ifp, &ml);
}
-/* $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 $ */
/*
return;
}
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
-
if_input(ifp, &ml);
}
-/* $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)
} /* QQQ */
}
#endif
- ifp->if_ipackets++;
ml_enqueue(&ml, ipkt);
}
} else
-/* $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 $ */
/*-
ml_enqueue(&ml, m);
if_input(&sc->sc_arpcom.ac_if, &ml);
- sc->sc_arpcom.ac_if.if_ipackets++;
}
void
-/* $OpenBSD: if_age.c,v 1.27 2015/04/30 07:51:07 mpi Exp $ */
+/* $OpenBSD: if_age.c,v 1.28 2015/06/24 09:40:54 mpi Exp $ */
/*-
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
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 +
-/* $OpenBSD: if_alc.c,v 1.32 2015/03/20 16:48:13 mpi Exp $ */
+/* $OpenBSD: if_alc.c,v 1.33 2015/06/24 09:40:54 mpi Exp $ */
/*-
* Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org>
* All rights reserved.
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 +
-/* $OpenBSD: if_ale.c,v 1.38 2015/04/13 08:45:48 mpi Exp $ */
+/* $OpenBSD: if_ale.c,v 1.39 2015/06/24 09:40:54 mpi Exp $ */
/*-
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
* All rights reserved.
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 +
-/* $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 $ */
/*
m = m_devget(sc->bce_data + i * MCLBYTES +
BCE_PREPKT_HEADER_SIZE, len, ETHER_ALIGN);
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
-/* $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
}
}
- ifp->if_ipackets++;
#ifdef __STRICT_ALIGNMENT
/*
* The i386 allows unaligned accesses, but for other
-/* $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
#endif
}
- /* Pass the mbuf off to the upper layers. */
- ifp->if_ipackets++;
-
bnx_rx_int_next_rx:
sw_prod = NEXT_RX_BD(sw_prod);
}
-/* $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 $ */
/*
*
cas_add_rxbuf(sc, idx);
if (m != NULL) {
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
} else
ifp->if_ierrors++;
cas_add_rxbuf(sc, idx);
if (m != NULL) {
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
} else
ifp->if_ierrors++;
-/* $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 $ */
/*-
#if defined(TULIP_DEBUG)
cnt++;
#endif
- ifp->if_ipackets++;
if (++eop == ri->ri_last)
eop = ri->ri_first;
ri->ri_nextin = eop;
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.298 2015/06/04 18:33:41 dms Exp $ */
+/* $OpenBSD: if_em.c,v 1.299 2015/06/24 09:40:54 mpi Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
}
if (eop) {
- ifp->if_ipackets++;
-
m = sc->fmp;
em_receive_checksum(sc, desc, m);
-/* $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.
*
m->m_pkthdr.len = m->m_len = buflen -
ETHER_CRC_LEN;
ml_enqueue(&ml, m);
- ifp->if_ipackets++;
}
} else {
ifp->if_ierrors++;
-/* $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 $ */
/******************************************************************************
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;
***************************************************************************/
-/* $OpenBSD: if_ixgb.c,v 1.64 2015/04/30 07:51:07 mpi Exp $ */
+/* $OpenBSD: if_ixgb.c,v 1.65 2015/06/24 09:40:54 mpi Exp $ */
#include <dev/pci/if_ixgb.h>
if (eop) {
eop_desc = i;
- ifp->if_ipackets++;
ixgb_receive_checksum(sc, current_desc, sc->fmp);
#if NVLAN > 0
-/* $OpenBSD: if_jme.c,v 1.40 2015/04/30 07:52:00 mpi Exp $ */
+/* $OpenBSD: if_jme.c,v 1.41 2015/06/24 09:40:54 mpi Exp $ */
/*-
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
* All rights reserved.
}
#endif
- ifp->if_ipackets++;
-
ml_enqueue(&ml, m);
/* Reset mbuf chains. */
-/* $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
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))
-/* $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.
/* 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);
}
-/* $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
m->m_pkthdr.len = m->m_len = total_len;
ml_enqueue(&ml, m);
- ifp->if_ipackets++;
-
if_input(ifp, &ml);
}
-/* $OpenBSD: if_myx.c,v 1.77 2015/05/17 02:33:09 chris Exp $ */
+/* $OpenBSD: if_myx.c,v 1.78 2015/06/24 09:40:54 mpi Exp $ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org>
timeout_add(&sc->sc_refill, 0);
}
- ifp->if_ipackets += ml_len(&ml);
-
if_input(ifp, &ml);
}
-/* $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
*
m->m_pkthdr.len = m->m_len = len;
m->m_data += ETHER_ALIGN;
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
}
-/* $OpenBSD: if_nfe.c,v 1.110 2015/03/20 18:42:25 mpi Exp $ */
+/* $OpenBSD: if_nfe.c,v 1.111 2015/06/24 09:40:54 mpi Exp $ */
/*-
* Copyright (c) 2006, 2007 Damien Bergamini <damien.bergamini@free.fr>
}
#endif
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
/* update mapping address in h/w descriptor */
-/* $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
}
#endif
- ifp->if_ipackets++;
-
#if NVLAN > 0
if (extsts & NGE_RXEXTSTS_VLANPKT) {
m->m_pkthdr.ether_vtag =
-/* $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
}
#endif
- ifp->if_ipackets++;
-
#ifdef OCE_LRO
/* Try to queue to LRO */
if (IF_LRO_ENABLED(ifp) && !(m->m_flags & M_VLANTAG) &&
-/* $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 $ */
/*
m->m_pkthdr.len = m->m_len = len;
ml_enqueue(&ml, m);
- ifp->if_ipackets++;
}
/* Update the receive pointer. */
-/* $OpenBSD: if_se.c,v 1.12 2015/04/30 07:51:07 mpi Exp $ */
+/* $OpenBSD: if_se.c,v 1.13 2015/06/24 09:40:54 mpi Exp $ */
/*-
* Copyright (c) 2009, 2010 Christopher Zimmermann <madroach@zakweb.de>
SE_RX_BYTES(rxstat) - SE_RX_PAD_BYTES;
ml_enqueue(&ml, m);
- ifp->if_ipackets++;
}
if_input(ifp, &ml);
-/* $OpenBSD: if_sis.c,v 1.126 2015/04/13 08:45:48 mpi Exp $ */
+/* $OpenBSD: if_sis.c,v 1.127 2015/06/24 09:40:54 mpi Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
#else
m->m_pkthdr.len = m->m_len = total_len;
#endif
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
}
-/* $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
m->m_pkthdr.len = m->m_len = total_len;
ml_enqueue(&ml, m);
- ifp->if_ipackets++;
}
sc_if->sk_cdata.sk_rx_cons = cur;
-/* $OpenBSD: if_ste.c,v 1.58 2015/05/15 11:36:31 mpi Exp $ */
+/* $OpenBSD: if_ste.c,v 1.59 2015/06/24 09:40:54 mpi Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
m->m_pkthdr.len = m->m_len = total_len;
ml_enqueue(&ml, m);
- ifp->if_ipackets++;
cur_rx->ste_ptr->ste_status = 0;
count++;
-/* $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 $ */
/*-
(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);
-/* $OpenBSD: if_tht.c,v 1.131 2015/04/30 07:51:07 mpi Exp $ */
+/* $OpenBSD: if_tht.c,v 1.132 2015/06/24 09:40:54 mpi Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
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);
-/* $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
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);
-/* $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
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)
-/* $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
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 */
-/* $OpenBSD: if_vic.c,v 1.90 2015/05/29 00:37:10 uebayasi Exp $ */
+/* $OpenBSD: if_vic.c,v 1.91 2015/06/24 09:40:54 mpi Exp $ */
/*
* Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org>
m->m_pkthdr.len = m->m_len = len;
- ifp->if_ipackets++;
-
ml_enqueue(&ml, m);
nextp:
-/* $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.
}
if (bufs_left == 0) {
- ifp->if_ipackets++;
ml_enqueue(&ml, m0);
m0 = NULL;
}
-/* $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
}
}
- ifp->if_ipackets += ml_len(&ml);
if_input(ifp, &ml);
/* XXX Should we (try to) allocate buffers for ring 2 too? */
-/* $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
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) {
-/* $OpenBSD: if_vte.c,v 1.12 2015/04/30 07:51:07 mpi Exp $ */
+/* $OpenBSD: if_vte.c,v 1.13 2015/06/24 09:40:54 mpi Exp $ */
/*-
* Copyright (c) 2010, Pyun YongHyeon <yongari@FreeBSD.org>
* All rights reserved.
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;
}
-/* $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
break;
}
- ifp->if_ipackets++;
-
ml_enqueue(&ml, m);
}
-/* $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 $ */
/*
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)
-/* $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.
++ifp->if_ierrors;
break;
}
- ++ifp->if_ipackets;
ml_enqueue(&ml, m);
}
-/* $OpenBSD: if_malo.c,v 1.84 2015/04/13 08:45:48 mpi Exp $ */
+/* $OpenBSD: if_malo.c,v 1.85 2015/06/24 09:40:54 mpi Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
/* 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
-/* $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
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);
-/* $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 $ */
/*-
ifp->if_ierrors++;
return;
}
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
if_input(ifp, &ml);
-/* $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 $ */
/*-
ifp->if_ierrors++;
return;
}
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
if_input(ifp, &ml);
-/* $OpenBSD: if_atu.c,v 1.111 2015/02/10 23:25:46 mpi Exp $ */
+/* $OpenBSD: if_atu.c,v 1.112 2015/06/24 09:40:54 mpi Exp $ */
/*
* Copyright (c) 2003, 2004
* Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved.
wh = mtod(m, struct ieee80211_frame *);
ni = ieee80211_find_rxnode(ic, wh);
- ifp->if_ipackets++;
-
s = splnet();
if (atu_newbuf(sc, c, NULL) == ENOBUFS) {
-/* $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
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) {
-/* $OpenBSD: if_axe.c,v 1.131 2015/06/12 15:47:31 mpi Exp $ */
+/* $OpenBSD: if_axe.c,v 1.132 2015/06/24 09:40:54 mpi Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org>
goto done;
}
- ifp->if_ipackets++;
m->m_pkthdr.len = m->m_len = pktlen;
memcpy(mtod(m, char *), buf, pktlen);
-/* $OpenBSD: if_axen.c,v 1.13 2015/06/12 15:47:31 mpi Exp $ */
+/* $OpenBSD: if_axen.c,v 1.14 2015/06/24 09:40:54 mpi Exp $ */
/*
* Copyright (c) 2013 Yojiro UO <yuo@openbsd.org>
}
/* skip pseudo header (2byte) */
- ifp->if_ipackets++;
m->m_pkthdr.len = m->m_len = pkt_len - 2;
#ifdef AXEN_TOE
-/* $OpenBSD: if_cdce.c,v 1.64 2015/04/10 08:41:43 mpi Exp $ */
+/* $OpenBSD: if_cdce.c,v 1.65 2015/06/24 09:40:54 mpi Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com>
goto done;
}
- ifp->if_ipackets++;
m->m_pkthdr.len = m->m_len = total_len;
ml_enqueue(&ml, m);
-/* $OpenBSD: if_cdcef.c,v 1.36 2015/04/10 08:41:43 mpi Exp $ */
+/* $OpenBSD: if_cdcef.c,v 1.37 2015/06/24 09:40:54 mpi Exp $ */
/*
* Copyright (c) 2007 Dale Rahn <drahn@openbsd.org>
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);
}
-/* $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
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);
-/* $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
goto done;
}
- ifp->if_ipackets++;
m->m_pkthdr.len = m->m_len = total_len;
ml_enqueue(&ml, m);
-/* $OpenBSD: if_mos.c,v 1.30 2015/05/02 10:44:29 jsg Exp $ */
+/* $OpenBSD: if_mos.c,v 1.31 2015/06/24 09:40:54 mpi Exp $ */
/*
* Copyright (c) 2008 Johann Christian Rode <jcrode@gmx.net>
goto done;
}
- ifp->if_ipackets++;
m->m_pkthdr.len = m->m_len = pktlen;
memcpy(mtod(m, char *), buf, pktlen);
-/* $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
goto done;
}
- ifp->if_ipackets++;
m->m_pkthdr.len = m->m_len = pktlen;
m_adj(m, ETHER_ALIGN);
-/* $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 $ */
/*
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);
-/* $OpenBSD: if_ugl.c,v 1.12 2015/06/20 11:35:27 mpi Exp $ */
+/* $OpenBSD: if_ugl.c,v 1.13 2015/06/24 09:40:54 mpi Exp $ */
/* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */
/*
* Copyright (c) 2013 SASANO Takayoshi <uaa@uaa.org.uk>
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);
-/* $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.
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);
-/* $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
goto done;
}
- ifp->if_ipackets++;
total_len -= ETHER_CRC_LEN;
m = c->url_mbuf;
-/* $OpenBSD: if_urndis.c,v 1.54 2015/03/14 03:38:49 jsg Exp $ */
+/* $OpenBSD: if_urndis.c,v 1.55 2015/06/24 09:40:54 mpi Exp $ */
/*
* Copyright (c) 2010 Jonathan Armani <armani@openbsd.org>
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 {
-/* $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 $ */
/*
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;
-/* $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)
m->m_flags |= M_PROTO1;
ml_enqueue(&ml, m);
if_input(ifl->ifp, &ml);
- ifl->ifp->if_ipackets++;
return (NULL);
}
}
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
s = splnet();
if_input(ifp, &ml);
splx(s);
- ifp->if_ipackets++;
}
void
-/* $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 <reyk@openbsd.org>
ml_enqueue(&ml, m);
if_input(trifp, &ml);
- trifp->if_ipackets++;
return (1);
bad:
-/* $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 $ */
/*
s = splnet();
if_input(ifp, &ml);
splx(s);
- ifp->if_ipackets++;
return (0);
}
-/* $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
ml_enqueue(&ml, m);
if_input(&ifv->ifv_if, &ml);
- ifv->ifv_if.if_ipackets++;
return (1);
}
-/* $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 <reyk@openbsd.org>
pf_pkt_addr_changed(m);
#endif
- ifp->if_ipackets++;
ml_enqueue(&ml, m);
-
if_input(ifp, &ml);
/* success */
-/* $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
m_freem(m);
return;
}
- ifp->if_ipackets++;
/*
* Perform as a bridge within the AP. Notice that we do not
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,
-/* $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.
ml_enqueue(&ml, m0);
if_input(&vh->sc_if, &ml);
- vh->sc_if.if_ipackets++;
}
return (0);
ml_enqueue(&ml, m);
if_input(ifp, &ml);
- ifp->if_ipackets++;
return (1);
}