Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
  - Where/When if_ipackets is counted up
  - Note that some drivers still update packet statistics in their own
    way (periodical update)
- Moved bpf_mtap run in softint
  - This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net
This commit is contained in:
ozaki-r 2016-12-15 09:28:02 +00:00
parent fc59183457
commit dd8638eea5
139 changed files with 301 additions and 892 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ie.c,v 1.37 2016/06/10 13:27:10 ozaki-r Exp $ */
/* $NetBSD: if_ie.c,v 1.38 2016/12/15 09:28:02 ozaki-r Exp $ */
/*
* Copyright (c) 1995 Melvin Tang-Richardson.
@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.37 2016/06/10 13:27:10 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.38 2016/12/15 09:28:02 ozaki-r Exp $");
#define IGNORE_ETHER1_IDROM_CHECKSUM
@ -1278,10 +1278,6 @@ ie_read_frame(struct ie_softc *sc, int num)
return;
}
ifp->if_ipackets++;
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_es.c,v 1.55 2016/06/10 13:27:10 ozaki-r Exp $ */
/* $NetBSD: if_es.c,v 1.56 2016/12/15 09:28:02 ozaki-r Exp $ */
/*
* Copyright (c) 1995 Michael L. Hitch
@ -33,7 +33,7 @@
#include "opt_ns.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_es.c,v 1.55 2016/06/10 13:27:10 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_es.c,v 1.56 2016/12/15 09:28:02 ozaki-r Exp $");
#include <sys/param.h>
@ -659,7 +659,6 @@ esrint(struct es_softc *sc)
}
#endif
#endif /* USEPKTBUF */
ifp->if_ipackets++;
MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL)
return;
@ -720,7 +719,6 @@ esrint(struct es_softc *sc)
* Check if there's a BPF listener on this interface. If so, hand off
* the raw packet to bpf.
*/
bpf_mtap(ifp, top);
if_percpuq_enqueue(ifp->if_percpuq, top);
#ifdef ESDEBUG
if (--sc->sc_smcbusy) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_qn.c,v 1.42 2016/06/10 13:27:10 ozaki-r Exp $ */
/* $NetBSD: if_qn.c,v 1.43 2016/12/15 09:28:02 ozaki-r Exp $ */
/*
* Copyright (c) 1995 Mika Kortelainen
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.42 2016/06/10 13:27:10 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.43 2016/12/15 09:28:02 ozaki-r Exp $");
#include "qn.h"
#if NQN > 0
@ -582,9 +582,6 @@ qn_get_packet(struct qn_softc *sc, u_short len)
len -= len1;
}
/* Tap off BPF listeners */
bpf_mtap(ifp, head);
if_percpuq_enqueue(ifp->if_percpuq, head);
return;
@ -693,8 +690,6 @@ qn_rint(struct qn_softc *sc, u_short rstat)
/* Read the packet. */
qn_get_packet(sc, len);
++sc->sc_ethercom.ec_if.if_ipackets;
}
#ifdef QN_DEBUG

View File

@ -1,5 +1,5 @@
/* $Id: at91emac.c,v 1.17 2016/06/10 13:27:10 ozaki-r Exp $ */
/* $NetBSD: at91emac.c,v 1.17 2016/06/10 13:27:10 ozaki-r Exp $ */
/* $Id: at91emac.c,v 1.18 2016/12/15 09:28:02 ozaki-r Exp $ */
/* $NetBSD: at91emac.c,v 1.18 2016/12/15 09:28:02 ozaki-r Exp $ */
/*
* Copyright (c) 2007 Embedtronics Oy
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.17 2016/06/10 13:27:10 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.18 2016/12/15 09:28:02 ozaki-r Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -282,7 +282,6 @@ emac_intr(void *arg)
m_set_rcvif(sc->rxq[bi].m, ifp);
sc->rxq[bi].m->m_pkthdr.len =
sc->rxq[bi].m->m_len = fl;
bpf_mtap(ifp, sc->rxq[bi].m);
DPRINTFN(2,("received %u bytes packet\n", fl));
if_percpuq_enqueue(ifp->if_percpuq, sc->rxq[bi].m);
if (mtod(m, intptr_t) & 3) {

View File

@ -35,7 +35,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: bcm53xx_eth.c,v 1.28 2016/06/10 13:27:11 ozaki-r Exp $");
__KERNEL_RCSID(1, "$NetBSD: bcm53xx_eth.c,v 1.29 2016/12/15 09:28:02 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@ -1013,7 +1013,6 @@ bcmeth_rx_input(
}
m_set_rcvif(m, ifp);
ifp->if_ipackets++;
ifp->if_ibytes += m->m_pkthdr.len;
/*
@ -1025,7 +1024,6 @@ bcmeth_rx_input(
mutex_enter(sc->sc_lock);
#else
int s = splnet();
bpf_mtap(ifp, m);
if_input(ifp, m);
splx(s);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: epe.c,v 1.34 2016/06/10 13:27:11 ozaki-r Exp $ */
/* $NetBSD: epe.c,v 1.35 2016/12/15 09:28:02 ozaki-r Exp $ */
/*
* Copyright (c) 2004 Jesse Off
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.34 2016/06/10 13:27:11 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.35 2016/12/15 09:28:02 ozaki-r Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -230,7 +230,6 @@ begin:
m_set_rcvif(sc->rxq[bi].m, ifp);
sc->rxq[bi].m->m_pkthdr.len =
sc->rxq[bi].m->m_len = fl;
bpf_mtap(ifp, sc->rxq[bi].m);
if_percpuq_enqueue(ifp->if_percpuq,
sc->rxq[bi].m);
sc->rxq[bi].m = m;

View File

@ -1,4 +1,4 @@
/* $NetBSD: gemini_gmac.c,v 1.10 2016/12/06 07:09:38 ozaki-r Exp $ */
/* $NetBSD: gemini_gmac.c,v 1.11 2016/12/15 09:28:02 ozaki-r Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
@ -49,7 +49,7 @@
#include <sys/gpio.h>
__KERNEL_RCSID(0, "$NetBSD: gemini_gmac.c,v 1.10 2016/12/06 07:09:38 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: gemini_gmac.c,v 1.11 2016/12/15 09:28:02 ozaki-r Exp $");
#define SWFREEQ_DESCS 256 /* one page worth */
#define HWFREEQ_DESCS 256 /* one page worth */
@ -848,14 +848,12 @@ gmac_hwqueue_rxconsume(gmac_hwqueue_t *hwq, const gmac_desc_t *d)
*/
m = hwq->hwq_rxmbuf;
m_set_rcvif(m, ifp); /* set receive interface */
ifp->if_ipackets++;
ifp->if_ibytes += m->m_pkthdr.len;
switch (DESC0_RXSTS_GET(d->d_desc0)) {
case DESC0_RXSTS_GOOD:
case DESC0_RXSTS_LONG:
m->m_data += 2;
KASSERT(m_length(m) == m->m_pkthdr.len);
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
break;
default:

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_gpn.c,v 1.6 2016/06/10 13:27:11 ozaki-r Exp $ */
/* $NetBSD: if_gpn.c,v 1.7 2016/12/15 09:28:02 ozaki-r Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
@ -32,7 +32,7 @@
#include "opt_gemini.h"
__KERNEL_RCSID(0, "$NetBSD: if_gpn.c,v 1.6 2016/06/10 13:27:11 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_gpn.c,v 1.7 2016/12/15 09:28:02 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -300,9 +300,7 @@ gpn_process_data(struct gpn_softc *sc, const ipm_gpn_desc_t *gd)
sc->sc_rxmbuf = NULL;
m_set_rcvif(m, ifp);
KASSERT(((m->m_pkthdr.len + 63) >> 6) == gd->gd_pktlen64);
ifp->if_ipackets++;
ifp->if_ibytes += m->m_pkthdr.len;
bpf_mtap(ifp, m);
#ifdef GPNDEBUG
printf("%s: rx len=%d crc=%#x\n", ifp->if_xname,
m->m_pkthdr.len, m_crc32_le(m));

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_enet.c,v 1.9 2016/10/02 14:25:26 christos Exp $ */
/* $NetBSD: if_enet.c,v 1.10 2016/12/15 09:28:02 ozaki-r Exp $ */
/*
* Copyright (c) 2014 Ryo Shimizu <ryo@nerv.org>
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.9 2016/10/02 14:25:26 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.10 2016/12/15 09:28:02 ozaki-r Exp $");
#include "vlan.h"
@ -640,7 +640,6 @@ enet_rx_intr(void *arg)
} else {
/* packet receive ok */
ifp->if_ipackets++;
m_set_rcvif(m0, ifp);
m0->m_pkthdr.len = amount;
@ -653,9 +652,6 @@ enet_rx_intr(void *arg)
M_CSUM_TCPv6 | M_CSUM_UDPv6))
enet_rx_csum(sc, ifp, m0, idx);
/* Pass this up to any BPF listeners */
bpf_mtap(ifp, m0);
if_percpuq_enqueue(ifp->if_percpuq, m0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_cpsw.c,v 1.17 2016/12/08 01:12:00 ozaki-r Exp $ */
/* $NetBSD: if_cpsw.c,v 1.18 2016/12/15 09:28:02 ozaki-r Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.17 2016/12/08 01:12:00 ozaki-r Exp $");
__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.18 2016/12/15 09:28:02 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@ -1167,10 +1167,6 @@ cpsw_rxintr(void *arg)
m->m_pkthdr.len = m->m_len = len;
m->m_data += off;
ifp->if_ipackets++;
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
next:

View File

@ -30,7 +30,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: omapl1x_emac.c,v 1.4 2016/06/10 13:27:11 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: omapl1x_emac.c,v 1.5 2016/12/15 09:28:02 ozaki-r Exp $");
#include "opt_omapl1x.h"
@ -655,9 +655,6 @@ emac_rx_desc_process (struct emac_softc *sc, struct emac_channel *chan)
bus_dmamap_unload(sc->sc_buft, map);
m_set_rcvif(mb, ifp);
mb->m_pkthdr.len = mb->m_len = buf_len;
ifp->if_ipackets++;
bpf_mtap(ifp, mb);
if_percpuq_enqueue(ifp->if_percpuq, mb);
entry->m = NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rockchip_emac.c,v 1.15 2016/06/10 13:27:11 ozaki-r Exp $ */
/* $NetBSD: rockchip_emac.c,v 1.16 2016/12/15 09:28:02 ozaki-r Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca>
@ -29,7 +29,7 @@
#include "opt_rkemac.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rockchip_emac.c,v 1.15 2016/06/10 13:27:11 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: rockchip_emac.c,v 1.16 2016/12/15 09:28:02 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@ -877,8 +877,6 @@ rkemac_rxintr(struct rkemac_softc *sc)
m_set_rcvif(m, ifp);
m->m_flags |= M_HASFCS;
bpf_mtap(ifp, m);
ifp->if_ipackets++;
if_percpuq_enqueue(ifp->if_percpuq, m);
skip:

View File

@ -1,4 +1,4 @@
/* $NetBSD: ixp425_if_npe.c,v 1.31 2016/06/10 13:27:11 ozaki-r Exp $ */
/* $NetBSD: ixp425_if_npe.c,v 1.32 2016/12/15 09:28:02 ozaki-r Exp $ */
/*-
* Copyright (c) 2006 Sam Leffler. All rights reserved.
@ -28,7 +28,7 @@
#if 0
__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/if_npe.c,v 1.1 2006/11/19 23:55:23 sam Exp $");
#endif
__KERNEL_RCSID(0, "$NetBSD: ixp425_if_npe.c,v 1.31 2016/06/10 13:27:11 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: ixp425_if_npe.c,v 1.32 2016/12/15 09:28:02 ozaki-r Exp $");
/*
* Intel XScale NPE Ethernet driver.
@ -1050,11 +1050,10 @@ npe_rxdone(int qid, void *arg)
*/
m_adj(mrx, -ETHER_CRC_LEN);
ifp->if_ipackets++;
/*
* Tap off here if there is a bpf listener.
*/
bpf_mtap(ifp, mrx);
if_percpuq_enqueue(ifp->if_percpuq, mrx);
} else {
fail:

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le_ebus.c,v 1.12 2016/12/08 01:12:00 ozaki-r Exp $ */
/* $NetBSD: if_le_ebus.c,v 1.13 2016/12/15 09:28:02 ozaki-r Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_le_ebus.c,v 1.12 2016/12/08 01:12:00 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_le_ebus.c,v 1.13 2016/12/15 09:28:02 ozaki-r Exp $");
#include "opt_inet.h"
@ -759,15 +759,6 @@ enic_rint(struct enic_softc *sc, uint32_t saf, paddr_t phys)
m->m_pkthdr.len = len;
m->m_len = len; /* recheck */
ifp->if_ipackets++;
/*
* Check if there's a BPF listener on this interface.
* If so, hand off the raw packet to BPF.
*/
if (ifp->if_bpf)
bpf_mtap(ifp, m);
/* Pass the packet up. */
if_percpuq_enqueue(ifp->if_percpuq, m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_temac.c,v 1.11 2016/06/10 13:27:11 ozaki-r Exp $ */
/* $NetBSD: if_temac.c,v 1.12 2016/12/15 09:28:03 ozaki-r Exp $ */
/*
* Copyright (c) 2006 Jachym Holecek
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_temac.c,v 1.11 2016/06/10 13:27:11 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_temac.c,v 1.12 2016/12/15 09:28:03 ozaki-r Exp $");
#include <sys/param.h>
@ -1208,9 +1208,6 @@ temac_rxreap(struct temac_softc *sc)
continue;
}
bpf_mtap(ifp, m);
ifp->if_ipackets++;
if_percpuq_enqueue(ifp->if_percpuq, m);
/* Refresh descriptor, bail out if we're out of buffers. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_mc.c,v 1.43 2016/10/02 14:25:26 christos Exp $ */
/* $NetBSD: if_mc.c,v 1.44 2016/12/15 09:28:03 ozaki-r Exp $ */
/*-
* Copyright (c) 1997 David Huang <khym@azeotrope.org>
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_mc.c,v 1.43 2016/10/02 14:25:26 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_mc.c,v 1.44 2016/12/15 09:28:03 ozaki-r Exp $");
#include "opt_ddb.h"
#include "opt_inet.h"
@ -579,11 +579,6 @@ mace_read(struct mc_softc *sc, void *pkt, int len)
return;
}
ifp->if_ipackets++;
/* Pass the packet to any BPF listeners. */
bpf_mtap(ifp, m);
/* Pass the packet up. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_netdock_nubus.c,v 1.24 2016/06/10 13:27:11 ozaki-r Exp $ */
/* $NetBSD: if_netdock_nubus.c,v 1.25 2016/12/15 09:28:03 ozaki-r Exp $ */
/*
* Copyright (C) 2000,2002 Daishi Kato <daishi@axlight.com>
@ -43,7 +43,7 @@
/***********************/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_netdock_nubus.c,v 1.24 2016/06/10 13:27:11 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_netdock_nubus.c,v 1.25 2016/12/15 09:28:03 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -764,8 +764,6 @@ netdock_read(struct netdock_softc *sc, int len)
if (m == 0)
return (0);
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
return (1);

View File

@ -1,4 +1,4 @@
/* $NetBSD: am79c950.c,v 1.36 2016/10/02 14:25:26 christos Exp $ */
/* $NetBSD: am79c950.c,v 1.37 2016/12/15 09:28:03 ozaki-r Exp $ */
/*-
* Copyright (c) 1997 David Huang <khym@bga.com>
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: am79c950.c,v 1.36 2016/10/02 14:25:26 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: am79c950.c,v 1.37 2016/12/15 09:28:03 ozaki-r Exp $");
#include "opt_inet.h"
@ -591,11 +591,6 @@ mace_read(struct mc_softc *sc, uint8_t *pkt, int len)
return;
}
ifp->if_ipackets++;
/* Pass this up to any BPF listeners. */
bpf_mtap(ifp, m);
/* Pass the packet up. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bm.c,v 1.52 2016/12/08 01:12:00 ozaki-r Exp $ */
/* $NetBSD: if_bm.c,v 1.53 2016/12/15 09:28:03 ozaki-r Exp $ */
/*-
* Copyright (C) 1998, 1999, 2000 Tsubai Masanari. All rights reserved.
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_bm.c,v 1.52 2016/12/08 01:12:00 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_bm.c,v 1.53 2016/12/15 09:28:03 ozaki-r Exp $");
#include "opt_inet.h"
@ -499,13 +499,7 @@ bmac_rint(void *v)
goto next;
}
/*
* Check if there's a BPF listener on this interface.
* If so, hand off the raw packet to BPF.
*/
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
ifp->if_ipackets++;
next:
DBDMA_BUILD_CMD(cmd, DBDMA_CMD_IN_LAST, 0, DBDMA_INT_ALWAYS,

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_gm.c,v 1.48 2016/12/08 01:12:00 ozaki-r Exp $ */
/* $NetBSD: if_gm.c,v 1.49 2016/12/15 09:28:03 ozaki-r Exp $ */
/*-
* Copyright (c) 2000 Tsubai Masanari. All rights reserved.
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_gm.c,v 1.48 2016/12/08 01:12:00 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_gm.c,v 1.49 2016/12/15 09:28:03 ozaki-r Exp $");
#include "opt_inet.h"
@ -378,13 +378,7 @@ gmac_rint(struct gmac_softc *sc)
goto next;
}
/*
* Check if there's a BPF listener on this interface.
* If so, hand off the raw packet to BPF.
*/
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
ifp->if_ipackets++;
next:
dp->cmd_hi = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_admsw.c,v 1.15 2016/12/08 01:12:00 ozaki-r Exp $ */
/* $NetBSD: if_admsw.c,v 1.16 2016/12/15 09:28:03 ozaki-r Exp $ */
/*-
* Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.15 2016/12/08 01:12:00 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.16 2016/12/15 09:28:03 ozaki-r Exp $");
#include <sys/param.h>
@ -999,12 +999,9 @@ admsw_rxintr(struct admsw_softc *sc, int high)
if (stat & ADM5120_DMA_CSUMFAIL)
m->m_pkthdr.csum_flags |= M_CSUM_IPv4_BAD;
}
/* Pass this up to any BPF listeners. */
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
ifp->if_ipackets++;
}
#ifdef ADMSW_EVENT_COUNTERS
if (pkts)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_aumac.c,v 1.42 2016/12/08 01:12:00 ozaki-r Exp $ */
/* $NetBSD: if_aumac.c,v 1.43 2016/12/15 09:28:03 ozaki-r Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_aumac.c,v 1.42 2016/12/08 01:12:00 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_aumac.c,v 1.43 2016/12/15 09:28:03 ozaki-r Exp $");
@ -716,12 +716,8 @@ aumac_rxintr(struct aumac_softc *sc)
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
/* Pass this up to any BPF listeners. */
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
ifp->if_ipackets++;
}
if (pkts)
AUMAC_EVCNT_INCR(&sc->sc_ev_rxintr);

View File

@ -1,4 +1,4 @@
/* $Id: if_ae.c,v 1.29 2016/12/08 01:12:00 ozaki-r Exp $ */
/* $Id: if_ae.c,v 1.30 2016/12/15 09:28:03 ozaki-r Exp $ */
/*-
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
* Copyright (c) 2006 Garrett D'Amore.
@ -98,7 +98,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.29 2016/12/08 01:12:00 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.30 2016/12/15 09:28:03 ozaki-r Exp $");
#include <sys/param.h>
@ -1129,16 +1129,9 @@ ae_rxintr(struct ae_softc *sc)
rxs->rxs_dmamap->dm_mapsize, BUS_DMASYNC_PREREAD);
#endif /* __NO_STRICT_ALIGNMENT */
ifp->if_ipackets++;
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
/*
* Pass this up to any BPF listeners, but only
* pass it up the stack if its for us.
*/
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,8 +1,8 @@
/* $NetBSD: if_cnmac.c,v 1.4 2016/07/11 16:15:35 matt Exp $ */
/* $NetBSD: if_cnmac.c,v 1.5 2016/12/15 09:28:03 ozaki-r Exp $ */
#include <sys/cdefs.h>
#if 0
__KERNEL_RCSID(0, "$NetBSD: if_cnmac.c,v 1.4 2016/07/11 16:15:35 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_cnmac.c,v 1.5 2016/12/15 09:28:03 ozaki-r Exp $");
#endif
#include "opt_octeon.h"
@ -1495,17 +1495,11 @@ octeon_eth_recv(struct octeon_eth_softc *sc, uint64_t *work)
octeon_ipd_offload(word2, m->m_data, &m->m_pkthdr.csum_flags);
/* count input packet */
ifp->if_ipackets++;
/* XXX XXX XXX */
if (sc->sc_soft_req_cnt > sc->sc_soft_req_thresh) {
octeon_eth_send_queue_flush_fetch(sc);
octeon_eth_send_queue_flush(sc);
}
/* XXX XXX XXX */
bpf_mtap(ifp, m);
/* XXX XXX XXX */
if (sc->sc_flush)

View File

@ -1,4 +1,4 @@
/* $NetBSD: ralink_eth.c,v 1.11 2016/10/05 15:54:58 ryo Exp $ */
/* $NetBSD: ralink_eth.c,v 1.12 2016/12/15 09:28:03 ozaki-r Exp $ */
/*-
* Copyright (c) 2011 CradlePoint Technology, Inc.
* All rights reserved.
@ -29,7 +29,7 @@
/* ralink_eth.c -- Ralink Ethernet Driver */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ralink_eth.c,v 1.11 2016/10/05 15:54:58 ryo Exp $");
__KERNEL_RCSID(0, "$NetBSD: ralink_eth.c,v 1.12 2016/12/15 09:28:03 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@ -1540,7 +1540,6 @@ ralink_eth_rxintr(ralink_eth_softc_t *sc)
MCLAIM(m, &sc->sc_ethercom.ec_rx_mowner);
/* push it up the inteface */
ifp->if_ipackets++;
m_set_rcvif(m, ifp);
#ifdef RALINK_ETH_DEBUG
@ -1565,12 +1564,6 @@ ralink_eth_rxintr(ralink_eth_softc_t *sc)
*/
m->m_pkthdr.csum_flags |= M_CSUM_IPv4;
/*
* Pass this up to any BPF listeners, but only
* pass it up the stack if its for us.
*/
bpf_mtap(ifp, m);
/* Pass it on. */
sc->sc_evcnt_input.ev_count++;
if_percpuq_enqueue(ifp->if_percpuq, m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbmac.c,v 1.46 2016/07/21 17:02:47 christos Exp $ */
/* $NetBSD: sbmac.c,v 1.47 2016/12/15 09:28:03 ozaki-r Exp $ */
/*
* Copyright 2000, 2001, 2004
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.46 2016/07/21 17:02:47 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.47 2016/12/15 09:28:03 ozaki-r Exp $");
#include "opt_inet.h"
#include "opt_ns.h"
@ -917,7 +917,6 @@ sbdma_rx_process(struct sbmac_softc *sc, sbmacdma_t *d)
*/
m->m_pkthdr.len = m->m_len = len;
ifp->if_ipackets++;
m_set_rcvif(m, ifp);
@ -934,7 +933,6 @@ sbdma_rx_process(struct sbmac_softc *sc, sbmacdma_t *d)
* interface is in promiscuous mode.
*/
bpf_mtap(ifp, m);
/*
* Pass the buffer to the kernel
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sn.c,v 1.36 2016/06/10 13:27:12 ozaki-r Exp $ */
/* $NetBSD: if_sn.c,v 1.37 2016/12/15 09:28:03 ozaki-r Exp $ */
/*
* National Semiconductor DP8393X SONIC Driver
@ -16,7 +16,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_sn.c,v 1.36 2016/06/10 13:27:12 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_sn.c,v 1.37 2016/12/15 09:28:03 ozaki-r Exp $");
#include "opt_inet.h"
@ -963,9 +963,7 @@ sonicrxint(struct sn_softc *sc)
void *pkt =
(char *)sc->rbuf[orra & RBAMASK] +
(rxpkt_ptr & PGOFSET);
if (sonic_read(sc, pkt, len))
sc->sc_if.if_ipackets++;
else
if (sonic_read(sc, pkt, len) == 0)
sc->sc_if.if_ierrors++;
} else
sc->sc_if.if_ierrors++;
@ -1057,8 +1055,6 @@ sonic_read(struct sn_softc *sc, void *pkt, int len)
m = sonic_get(sc, pkt, len);
if (m == NULL)
return 0;
/* Pass the packet to any BPF listeners. */
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
return 1;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mb8795.c,v 1.56 2016/06/10 13:27:12 ozaki-r Exp $ */
/* $NetBSD: mb8795.c,v 1.57 2016/12/15 09:28:03 ozaki-r Exp $ */
/*
* Copyright (c) 1998 Darrin B. Jewell
* All rights reserved.
@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mb8795.c,v 1.56 2016/06/10 13:27:12 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: mb8795.c,v 1.57 2016/12/15 09:28:03 ozaki-r Exp $");
#include "opt_inet.h"
@ -320,13 +320,6 @@ mb8795_rint(struct mb8795_softc *sc)
}
#endif
/*
* Pass packet to bpf if there is a listener.
*/
bpf_mtap(ifp, m);
ifp->if_ipackets++;
/* Pass the packet up. */
if_percpuq_enqueue(ifp->if_percpuq, m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_smap.c,v 1.22 2016/12/08 01:12:00 ozaki-r Exp $ */
/* $NetBSD: if_smap.c,v 1.23 2016/12/15 09:28:04 ozaki-r Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_smap.c,v 1.22 2016/12/08 01:12:00 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_smap.c,v 1.23 2016/12/15 09:28:04 ozaki-r Exp $");
#include "debug_playstation2.h"
@ -394,8 +394,6 @@ smap_rxeof(void *arg)
memcpy(mtod(m, void *), (void *)sc->rx_buf, sz);
next_packet:
ifp->if_ipackets++;
_reg_write_1(SMAP_RXFIFO_FRAME_DEC_REG8, 1);
/* free descriptor */
@ -404,11 +402,8 @@ smap_rxeof(void *arg)
d->stat = SMAP_RXDESC_EMPTY;
_wbflush();
if (m != NULL) {
if (ifp->if_bpf)
bpf_mtap(ifp, m);
if (m != NULL)
if_percpuq_enqueue(ifp->if_percpuq, m);
}
}
sc->rx_done_index = i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pq3etsec.c,v 1.28 2016/07/26 01:36:50 nonaka Exp $ */
/* $NetBSD: pq3etsec.c,v 1.29 2016/12/15 09:28:04 ozaki-r Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@ -41,7 +41,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.28 2016/07/26 01:36:50 nonaka Exp $");
__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.29 2016/12/15 09:28:04 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@ -1569,14 +1569,12 @@ pq3etsec_rx_input(
m->m_flags |= M_HASFCS;
m_set_rcvif(m, &sc->sc_if);
ifp->if_ipackets++;
ifp->if_ibytes += m->m_pkthdr.len;
/*
* Let's give it to the network subsystm to deal with.
*/
int s = splnet();
bpf_mtap(ifp, m);
if_input(ifp, m);
splx(s);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_emac.c,v 1.46 2016/12/08 01:12:00 ozaki-r Exp $ */
/* $NetBSD: if_emac.c,v 1.47 2016/12/15 09:28:04 ozaki-r Exp $ */
/*
* Copyright 2001, 2002 Wasabi Systems, Inc.
@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.46 2016/12/08 01:12:00 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.47 2016/12/15 09:28:04 ozaki-r Exp $");
#include "opt_emac.h"
@ -1666,16 +1666,9 @@ emac_rxeob_intr(void *arg)
}
}
ifp->if_ipackets++;
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
/*
* Pass this up to any BPF listeners, but only
* pass it up the stack if it's for us.
*/
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sq.c,v 1.47 2016/12/08 01:12:00 ozaki-r Exp $ */
/* $NetBSD: if_sq.c,v 1.48 2016/12/15 09:28:04 ozaki-r Exp $ */
/*
* Copyright (c) 2001 Rafal K. Boni
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_sq.c,v 1.47 2016/12/08 01:12:00 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_sq.c,v 1.48 2016/12/15 09:28:04 ozaki-r Exp $");
#include <sys/param.h>
@ -1017,12 +1017,9 @@ sq_rxintr(struct sq_softc *sc)
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = framelen;
ifp->if_ipackets++;
SQ_DPRINTF(("%s: sq_rxintr: buf %d len %d\n",
device_xname(sc->sc_dev), i, framelen));
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_mec.c,v 1.54 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_mec.c,v 1.55 2016/12/15 09:28:04 ozaki-r Exp $ */
/*-
* Copyright (c) 2004, 2008 Izumi Tsutsui. All rights reserved.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.54 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.55 2016/12/15 09:28:04 ozaki-r Exp $");
#include "opt_ddb.h"
@ -1731,14 +1731,6 @@ mec_rxintr(struct mec_softc *sc)
if ((ifp->if_csum_flags_rx & (M_CSUM_TCPv4|M_CSUM_UDPv4)) != 0)
mec_rxcsum(sc, m, RXSTAT_CKSUM(rxstat), crc);
ifp->if_ipackets++;
/*
* Pass this up to any BPF listeners, but only
* pass it up the stack if it's for us.
*/
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ec.c,v 1.26 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_ec.c,v 1.27 2016/12/15 09:28:04 ozaki-r Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ec.c,v 1.26 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ec.c,v 1.27 2016/12/15 09:28:04 ozaki-r Exp $");
#include "opt_inet.h"
#include "opt_ns.h"
@ -521,14 +521,6 @@ ec_recv(struct ec_softc *sc, int intbit)
}
if (total_length == 0) {
ifp->if_ipackets++;
/*
* Check if there's a BPF listener on this interface.
* If so, hand off the raw packet to BPF.
*/
bpf_mtap(ifp, m0);
/* Pass the packet up. */
if_percpuq_enqueue(ifp->if_percpuq, m0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ie.c,v 1.60 2016/12/06 07:49:25 ozaki-r Exp $ */
/* $NetBSD: if_ie.c,v 1.61 2016/12/15 09:28:04 ozaki-r Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles M. Hannum.
@ -98,7 +98,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.60 2016/12/06 07:49:25 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.61 2016/12/15 09:28:04 ozaki-r Exp $");
#include "opt_inet.h"
#include "opt_ns.h"
@ -920,14 +920,10 @@ ie_readframe(struct ie_softc *sc, int num)
}
#endif
/* Pass it up. */
bpf_mtap(&sc->sc_if, m);
/*
* Finally pass this packet up to higher layers.
*/
if_percpuq_enqueue((&sc->sc_if)->if_percpuq, m);
sc->sc_if.if_ipackets++;
}
static void

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_veth.c,v 1.7 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: if_veth.c,v 1.8 2016/12/15 09:28:04 ozaki-r Exp $ */
/*-
* Copyright (c) 2011 Jared D. McNeill <jmcneill@invisible.ca>
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_veth.c,v 1.7 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_veth.c,v 1.8 2016/12/15 09:28:04 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -232,9 +232,6 @@ veth_softrx(void *priv)
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
memcpy(mtod(m, void *), sc->sc_rx_buf, len);
++ifp->if_ipackets;
bpf_mtap(ifp, m);
s = splnet();
if_input(ifp, m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_vmx.c,v 1.12 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_vmx.c,v 1.13 2016/12/15 09:28:04 ozaki-r Exp $ */
/* $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $ */
/*
@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.12 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.13 2016/12/15 09:28:04 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@ -1995,8 +1995,6 @@ vmxnet3_rxq_input(struct vmxnet3_rxqueue *rxq,
rxq->vxrxq_stats.vmrxs_ipackets++;
rxq->vxrxq_stats.vmrxs_ibytes += m->m_pkthdr.len;
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_xennet_xenbus.c,v 1.68 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: if_xennet_xenbus.c,v 1.69 2016/12/15 09:28:04 ozaki-r Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@ -85,7 +85,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.68 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.69 2016/12/15 09:28:04 ozaki-r Exp $");
#include "opt_xen.h"
#include "opt_nfs_boot.h"
@ -1099,12 +1099,6 @@ again:
}
/* free req may overwrite *rx, better doing it late */
xennet_rx_free_req(req);
/*
* Pass packet to bpf if there is a listener.
*/
bpf_mtap(ifp, m);
ifp->if_ipackets++;
/* Pass the packet up. */
if_percpuq_enqueue(ifp->if_percpuq, m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: xennetback_xenbus.c,v 1.57 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: xennetback_xenbus.c,v 1.58 2016/12/15 09:28:04 ozaki-r Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.57 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.58 2016/12/15 09:28:04 ozaki-r Exp $");
#include "opt_xen.h"
@ -889,9 +889,7 @@ so always copy for now.
}
}
m_set_rcvif(m, ifp);
ifp->if_ipackets++;
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
}
xen_rmb(); /* be sure to read the request before updating pointer */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ni.c,v 1.43 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: if_ni.c,v 1.44 2016/12/15 09:28:04 ozaki-r Exp $ */
/*
* Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
*
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ni.c,v 1.43 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ni.c,v 1.44 2016/12/15 09:28:04 ozaki-r Exp $");
#include "opt_inet.h"
@ -617,7 +617,6 @@ niintr(void *arg)
if (m == (void *)data->nd_cmdref)
break; /* Out of mbufs */
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_cemac.c,v 1.9 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: if_cemac.c,v 1.10 2016/12/15 09:28:04 ozaki-r Exp $ */
/*
* Copyright (c) 2015 Genetec Corporation. All rights reserved.
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_cemac.c,v 1.9 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_cemac.c,v 1.10 2016/12/15 09:28:04 ozaki-r Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -356,7 +356,6 @@ cemac_intr(void *arg)
break;
}
sc->rxq[bi].m->m_pkthdr.csum_flags = csum;
bpf_mtap(ifp, sc->rxq[bi].m);
DPRINTFN(2,("received %u bytes packet\n", fl));
if_percpuq_enqueue(ifp->if_percpuq,
sc->rxq[bi].m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: aic6915.c,v 1.33 2016/07/07 06:55:41 msaitoh Exp $ */
/* $NetBSD: aic6915.c,v 1.34 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.33 2016/07/07 06:55:41 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.34 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
@ -790,11 +790,6 @@ sf_rxintr(struct sf_softc *sc)
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
/*
* Pass this up to any BPF listeners.
*/
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: cs89x0.c,v 1.37 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: cs89x0.c,v 1.38 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 2004 Christopher Gilbert
@ -212,7 +212,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cs89x0.c,v 1.37 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: cs89x0.c,v 1.38 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
@ -1656,14 +1656,6 @@ cs_ether_input(struct cs_softc *sc, struct mbuf *m)
{
struct ifnet *ifp = &sc->sc_ethercom.ec_if;
ifp->if_ipackets++;
/*
* Check if there's a BPF listener on this interface.
* If so, hand off the raw packet to BPF.
*/
bpf_mtap(ifp, m);
/* Pass the packet up. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: dm9000.c,v 1.10 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: dm9000.c,v 1.11 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 2009 Paul Fleischer
@ -824,9 +824,6 @@ dme_receive(struct dme_softc *sc, struct ifnet *ifp)
} else if (rx_status & DM9000_RSR_LCS) {
ifp->if_collisions++;
} else {
if (ifp->if_bpf)
bpf_mtap(ifp, m);
ifp->if_ipackets++;
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: dp8390.c,v 1.85 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: dp8390.c,v 1.86 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@ -14,7 +14,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dp8390.c,v 1.85 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: dp8390.c,v 1.86 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_ipkdb.h"
#include "opt_inet.h"
@ -939,14 +939,6 @@ dp8390_read(struct dp8390_softc *sc, int buf, u_short len)
return;
}
ifp->if_ipackets++;
/*
* Check if there's a BPF listener on this interface.
* If so, hand off the raw packet to bpf.
*/
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: dp83932.c,v 1.38 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: dp83932.c,v 1.39 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dp83932.c,v 1.38 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: dp83932.c,v 1.39 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
@ -833,15 +833,9 @@ sonic_rxintr(struct sonic_softc *sc)
}
}
ifp->if_ipackets++;
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
/*
* Pass this up to any BPF listeners.
*/
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwc_gmac.c,v 1.36 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: dwc_gmac.c,v 1.37 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.36 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.37 2016/12/15 09:28:05 ozaki-r Exp $");
/* #define DWC_GMAC_DEBUG 1 */
@ -1125,8 +1125,6 @@ dwc_gmac_rx_intr(struct dwc_gmac_softc *sc)
m_set_rcvif(m, ifp);
m->m_flags |= M_HASFCS;
bpf_mtap(ifp, m);
ifp->if_ipackets++;
if_percpuq_enqueue(ifp->if_percpuq, m);
skip:

View File

@ -1,4 +1,4 @@
/* $NetBSD: elink3.c,v 1.139 2016/10/02 14:16:02 christos Exp $ */
/* $NetBSD: elink3.c,v 1.140 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: elink3.c,v 1.139 2016/10/02 14:16:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: elink3.c,v 1.140 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
@ -1486,14 +1486,6 @@ again:
goto abort;
}
++ifp->if_ipackets;
/*
* Check if there's a BPF listener on this interface.
* If so, hand off the raw packet to BPF.
*/
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: elinkxl.c,v 1.119 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: elinkxl.c,v 1.120 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.119 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.120 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1372,7 +1372,6 @@ ex_intr(void *arg)
}
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = total_len;
bpf_mtap(ifp, m);
/*
* Set the incoming checksum information for the packet.
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: gem.c,v 1.106 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: gem.c,v 1.107 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
*
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.106 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.107 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
@ -1805,7 +1805,6 @@ gem_rint(struct gem_softc *sc)
}
progress++;
ifp->if_ipackets++;
if (rxstat & GEM_RD_BAD_CRC) {
ifp->if_ierrors++;
@ -1851,12 +1850,6 @@ gem_rint(struct gem_softc *sc)
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
/*
* Pass this up to any BPF listeners, but only
* pass it up the stack if it's for us.
*/
bpf_mtap(ifp, m);
#ifdef INET
/* hardware checksum */
if (ifp->if_csum_flags_rx & M_CSUM_TCPv4) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: hme.c,v 1.94 2016/10/02 14:16:02 christos Exp $ */
/* $NetBSD: hme.c,v 1.95 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.94 2016/10/02 14:16:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.95 2016/12/15 09:28:05 ozaki-r Exp $");
/* #define HMEDEBUG */
@ -876,14 +876,6 @@ hme_read(struct hme_softc *sc, int ix, uint32_t flags)
return;
}
ifp->if_ipackets++;
/*
* Check if there's a BPF listener on this interface.
* If so, hand off the raw packet to BPF.
*/
bpf_mtap(ifp, m);
/* Pass the packet up. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: i82557.c,v 1.145 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: i82557.c,v 1.146 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.145 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.146 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1451,12 +1451,6 @@ fxp_rxintr(struct fxp_softc *sc)
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
/*
* Pass this up to any BPF listeners, but only
* pass it up the stack if it's for us.
*/
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: i82586.c,v 1.74 2016/07/14 10:19:06 msaitoh Exp $ */
/* $NetBSD: i82586.c,v 1.75 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -137,7 +137,7 @@ Mode of operation:
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.74 2016/07/14 10:19:06 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.75 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
@ -1038,9 +1038,6 @@ ie_readframe(
}
#endif
/* Pass it up. */
bpf_mtap(&sc->sc_ethercom.ec_if, m);
/*
* Finally pass this packet up to higher layers.
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: i82596.c,v 1.34 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: i82596.c,v 1.35 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 2003 Jochen Kunz.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i82596.c,v 1.34 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: i82596.c,v 1.35 2016/12/15 09:28:05 ozaki-r Exp $");
/* autoconfig and device stuff */
#include <sys/param.h>
@ -280,9 +280,7 @@ iee_intr(void *intarg)
device_xname(sc->sc_dev));
bus_dmamap_sync(sc->sc_dmat, rx_map, 0,
rx_map->dm_mapsize, BUS_DMASYNC_PREREAD);
bpf_mtap(ifp, rx_mbuf);
if_percpuq_enqueue(ifp->if_percpuq, rx_mbuf);
ifp->if_ipackets++;
sc->sc_rx_mbuf[sc->sc_rx_done] = new_mbuf;
rbd->rbd_count = 0;
rbd->rbd_size = IEE_RBD_EL | rx_map->dm_segs[0].ds_len;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lan9118.c,v 1.22 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: lan9118.c,v 1.23 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@ -25,7 +25,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.22 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.23 2016/12/15 09:28:05 ozaki-r Exp $");
/*
* The LAN9118 Family
@ -991,16 +991,9 @@ dropit:
roundup(pad + pktlen, sizeof(uint32_t)) >> 2);
m->m_data += pad;
ifp->if_ipackets++;
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = (pktlen - ETHER_CRC_LEN);
/*
* Pass this up to any BPF listeners, but only
* pass if up the stack if it's for us.
*/
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lance.c,v 1.51 2016/10/02 14:16:02 christos Exp $ */
/* $NetBSD: lance.c,v 1.52 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lance.c,v 1.51 2016/10/02 14:16:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: lance.c,v 1.52 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -444,8 +444,6 @@ lance_read(struct lance_softc *sc, int boff, int len)
return;
}
ifp->if_ipackets++;
eh = mtod(m, struct ether_header *);
#ifdef LANCE_REVC_BUG
@ -472,12 +470,6 @@ lance_read(struct lance_softc *sc, int boff, int len)
return;
}
/*
* Check if there's a BPF listener on this interface.
* If so, hand off the raw packet to BPF.
*/
bpf_mtap(ifp, m);
/* Pass the packet up. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lemac.c,v 1.46 2016/12/06 08:21:47 ozaki-r Exp $ */
/* $NetBSD: lemac.c,v 1.47 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1994, 1995, 1997 Matt Thomas <matt@3am-software.com>
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lemac.c,v 1.46 2016/12/06 08:21:47 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: lemac.c,v 1.47 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
@ -305,7 +305,6 @@ lemac_input(
m->m_pkthdr.len = m->m_len = length;
m_set_rcvif(m, &sc->sc_if);
bpf_mtap(&sc->sc_if, m);
if_percpuq_enqueue((&sc->sc_if)->if_percpuq, m);
}
@ -322,7 +321,6 @@ lemac_rne_intr(
unsigned rxpg = LEMAC_INB(sc, LEMAC_REG_RQ);
u_int32_t rxlen;
sc->sc_if.if_ipackets++;
if (LEMAC_USE_PIO_MODE(sc)) {
LEMAC_OUTB(sc, LEMAC_REG_IOP, rxpg);
LEMAC_OUTB(sc, LEMAC_REG_PI1, 0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mb86950.c,v 1.24 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: mb86950.c,v 1.25 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* All Rights Reserved, Copyright (C) Fujitsu Limited 1995
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mb86950.c,v 1.24 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: mb86950.c,v 1.25 2016/12/15 09:28:05 ozaki-r Exp $");
/*
* Device driver for Fujitsu mb86950 based Ethernet cards.
@ -832,16 +832,13 @@ mb86950_rint(struct mb86950_softc *sc, u_int8_t rstat)
mb86950_drain_fifo(sc);
return;
}
/* Successfully received a packet. Update stat. */
ifp->if_ipackets++;
}
}
/*
* Receive packet.
* Retrieve packet from receive buffer and send to the next level up via
* ether_input(). If there is a BPF listener, give a copy to BPF, too.
* ether_input().
* Returns 0 if success, -1 if error (i.e., mbuf allocation failure).
*/
int
@ -902,12 +899,6 @@ mb86950_get_fifo(struct mb86950_softc *sc, u_int len)
/* Get a packet. */
bus_space_read_multi_stream_2(bst, bsh, BMPR_FIFO, mtod(m, u_int16_t *), (len + 1) >> 1);
/*
* Check if there's a BPF listener on this interface. If so, hand off
* the raw packet to bpf.
*/
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mb86960.c,v 1.83 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: mb86960.c,v 1.84 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* All Rights Reserved, Copyright (C) Fujitsu Limited 1995
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mb86960.c,v 1.83 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: mb86960.c,v 1.84 2016/12/15 09:28:05 ozaki-r Exp $");
/*
* Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards.
@ -1064,9 +1064,6 @@ mb86960_rint(struct mb86960_softc *sc, uint8_t rstat)
*/
return;
}
/* Successfully received a packet. Update stat. */
ifp->if_ipackets++;
}
}
@ -1330,12 +1327,6 @@ mb86960_get_packet(struct mb86960_softc *sc, u_int len)
bus_space_read_multi_stream_2(bst, bsh, FE_BMPR8,
mtod(m, uint16_t *), (len + 1) >> 1);
/*
* Check if there's a BPF listener on this interface. If so, hand off
* the raw packet to bpf.
*/
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
return 1;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mtd803.c,v 1.32 2016/10/02 14:16:02 christos Exp $ */
/* $NetBSD: mtd803.c,v 1.33 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
*
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mtd803.c,v 1.32 2016/10/02 14:16:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: mtd803.c,v 1.33 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
@ -677,9 +677,6 @@ mtd_rxirq(struct mtd_softc *sc)
continue;
}
++ifp->if_ipackets;
bpf_mtap(ifp, m);
/* Pass the packet up */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pdq_ifsubr.c,v 1.57 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: pdq_ifsubr.c,v 1.58 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com>
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pdq_ifsubr.c,v 1.57 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: pdq_ifsubr.c,v 1.58 2016/12/15 09:28:05 ozaki-r Exp $");
#ifdef __NetBSD__
#include "opt_inet.h"
@ -220,7 +220,6 @@ pdq_os_receive_pdu(
pdq_softc_t *sc = pdq->pdq_os_ctx;
struct fddi_header *fh;
sc->sc_if.if_ipackets++;
#if defined(PDQ_BUS_DMA)
{
/*
@ -240,8 +239,6 @@ pdq_os_receive_pdu(
}
#endif
m->m_pkthdr.len = pktlen;
if (sc->sc_bpf != NULL)
PDQ_BPF_MTAP(sc, m);
fh = mtod(m, struct fddi_header *);
if (drop || (fh->fddi_fc & (FDDIFC_L|FDDIFC_F)) != FDDIFC_LLC_ASYNC) {
PDQ_OS_DATABUF_FREE(pdq, m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rrunner.c,v 1.82 2016/10/02 14:16:02 christos Exp $ */
/* $NetBSD: rrunner.c,v 1.83 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rrunner.c,v 1.82 2016/10/02 14:16:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: rrunner.c,v 1.83 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
@ -2360,18 +2360,6 @@ esh_read_snap_ring(struct esh_softc *sc, u_int16_t consumer, int error)
if (control & RR_CT_PACKET_END) { /* XXX: RR2_ matches */
m = recv->ec_cur_pkt;
if (!error && !recv->ec_error) {
/*
* We have a complete packet, send it up
* the stack...
*/
ifp->if_ipackets++;
/*
* Check if there's a BPF listener on this
* interface. If so, hand off the raw packet
* to BPF.
*/
bpf_mtap(ifp, m);
if ((ifp->if_flags & IFF_RUNNING) == 0) {
m_freem(m);
} else {

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtl8169.c,v 1.147 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: rtl8169.c,v 1.148 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.147 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.148 2016/12/15 09:28:05 ozaki-r Exp $");
/* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
/*
@ -1293,7 +1293,6 @@ re_rxeof(struct rtk_softc *sc)
m->m_pkthdr.len = m->m_len =
(total_len - ETHER_CRC_LEN);
ifp->if_ipackets++;
m_set_rcvif(m, ifp);
/* Do RX checksumming */
@ -1357,7 +1356,6 @@ re_rxeof(struct rtk_softc *sc)
bswap16(rxvlan & RE_RDESC_VLANCTL_DATA),
continue);
}
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtl81x9.c,v 1.100 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: rtl81x9.c,v 1.101 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 1997, 1998
@ -86,7 +86,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rtl81x9.c,v 1.100 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: rtl81x9.c,v 1.101 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
@ -1073,9 +1073,6 @@ rtk_rxeof(struct rtk_softc *sc)
if (m == NULL)
continue;
ifp->if_ipackets++;
bpf_mtap(ifp, m);
/* pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: seeq8005.c,v 1.56 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: seeq8005.c,v 1.57 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 2000, 2001 Ben Harris
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: seeq8005.c,v 1.56 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: seeq8005.c,v 1.57 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1207,7 +1207,6 @@ ea_rxint(struct seeq8005_softc *sc)
return;
}
ifp->if_ipackets++;
/* Pass data up to upper levels. */
ea_read(sc, addr + 4, len);
@ -1246,12 +1245,6 @@ ea_read(struct seeq8005_softc *sc, int addr, int len)
if (m == NULL)
return;
/*
* Check if there's a BPF listener on this interface.
* If so, hand off the raw packet to bpf.
*/
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: sgec.c,v 1.43 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: sgec.c,v 1.44 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
*
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sgec.c,v 1.43 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: sgec.c,v 1.44 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
@ -452,7 +452,6 @@ sgec_intr(struct ze_softc *sc)
while ((zc->zc_recv[sc->sc_nextrx].ze_framelen &
ZE_FRAMELEN_OW) == 0) {
ifp->if_ipackets++;
m = sc->sc_rxmbuf[sc->sc_nextrx];
len = zc->zc_recv[sc->sc_nextrx].ze_framelen;
ze_add_rxbuf(sc, sc->sc_nextrx);
@ -465,7 +464,6 @@ sgec_intr(struct ze_softc *sc)
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len =
len - ETHER_CRC_LEN;
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: smc83c170.c,v 1.83 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: smc83c170.c,v 1.84 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: smc83c170.c,v 1.83 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: smc83c170.c,v 1.84 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
@ -707,15 +707,8 @@ epic_intr(void *arg)
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
/*
* Pass this up to any BPF listeners, but only
* pass it up the stack if it's for us.
*/
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
ifp->if_ipackets++;
}
/* Update the receive pointer. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: smc90cx6.c,v 1.67 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: smc90cx6.c,v 1.68 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: smc90cx6.c,v 1.67 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: smc90cx6.c,v 1.68 2016/12/15 09:28:05 ozaki-r Exp $");
/* #define BAHSOFTCOPY */
#define BAHRETRANSMIT /**/
@ -596,12 +596,9 @@ bah_srint(void *vsc)
len -= len1;
}
bpf_mtap(ifp, head);
if_percpuq_enqueue((&sc->sc_arccom.ac_if)->if_percpuq, head);
head = NULL;
ifp->if_ipackets++;
cleanup:

View File

@ -1,4 +1,4 @@
/* $NetBSD: smc91cxx.c,v 1.93 2016/07/07 06:55:41 msaitoh Exp $ */
/* $NetBSD: smc91cxx.c,v 1.94 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: smc91cxx.c,v 1.93 2016/07/07 06:55:41 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: smc91cxx.c,v 1.94 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
@ -1219,8 +1219,6 @@ smc91cxx_read(struct smc91cxx_softc *sc)
}
}
ifp->if_ipackets++;
/*
* Make sure to behave as IFF_SIMPLEX in all cases.
* This is to cope with SMC91C92 (Megahertz XJ10BT), which
@ -1239,11 +1237,6 @@ smc91cxx_read(struct smc91cxx_softc *sc)
m->m_pkthdr.len = m->m_len = packetlen;
/*
* Hand the packet off to bpf listeners.
*/
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
out:

View File

@ -1,4 +1,4 @@
/* $NetBSD: tropic.c,v 1.47 2016/07/14 04:00:45 msaitoh Exp $ */
/* $NetBSD: tropic.c,v 1.48 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Ported to NetBSD by Onno van der Linden
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tropic.c,v 1.47 2016/07/14 04:00:45 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: tropic.c,v 1.48 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
@ -1258,9 +1258,7 @@ tr_rint(struct tr_softc *sc)
*/
ASB_OUTB(sc, asb, RECV_RETCODE, 0);
ACA_SETB(sc, ACA_ISRA_o, RESP_IN_ASB);
++ifp->if_ipackets;
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: tulip.c,v 1.188 2016/07/11 11:31:50 msaitoh Exp $ */
/* $NetBSD: tulip.c,v 1.189 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.188 2016/07/11 11:31:50 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.189 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
@ -1356,7 +1356,6 @@ tlp_rxintr(struct tulip_softc *sc)
rxs->rxs_dmamap->dm_mapsize, BUS_DMASYNC_PREREAD);
#endif /* __NO_STRICT_ALIGNMENT */
ifp->if_ipackets++;
eh = mtod(m, struct ether_header *);
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
@ -1381,12 +1380,6 @@ tlp_rxintr(struct tulip_softc *sc)
ETHER_MAX_FRAME(ifp, etype, 0);
}
/*
* Pass this up to any BPF listeners, but only
* pass it up the stack if it's for us.
*/
bpf_mtap(ifp, m);
/*
* We sometimes have to run the 21140 in Hash-Only
* mode. If we're in that mode, and not in promiscuous

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ndis.c,v 1.37 2016/08/15 08:12:32 maxv Exp $ */
/* $NetBSD: if_ndis.c,v 1.38 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 2003
@ -37,7 +37,7 @@
__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.69.2.6 2005/03/31 04:24:36 wpaul Exp $");
#endif
#ifdef __NetBSD__
__KERNEL_RCSID(0, "$NetBSD: if_ndis.c,v 1.37 2016/08/15 08:12:32 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ndis.c,v 1.38 2016/12/15 09:28:05 ozaki-r Exp $");
#endif
@ -1021,7 +1021,6 @@ ndis_rxeof(ndis_handle adapter, ndis_packet **packets, uint32_t pktcnt)
} else
p->np_oob.npo_status = NDIS_STATUS_PENDING;
m_set_rcvif(m0, ifp);
ifp->if_ipackets++;
/* Deal with checksum offload. */
/*
@ -1044,9 +1043,7 @@ ndis_rxeof(ndis_handle adapter, ndis_packet **packets, uint32_t pktcnt)
// CSUM_DATA_VALID|CSUM_PSEUDO_HDR;
m0->m_pkthdr.csum_data = 0xFFFF;
}
}
bpf_mtap(ifp, m0);
}
if_percpuq_enqueue(ifp->if_percpuq, m0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_eg.c,v 1.91 2016/07/11 07:11:08 msaitoh Exp $ */
/* $NetBSD: if_eg.c,v 1.92 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 1993 Dean Huxley <dean@fsa.ca>
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_eg.c,v 1.91 2016/07/11 07:11:08 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_eg.c,v 1.92 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
@ -726,14 +726,6 @@ egread(struct eg_softc *sc, void *buf, int len)
return;
}
ifp->if_ipackets++;
/*
* Check if there's a BPF listener on this interface.
* If so, hand off the raw packet to BPF.
*/
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_el.c,v 1.93 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_el.c,v 1.94 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 1994, Matthew E. Kimmel. Permission is hereby granted
@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_el.c,v 1.93 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_el.c,v 1.94 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
@ -583,14 +583,6 @@ elread(struct el_softc *sc, int len)
return;
}
ifp->if_ipackets++;
/*
* Check if there's a BPF listener on this interface.
* If so, hand off the raw packet to BPF.
*/
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_iy.c,v 1.98 2016/10/02 14:16:02 christos Exp $ */
/* $NetBSD: if_iy.c,v 1.99 2016/12/15 09:28:05 ozaki-r Exp $ */
/* #define IYDEBUG */
/* #define IYMEMDEBUG */
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.98 2016/10/02 14:16:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.99 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
@ -1046,11 +1046,6 @@ iyget(struct iy_softc *sc, bus_space_tag_t iot, bus_space_handle_t ioh,
if (top == NULL)
return;
/* XXX receive the top here */
++ifp->if_ipackets;
bpf_mtap(ifp, top);
if_percpuq_enqueue(ifp->if_percpuq, top);
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_gfe.c,v 1.47 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_gfe.c,v 1.48 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.47 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.48 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
@ -945,9 +945,6 @@ gfe_rx_get(struct gfe_softc *sc, enum gfe_rxprio rxprio)
m->m_len = buflen;
m->m_pkthdr.len = buflen;
ifp->if_ipackets++;
bpf_mtap(ifp, m);
eh = (const struct ether_header *) m->m_data;
if ((ifp->if_flags & IFF_PROMISC) ||
(rxq->rxq_cmdsts & RX_STS_M) == 0 ||

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_mvgbe.c,v 1.46 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_mvgbe.c,v 1.47 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 2007, 2008, 2013 KIYOHARA Takashi
* All rights reserved.
@ -25,7 +25,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.46 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.47 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_multiprocessor.h"
@ -2080,10 +2080,6 @@ mvgbe_rxeof(struct mvgbe_softc *sc)
/* Skip on first 2byte (HW header) */
m_adj(m, MVGBE_HWHEADER_SIZE);
ifp->if_ipackets++;
bpf_mtap(ifp, m);
/* pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_mvxpe.c,v 1.16 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_mvxpe.c,v 1.17 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 2015 Internet Initiative Japan Inc.
* All rights reserved.
@ -25,7 +25,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_mvxpe.c,v 1.16 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_mvxpe.c,v 1.17 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_multiprocessor.h"
@ -2473,8 +2473,6 @@ mvxpe_rx_queue(struct mvxpe_softc *sc, int q, int npkt)
m->m_pkthdr.len = m->m_len = r->bytecnt - ETHER_CRC_LEN;
m_adj(m, MVXPE_HWHEADER_SIZE); /* strip MH */
mvxpe_rx_set_csumflag(ifp, r, m);
ifp->if_ipackets++;
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
chunk = NULL; /* the BM chunk goes to networking stack now */
rx_done:

View File

@ -1,4 +1,4 @@
/* $NetBSD: ofnet.c,v 1.56 2016/10/02 14:16:03 christos Exp $ */
/* $NetBSD: ofnet.c,v 1.57 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ofnet.c,v 1.56 2016/10/02 14:16:03 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: ofnet.c,v 1.57 2016/12/15 09:28:05 ozaki-r Exp $");
#include "ofnet.h"
#include "opt_inet.h"
@ -261,8 +261,6 @@ ofnet_read(struct ofnet_softc *of)
if (head == 0)
continue;
bpf_mtap(ifp, m);
ifp->if_ipackets++;
if_percpuq_enqueue(ifp->if_percpuq, head);
}
splx(s);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_age.c,v 1.49 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_age.c,v 1.50 2016/12/15 09:28:05 ozaki-r Exp $ */
/* $OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $ */
/*-
@ -31,7 +31,7 @@
/* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.49 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.50 2016/12/15 09:28:05 ozaki-r Exp $");
#include "vlan.h"
@ -1504,7 +1504,6 @@ age_rxeof(struct age_softc *sc, struct rx_rdesc *rxrd)
}
#endif
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_alc.c,v 1.22 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_alc.c,v 1.23 2016/12/15 09:28:05 ozaki-r Exp $ */
/* $OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $ */
/*-
* Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org>
@ -2586,8 +2586,6 @@ alc_rxeof(struct alc_softc *sc, struct rx_rdesc *rrd)
}
#endif
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ale.c,v 1.20 2016/02/09 08:32:11 ozaki-r Exp $ */
/* $NetBSD: if_ale.c,v 1.21 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
@ -32,7 +32,7 @@
/* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.20 2016/02/09 08:32:11 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.21 2016/12/15 09:28:05 ozaki-r Exp $");
#include "vlan.h"
@ -1544,9 +1544,6 @@ ale_rxeof(struct ale_softc *sc)
}
#endif
bpf_mtap(ifp, m);
/* Pass it to upper layer. */
if_percpuq_enqueue(ifp->if_percpuq, m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bce.c,v 1.43 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_bce.c,v 1.44 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 2003 Clifford Wright. All rights reserved.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_bce.c,v 1.43 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_bce.c,v 1.44 2016/12/15 09:28:05 ozaki-r Exp $");
#include "vlan.h"
@ -807,13 +807,6 @@ bce_rxintr(struct bce_softc *sc)
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
ifp->if_ipackets++;
/*
* Pass this up to any BPF listeners, but only
* pass it up the stack if it's for us.
*/
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bge.c,v 1.299 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_bge.c,v 1.300 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.299 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.300 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -4546,7 +4546,6 @@ bge_rxeof(struct bge_softc *sc)
}
}
ifp->if_ipackets++;
#ifndef __NO_STRICT_ALIGNMENT
/*
* XXX: if the 5701 PCIX-Rx-DMA workaround is in effect,
@ -4563,11 +4562,6 @@ bge_rxeof(struct bge_softc *sc)
m->m_pkthdr.len = m->m_len = cur_rx->bge_len - ETHER_CRC_LEN;
m_set_rcvif(m, ifp);
/*
* Handle BPF listeners. Let the BPF user see the packet.
*/
bpf_mtap(ifp, m);
bge_rxcsum(sc, cur_rx, m);
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bnx.c,v 1.60 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_bnx.c,v 1.61 2016/12/15 09:28:05 ozaki-r Exp $ */
/* $OpenBSD: if_bnx.c,v 1.85 2009/11/09 14:32:41 dlg Exp $ */
/*-
@ -35,7 +35,7 @@
#if 0
__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $");
#endif
__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.60 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.61 2016/12/15 09:28:05 ozaki-r Exp $");
/*
* The following controllers are supported by this driver:
@ -4638,14 +4638,8 @@ bnx_rx_intr(struct bnx_softc *sc)
continue);
}
/*
* Handle BPF listeners. Let the BPF
* user see the packet.
*/
bpf_mtap(ifp, m);
/* Pass the mbuf off to the upper layers. */
ifp->if_ipackets++;
DBPRINT(sc, BNX_VERBOSE_RECV,
"%s(): Passing received frame up.\n", __func__);
if_percpuq_enqueue(ifp->if_percpuq, m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_cas.c,v 1.25 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_cas.c,v 1.26 2016/12/15 09:28:05 ozaki-r Exp $ */
/* $OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $ */
/*
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.25 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.26 2016/12/15 09:28:05 ozaki-r Exp $");
#ifndef _MODULE
#include "opt_inet.h"
@ -1300,9 +1300,6 @@ cas_rint(struct cas_softc *sc)
* Pass this up to any BPF listeners, but only
* pass it up the stack if its for us.
*/
bpf_mtap(ifp, m);
ifp->if_ipackets++;
m->m_pkthdr.csum_flags = 0;
if_percpuq_enqueue(ifp->if_percpuq, m);
} else
@ -1333,9 +1330,6 @@ cas_rint(struct cas_softc *sc)
* Pass this up to any BPF listeners, but only
* pass it up the stack if its for us.
*/
bpf_mtap(ifp, m);
ifp->if_ipackets++;
m->m_pkthdr.csum_flags = 0;
if_percpuq_enqueue(ifp->if_percpuq, m);
} else

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_de.c,v 1.148 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_de.c,v 1.149 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
@ -37,7 +37,7 @@
* board which support 21040, 21041, or 21140 (mostly).
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_de.c,v 1.148 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_de.c,v 1.149 2016/12/15 09:28:05 ozaki-r Exp $");
#define TULIP_HDR_DATA
@ -3644,8 +3644,6 @@ tulip_rx_intr(
if (sc->tulip_bpf != NULL) {
if (me == ms)
bpf_tap(ifp, mtod(ms, void *), total_len);
else
bpf_mtap(ifp, ms);
}
sc->tulip_flags |= TULIP_RXACT;
if ((sc->tulip_flags & (TULIP_PROMISC|TULIP_HASHONLY))
@ -3704,7 +3702,6 @@ tulip_rx_intr(
#if defined(TULIP_DEBUG)
cnt++;
#endif
ifp->if_ipackets++;
if (++eop == ri->ri_last)
eop = ri->ri_first;
ri->ri_nextin = eop;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_dge.c,v 1.46 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_dge.c,v 1.47 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 2004, SUNET, Swedish University Computer Network.
@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_dge.c,v 1.46 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_dge.c,v 1.47 2016/12/15 09:28:05 ozaki-r Exp $");
@ -1808,11 +1808,6 @@ dge_rxintr(struct dge_softc *sc)
m->m_pkthdr.csum_flags |= M_CSUM_TCP_UDP_BAD;
}
ifp->if_ipackets++;
/* Pass this up to any BPF listeners. */
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_et.c,v 1.13 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_et.c,v 1.14 2016/12/15 09:28:05 ozaki-r Exp $ */
/* $OpenBSD: if_et.c,v 1.11 2008/06/08 06:18:07 jsg Exp $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.13 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.14 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
#include "vlan.h"
@ -1757,9 +1757,6 @@ et_rxeof(struct et_softc *sc)
ETHER_CRC_LEN;
m_set_rcvif(m, ifp);
bpf_mtap(ifp, m);
ifp->if_ipackets++;
if_percpuq_enqueue(ifp->if_percpuq, m);
}
} else {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_jme.c,v 1.30 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_jme.c,v 1.31 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 2008 Manuel Bouyer. All rights reserved.
@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.30 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.31 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
@ -1170,9 +1170,7 @@ jme_intr_rx(jme_softc_t *sc) {
m->m_len =
JME_RX_BYTES(buflen) - (MCLBYTES * (nsegs - 1));
}
ifp->if_ipackets++;
ipackets++;
bpf_mtap(ifp, mhead);
if ((ifp->if_capenable & IFCAP_CSUM_IPv4_Rx) &&
(flags & JME_RD_IPV4)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_kse.c,v 1.30 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_kse.c,v 1.31 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.30 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.31 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
@ -1188,7 +1188,6 @@ rxintr(struct kse_softc *sc)
continue;
}
ifp->if_ipackets++;
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
@ -1199,7 +1198,6 @@ rxintr(struct kse_softc *sc)
if (rxstat & (R0_TCPE | R0_UDPE))
m->m_pkthdr.csum_flags |= M_CSUM_TCP_UDP_BAD;
}
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
#ifdef KSEDIAGNOSTIC
if (kse_monitor_rxintr > 0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_lii.c,v 1.16 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_lii.c,v 1.17 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_lii.c,v 1.16 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_lii.c,v 1.17 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
@ -998,9 +998,6 @@ lii_rxintr(struct lii_softc *sc)
/* Copy the packet withhout the FCS */
m->m_pkthdr.len = m->m_len = size;
memcpy(mtod(m, void *), &rxp->rxp_data[0], size);
++ifp->if_ipackets;
bpf_mtap(ifp, m);
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_msk.c,v 1.53 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_msk.c,v 1.54 2016/12/15 09:28:05 ozaki-r Exp $ */
/* $OpenBSD: if_msk.c,v 1.42 2007/01/17 02:43:02 krw Exp $ */
/*
@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.53 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.54 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1771,10 +1771,6 @@ msk_rxeof(struct sk_if_softc *sc_if, u_int16_t len, u_int32_t rxstat)
m->m_pkthdr.len = m->m_len = total_len;
}
ifp->if_ipackets++;
bpf_mtap(ifp, m);
/* pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_nfe.c,v 1.62 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_nfe.c,v 1.63 2016/12/15 09:28:05 ozaki-r Exp $ */
/* $OpenBSD: if_nfe.c,v 1.77 2008/02/05 16:52:50 brad Exp $ */
/*-
@ -21,7 +21,7 @@
/* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.62 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.63 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
#include "vlan.h"
@ -945,8 +945,6 @@ mbufcopied:
device_xname(sc->sc_dev)));
}
}
bpf_mtap(ifp, m);
ifp->if_ipackets++;
if_percpuq_enqueue(ifp->if_percpuq, m);
skip1:

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_pcn.c,v 1.63 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_pcn.c,v 1.64 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.63 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.64 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1548,12 +1548,8 @@ pcn_rxintr(struct pcn_softc *sc)
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
/* Pass this up to any BPF listeners. */
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
ifp->if_ipackets++;
}
/* Update the receive pointer. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sip.c,v 1.164 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_sip.c,v 1.165 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.164 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.165 2016/12/15 09:28:05 ozaki-r Exp $");
@ -2233,16 +2233,9 @@ gsip_rxintr(struct sip_softc *sc)
}
}
ifp->if_ipackets++;
m_set_rcvif(m, ifp);
m->m_pkthdr.len = len;
/*
* Pass this up to any BPF listeners, but only
* pass if up the stack if it's for us.
*/
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}
@ -2400,16 +2393,9 @@ sip_rxintr(struct sip_softc *sc)
rxs->rxs_dmamap->dm_mapsize, BUS_DMASYNC_PREREAD);
#endif /* __NO_STRICT_ALIGNMENT */
ifp->if_ipackets++;
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
/*
* Pass this up to any BPF listeners, but only
* pass if up the stack if it's for us.
*/
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sk.c,v 1.84 2016/12/14 22:21:13 christos Exp $ */
/* $NetBSD: if_sk.c,v 1.85 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -115,7 +115,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.84 2016/12/14 22:21:13 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.85 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -2116,9 +2116,6 @@ sk_rxeof(struct sk_if_softc *sc_if)
m->m_pkthdr.len = m->m_len = total_len;
}
ifp->if_ipackets++;
bpf_mtap(ifp, m);
/* pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ste.c,v 1.49 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_ste.c,v 1.50 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.49 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.50 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
@ -1049,12 +1049,6 @@ ste_rxintr(struct ste_softc *sc)
m_set_rcvif(m, ifp);
m->m_pkthdr.len = m->m_len = len;
/*
* Pass this up to any BPF listeners, but only
* pass if up the stack if it's for us.
*/
bpf_mtap(ifp, m);
/* Pass it on. */
if_percpuq_enqueue(ifp->if_percpuq, m);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_stge.c,v 1.61 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_stge.c,v 1.62 2016/12/15 09:28:05 ozaki-r Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.61 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.62 2016/12/15 09:28:05 ozaki-r Exp $");
#include <sys/param.h>
@ -1353,7 +1353,6 @@ stge_rxintr(struct stge_softc *sc)
* Pass this up to any BPF listeners, but only
* pass if up the stack if it's for us.
*/
bpf_mtap(ifp, m);
#ifdef STGE_VLAN_UNTAG
/*
* Check for VLAN tagged packets

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ti.c,v 1.100 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $NetBSD: if_ti.c,v 1.101 2016/12/15 09:28:05 ozaki-r Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.100 2016/12/08 01:12:01 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.101 2016/12/15 09:28:05 ozaki-r Exp $");
#include "opt_inet.h"
@ -1968,17 +1968,8 @@ ti_rxeof(struct ti_softc *sc)
}
m->m_pkthdr.len = m->m_len = cur_rx->ti_len;
ifp->if_ipackets++;
m_set_rcvif(m, ifp);
/*
* Handle BPF listeners. Let the BPF user see the packet, but
* don't pass it up to the ether_input() layer unless it's
* a broadcast packet, multicast packet, matches our ethernet
* address or the interface is in promiscuous mode.
*/
bpf_mtap(ifp, m);
eh = mtod(m, struct ether_header *);
switch (ntohs(eh->ether_type)) {
#ifdef INET

Some files were not shown because too many files have changed in this diff Show More