diff --git a/sys/arch/acorn32/podulebus/if_ie.c b/sys/arch/acorn32/podulebus/if_ie.c index 6fa9c48..49b6500 100644 --- a/sys/arch/acorn32/podulebus/if_ie.c +++ b/sys/arch/acorn32/podulebus/if_ie.c @@ -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); } diff --git a/sys/arch/amiga/dev/if_es.c b/sys/arch/amiga/dev/if_es.c index 9775bbf..2e995d0 100644 --- a/sys/arch/amiga/dev/if_es.c +++ b/sys/arch/amiga/dev/if_es.c @@ -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) { diff --git a/sys/arch/amiga/dev/if_qn.c b/sys/arch/amiga/dev/if_qn.c index 429cf9e..2516dbc 100644 --- a/sys/arch/amiga/dev/if_qn.c +++ b/sys/arch/amiga/dev/if_qn.c @@ -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 diff --git a/sys/arch/arm/at91/at91emac.c b/sys/arch/arm/at91/at91emac.c index cc635a7..b4be569 100644 --- a/sys/arch/arm/at91/at91emac.c +++ b/sys/arch/arm/at91/at91emac.c @@ -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) { diff --git a/sys/arch/arm/broadcom/bcm53xx_eth.c b/sys/arch/arm/broadcom/bcm53xx_eth.c index 1f0f3c6..06db299 100644 --- a/sys/arch/arm/broadcom/bcm53xx_eth.c +++ b/sys/arch/arm/broadcom/bcm53xx_eth.c @@ -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 diff --git a/sys/arch/arm/ep93xx/epe.c b/sys/arch/arm/ep93xx/epe.c index f65e486..33b3073 100644 --- a/sys/arch/arm/ep93xx/epe.c +++ b/sys/arch/arm/ep93xx/epe.c @@ -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; diff --git a/sys/arch/arm/gemini/gemini_gmac.c b/sys/arch/arm/gemini/gemini_gmac.c index 795cb28..8fe7721 100644 --- a/sys/arch/arm/gemini/gemini_gmac.c +++ b/sys/arch/arm/gemini/gemini_gmac.c @@ -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: diff --git a/sys/arch/arm/gemini/if_gpn.c b/sys/arch/arm/gemini/if_gpn.c index 6b53b4b..7cdc2f4 100644 --- a/sys/arch/arm/gemini/if_gpn.c +++ b/sys/arch/arm/gemini/if_gpn.c @@ -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)); diff --git a/sys/arch/arm/imx/if_enet.c b/sys/arch/arm/imx/if_enet.c index 0312c46..1421a07 100644 --- a/sys/arch/arm/imx/if_enet.c +++ b/sys/arch/arm/imx/if_enet.c @@ -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); } diff --git a/sys/arch/arm/omap/if_cpsw.c b/sys/arch/arm/omap/if_cpsw.c index e377dd0..a548b28 100644 --- a/sys/arch/arm/omap/if_cpsw.c +++ b/sys/arch/arm/omap/if_cpsw.c @@ -1166,10 +1166,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: diff --git a/sys/arch/arm/omap/omapl1x_emac.c b/sys/arch/arm/omap/omapl1x_emac.c index 4ce6290..769dcc3 100644 --- a/sys/arch/arm/omap/omapl1x_emac.c +++ b/sys/arch/arm/omap/omapl1x_emac.c @@ -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; diff --git a/sys/arch/arm/rockchip/rockchip_emac.c b/sys/arch/arm/rockchip/rockchip_emac.c index 2fae48f..6af2990 100644 --- a/sys/arch/arm/rockchip/rockchip_emac.c +++ b/sys/arch/arm/rockchip/rockchip_emac.c @@ -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: diff --git a/sys/arch/arm/xscale/ixp425_if_npe.c b/sys/arch/arm/xscale/ixp425_if_npe.c index f32348e..f297967 100644 --- a/sys/arch/arm/xscale/ixp425_if_npe.c +++ b/sys/arch/arm/xscale/ixp425_if_npe.c @@ -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: diff --git a/sys/arch/emips/ebus/if_le_ebus.c b/sys/arch/emips/ebus/if_le_ebus.c index 85ede58..ece9cb0 100644 --- a/sys/arch/emips/ebus/if_le_ebus.c +++ b/sys/arch/emips/ebus/if_le_ebus.c @@ -758,15 +758,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); diff --git a/sys/arch/evbppc/virtex/dev/if_temac.c b/sys/arch/evbppc/virtex/dev/if_temac.c index 47b8345..8b4bb2e 100644 --- a/sys/arch/evbppc/virtex/dev/if_temac.c +++ b/sys/arch/evbppc/virtex/dev/if_temac.c @@ -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. */ diff --git a/sys/arch/mac68k/dev/if_mc.c b/sys/arch/mac68k/dev/if_mc.c index 025e71d..0c31095 100644 --- a/sys/arch/mac68k/dev/if_mc.c +++ b/sys/arch/mac68k/dev/if_mc.c @@ -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); } diff --git a/sys/arch/mac68k/nubus/if_netdock_nubus.c b/sys/arch/mac68k/nubus/if_netdock_nubus.c index 58d6cad..89e7be7 100644 --- a/sys/arch/mac68k/nubus/if_netdock_nubus.c +++ b/sys/arch/mac68k/nubus/if_netdock_nubus.c @@ -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); diff --git a/sys/arch/macppc/dev/am79c950.c b/sys/arch/macppc/dev/am79c950.c index ae218ef..01e4764 100644 --- a/sys/arch/macppc/dev/am79c950.c +++ b/sys/arch/macppc/dev/am79c950.c @@ -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); } diff --git a/sys/arch/macppc/dev/if_bm.c b/sys/arch/macppc/dev/if_bm.c index 1c845a1..5ea3acf 100644 --- a/sys/arch/macppc/dev/if_bm.c +++ b/sys/arch/macppc/dev/if_bm.c @@ -498,13 +498,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, diff --git a/sys/arch/macppc/dev/if_gm.c b/sys/arch/macppc/dev/if_gm.c index 95518cc..921708f 100644 --- a/sys/arch/macppc/dev/if_gm.c +++ b/sys/arch/macppc/dev/if_gm.c @@ -377,13 +377,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; diff --git a/sys/arch/mips/adm5120/dev/if_admsw.c b/sys/arch/mips/adm5120/dev/if_admsw.c index 0fac2e6..47359d5 100644 --- a/sys/arch/mips/adm5120/dev/if_admsw.c +++ b/sys/arch/mips/adm5120/dev/if_admsw.c @@ -998,12 +998,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) diff --git a/sys/arch/mips/alchemy/dev/if_aumac.c b/sys/arch/mips/alchemy/dev/if_aumac.c index 8be6234..ca37b51 100644 --- a/sys/arch/mips/alchemy/dev/if_aumac.c +++ b/sys/arch/mips/alchemy/dev/if_aumac.c @@ -715,12 +715,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); diff --git a/sys/arch/mips/atheros/dev/if_ae.c b/sys/arch/mips/atheros/dev/if_ae.c index c55b13b..d58a7ce 100644 --- a/sys/arch/mips/atheros/dev/if_ae.c +++ b/sys/arch/mips/atheros/dev/if_ae.c @@ -1128,16 +1128,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); } diff --git a/sys/arch/mips/cavium/dev/if_cnmac.c b/sys/arch/mips/cavium/dev/if_cnmac.c index 74be2f0..0545ce8 100644 --- a/sys/arch/mips/cavium/dev/if_cnmac.c +++ b/sys/arch/mips/cavium/dev/if_cnmac.c @@ -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) diff --git a/sys/arch/mips/ralink/ralink_eth.c b/sys/arch/mips/ralink/ralink_eth.c index 967ed35..70a14fd 100644 --- a/sys/arch/mips/ralink/ralink_eth.c +++ b/sys/arch/mips/ralink/ralink_eth.c @@ -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); diff --git a/sys/arch/mips/sibyte/dev/sbmac.c b/sys/arch/mips/sibyte/dev/sbmac.c index 35b7093..c89f244 100644 --- a/sys/arch/mips/sibyte/dev/sbmac.c +++ b/sys/arch/mips/sibyte/dev/sbmac.c @@ -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 */ diff --git a/sys/arch/newsmips/apbus/if_sn.c b/sys/arch/newsmips/apbus/if_sn.c index c319ea6..825c2b6 100644 --- a/sys/arch/newsmips/apbus/if_sn.c +++ b/sys/arch/newsmips/apbus/if_sn.c @@ -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; } diff --git a/sys/arch/next68k/dev/mb8795.c b/sys/arch/next68k/dev/mb8795.c index 4262916..f6f0be5 100644 --- a/sys/arch/next68k/dev/mb8795.c +++ b/sys/arch/next68k/dev/mb8795.c @@ -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); diff --git a/sys/arch/playstation2/dev/if_smap.c b/sys/arch/playstation2/dev/if_smap.c index f708454..cdbca64 100644 --- a/sys/arch/playstation2/dev/if_smap.c +++ b/sys/arch/playstation2/dev/if_smap.c @@ -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; diff --git a/sys/arch/powerpc/booke/dev/pq3etsec.c b/sys/arch/powerpc/booke/dev/pq3etsec.c index fead4a7..677949b 100644 --- a/sys/arch/powerpc/booke/dev/pq3etsec.c +++ b/sys/arch/powerpc/booke/dev/pq3etsec.c @@ -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); } diff --git a/sys/arch/powerpc/ibm4xx/dev/if_emac.c b/sys/arch/powerpc/ibm4xx/dev/if_emac.c index d33a1d3..0e97801 100644 --- a/sys/arch/powerpc/ibm4xx/dev/if_emac.c +++ b/sys/arch/powerpc/ibm4xx/dev/if_emac.c @@ -1665,16 +1665,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); } diff --git a/sys/arch/sgimips/hpc/if_sq.c b/sys/arch/sgimips/hpc/if_sq.c index 14afb1b..0ebf84c 100644 --- a/sys/arch/sgimips/hpc/if_sq.c +++ b/sys/arch/sgimips/hpc/if_sq.c @@ -1016,12 +1016,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); } diff --git a/sys/arch/sgimips/mace/if_mec.c b/sys/arch/sgimips/mace/if_mec.c index d35cb72..48623aa 100644 --- a/sys/arch/sgimips/mace/if_mec.c +++ b/sys/arch/sgimips/mace/if_mec.c @@ -1730,14 +1730,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); } diff --git a/sys/arch/sun2/dev/if_ec.c b/sys/arch/sun2/dev/if_ec.c index 9b6b6c2..6a40f27 100644 --- a/sys/arch/sun2/dev/if_ec.c +++ b/sys/arch/sun2/dev/if_ec.c @@ -523,14 +523,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); diff --git a/sys/arch/sun3/dev/if_ie.c b/sys/arch/sun3/dev/if_ie.c index 83aab22..90ea7b6 100644 --- a/sys/arch/sun3/dev/if_ie.c +++ b/sys/arch/sun3/dev/if_ie.c @@ -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 diff --git a/sys/arch/usermode/dev/if_veth.c b/sys/arch/usermode/dev/if_veth.c index a62ec66..cfbe2aa 100644 --- a/sys/arch/usermode/dev/if_veth.c +++ b/sys/arch/usermode/dev/if_veth.c @@ -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); diff --git a/sys/arch/x86/pci/if_vmx.c b/sys/arch/x86/pci/if_vmx.c index b89f9ca..5674dcc 100644 --- a/sys/arch/x86/pci/if_vmx.c +++ b/sys/arch/x86/pci/if_vmx.c @@ -1994,8 +1994,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); } diff --git a/sys/arch/xen/xen/if_xennet_xenbus.c b/sys/arch/xen/xen/if_xennet_xenbus.c index df90241..8372b31 100644 --- a/sys/arch/xen/xen/if_xennet_xenbus.c +++ b/sys/arch/xen/xen/if_xennet_xenbus.c @@ -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); diff --git a/sys/arch/xen/xen/xennetback_xenbus.c b/sys/arch/xen/xen/xennetback_xenbus.c index 2c9baf9..570f74d 100644 --- a/sys/arch/xen/xen/xennetback_xenbus.c +++ b/sys/arch/xen/xen/xennetback_xenbus.c @@ -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 */ diff --git a/sys/dev/bi/if_ni.c b/sys/dev/bi/if_ni.c index fc4295d..5b04bd4 100644 --- a/sys/dev/bi/if_ni.c +++ b/sys/dev/bi/if_ni.c @@ -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; diff --git a/sys/dev/cadence/if_cemac.c b/sys/dev/cadence/if_cemac.c index 0f30243..64190eb 100644 --- a/sys/dev/cadence/if_cemac.c +++ b/sys/dev/cadence/if_cemac.c @@ -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); diff --git a/sys/dev/ic/aic6915.c b/sys/dev/ic/aic6915.c index 942d67d..090f669 100644 --- a/sys/dev/ic/aic6915.c +++ b/sys/dev/ic/aic6915.c @@ -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); } diff --git a/sys/dev/ic/cs89x0.c b/sys/dev/ic/cs89x0.c index 7b46cf2..d393f03 100644 --- a/sys/dev/ic/cs89x0.c +++ b/sys/dev/ic/cs89x0.c @@ -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); } diff --git a/sys/dev/ic/dm9000.c b/sys/dev/ic/dm9000.c index 41c0051..cde2e72 100644 --- a/sys/dev/ic/dm9000.c +++ b/sys/dev/ic/dm9000.c @@ -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); } diff --git a/sys/dev/ic/dp8390.c b/sys/dev/ic/dp8390.c index f7df8a4..d8b0505 100644 --- a/sys/dev/ic/dp8390.c +++ b/sys/dev/ic/dp8390.c @@ -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); } diff --git a/sys/dev/ic/dp83932.c b/sys/dev/ic/dp83932.c index 012a857..a7de717 100644 --- a/sys/dev/ic/dp83932.c +++ b/sys/dev/ic/dp83932.c @@ -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); } diff --git a/sys/dev/ic/dwc_gmac.c b/sys/dev/ic/dwc_gmac.c index ee70f9b..3580930 100644 --- a/sys/dev/ic/dwc_gmac.c +++ b/sys/dev/ic/dwc_gmac.c @@ -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: diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c index f33f727..17a8ff6 100644 --- a/sys/dev/ic/elink3.c +++ b/sys/dev/ic/elink3.c @@ -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); /* diff --git a/sys/dev/ic/elinkxl.c b/sys/dev/ic/elinkxl.c index cd11d11..7ab389b 100644 --- a/sys/dev/ic/elinkxl.c +++ b/sys/dev/ic/elinkxl.c @@ -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. */ diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c index 445f322..4583239 100644 --- a/sys/dev/ic/gem.c +++ b/sys/dev/ic/gem.c @@ -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) { diff --git a/sys/dev/ic/hme.c b/sys/dev/ic/hme.c index be3ee70..7b654f2 100644 --- a/sys/dev/ic/hme.c +++ b/sys/dev/ic/hme.c @@ -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); } diff --git a/sys/dev/ic/i82557.c b/sys/dev/ic/i82557.c index e9751a2..c651e63 100644 --- a/sys/dev/ic/i82557.c +++ b/sys/dev/ic/i82557.c @@ -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); } diff --git a/sys/dev/ic/i82586.c b/sys/dev/ic/i82586.c index 15f64ef..4016b92 100644 --- a/sys/dev/ic/i82586.c +++ b/sys/dev/ic/i82586.c @@ -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. */ diff --git a/sys/dev/ic/i82596.c b/sys/dev/ic/i82596.c index dd648ff..73f0b53 100644 --- a/sys/dev/ic/i82596.c +++ b/sys/dev/ic/i82596.c @@ -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; diff --git a/sys/dev/ic/lan9118.c b/sys/dev/ic/lan9118.c index 3c05796..925c035 100644 --- a/sys/dev/ic/lan9118.c +++ b/sys/dev/ic/lan9118.c @@ -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); } diff --git a/sys/dev/ic/lance.c b/sys/dev/ic/lance.c index 94f826f..a95eb1e 100644 --- a/sys/dev/ic/lance.c +++ b/sys/dev/ic/lance.c @@ -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); } diff --git a/sys/dev/ic/lemac.c b/sys/dev/ic/lemac.c index 999210e..a0a9164 100644 --- a/sys/dev/ic/lemac.c +++ b/sys/dev/ic/lemac.c @@ -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); diff --git a/sys/dev/ic/mb86950.c b/sys/dev/ic/mb86950.c index a4f2a7d..2a71b79 100644 --- a/sys/dev/ic/mb86950.c +++ b/sys/dev/ic/mb86950.c @@ -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); } diff --git a/sys/dev/ic/mb86960.c b/sys/dev/ic/mb86960.c index 700f720..8f7f3d9 100644 --- a/sys/dev/ic/mb86960.c +++ b/sys/dev/ic/mb86960.c @@ -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; } diff --git a/sys/dev/ic/mtd803.c b/sys/dev/ic/mtd803.c index 05fd23e..3cb9875 100644 --- a/sys/dev/ic/mtd803.c +++ b/sys/dev/ic/mtd803.c @@ -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); } diff --git a/sys/dev/ic/pdq_ifsubr.c b/sys/dev/ic/pdq_ifsubr.c index f117850..155a7e4 100644 --- a/sys/dev/ic/pdq_ifsubr.c +++ b/sys/dev/ic/pdq_ifsubr.c @@ -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); diff --git a/sys/dev/ic/rrunner.c b/sys/dev/ic/rrunner.c index 027880b..64f3eaa 100644 --- a/sys/dev/ic/rrunner.c +++ b/sys/dev/ic/rrunner.c @@ -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 { diff --git a/sys/dev/ic/rtl8169.c b/sys/dev/ic/rtl8169.c index cf0cbc0..2fd4972 100644 --- a/sys/dev/ic/rtl8169.c +++ b/sys/dev/ic/rtl8169.c @@ -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); } diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c index 85df78f..82f46ee 100644 --- a/sys/dev/ic/rtl81x9.c +++ b/sys/dev/ic/rtl81x9.c @@ -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); } diff --git a/sys/dev/ic/seeq8005.c b/sys/dev/ic/seeq8005.c index 9cf4b6c..a9d4d3f 100644 --- a/sys/dev/ic/seeq8005.c +++ b/sys/dev/ic/seeq8005.c @@ -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); } diff --git a/sys/dev/ic/sgec.c b/sys/dev/ic/sgec.c index b97fe2b..670ff07 100644 --- a/sys/dev/ic/sgec.c +++ b/sys/dev/ic/sgec.c @@ -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); } } diff --git a/sys/dev/ic/smc83c170.c b/sys/dev/ic/smc83c170.c index 2dec9c3..3aa7a78 100644 --- a/sys/dev/ic/smc83c170.c +++ b/sys/dev/ic/smc83c170.c @@ -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. */ diff --git a/sys/dev/ic/smc90cx6.c b/sys/dev/ic/smc90cx6.c index dfc3b19..aac6dff 100644 --- a/sys/dev/ic/smc90cx6.c +++ b/sys/dev/ic/smc90cx6.c @@ -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: diff --git a/sys/dev/ic/smc91cxx.c b/sys/dev/ic/smc91cxx.c index 01bb2e0..cde743a 100644 --- a/sys/dev/ic/smc91cxx.c +++ b/sys/dev/ic/smc91cxx.c @@ -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: diff --git a/sys/dev/ic/tropic.c b/sys/dev/ic/tropic.c index 6fdf442..1a5186a 100644 --- a/sys/dev/ic/tropic.c +++ b/sys/dev/ic/tropic.c @@ -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); } } diff --git a/sys/dev/ic/tulip.c b/sys/dev/ic/tulip.c index ed3bfab..2be44fd 100644 --- a/sys/dev/ic/tulip.c +++ b/sys/dev/ic/tulip.c @@ -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; @@ -1382,12 +1381,6 @@ tlp_rxintr(struct tulip_softc *sc) } /* - * 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 * mode, and we have a unicast packet that isn't for diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index dc957e9..b57d34a 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -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); } diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c index cb50f6b..78c3e38 100644 --- a/sys/dev/isa/if_eg.c +++ b/sys/dev/isa/if_eg.c @@ -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); } diff --git a/sys/dev/isa/if_el.c b/sys/dev/isa/if_el.c index 4d11b95..80dd9b7 100644 --- a/sys/dev/isa/if_el.c +++ b/sys/dev/isa/if_el.c @@ -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); } diff --git a/sys/dev/isa/if_iy.c b/sys/dev/isa/if_iy.c index 770a9a9..eddc245 100644 --- a/sys/dev/isa/if_iy.c +++ b/sys/dev/isa/if_iy.c @@ -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; diff --git a/sys/dev/marvell/if_gfe.c b/sys/dev/marvell/if_gfe.c index c10eb1e..6972b5d 100644 --- a/sys/dev/marvell/if_gfe.c +++ b/sys/dev/marvell/if_gfe.c @@ -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 || diff --git a/sys/dev/marvell/if_mvgbe.c b/sys/dev/marvell/if_mvgbe.c index 77b45f0..620b73c 100644 --- a/sys/dev/marvell/if_mvgbe.c +++ b/sys/dev/marvell/if_mvgbe.c @@ -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); } diff --git a/sys/dev/marvell/if_mvxpe.c b/sys/dev/marvell/if_mvxpe.c index 5ce019d..9230d63 100644 --- a/sys/dev/marvell/if_mvxpe.c +++ b/sys/dev/marvell/if_mvxpe.c @@ -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: diff --git a/sys/dev/ofw/ofnet.c b/sys/dev/ofw/ofnet.c index 9558f26..bf3d1cd 100644 --- a/sys/dev/ofw/ofnet.c +++ b/sys/dev/ofw/ofnet.c @@ -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); diff --git a/sys/dev/pci/if_age.c b/sys/dev/pci/if_age.c index 5a24574..d26ba1c 100644 --- a/sys/dev/pci/if_age.c +++ b/sys/dev/pci/if_age.c @@ -1503,7 +1503,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); diff --git a/sys/dev/pci/if_alc.c b/sys/dev/pci/if_alc.c index d0be34b..4e97517 100644 --- a/sys/dev/pci/if_alc.c +++ b/sys/dev/pci/if_alc.c @@ -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); } diff --git a/sys/dev/pci/if_ale.c b/sys/dev/pci/if_ale.c index 6ca5ce8..84703cc 100644 --- a/sys/dev/pci/if_ale.c +++ b/sys/dev/pci/if_ale.c @@ -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); diff --git a/sys/dev/pci/if_bce.c b/sys/dev/pci/if_bce.c index 252d768..043b5f1 100644 --- a/sys/dev/pci/if_bce.c +++ b/sys/dev/pci/if_bce.c @@ -806,13 +806,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); diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index d07a5fd..5f6f10e 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -4545,7 +4545,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, @@ -4562,11 +4561,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); /* diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c index a51490c..f8bef00 100644 --- a/sys/dev/pci/if_bnx.c +++ b/sys/dev/pci/if_bnx.c @@ -4637,14 +4637,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); diff --git a/sys/dev/pci/if_cas.c b/sys/dev/pci/if_cas.c index de3b20b..25e53d1 100644 --- a/sys/dev/pci/if_cas.c +++ b/sys/dev/pci/if_cas.c @@ -1299,9 +1299,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 @@ -1332,9 +1329,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 diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c index eb8ef36..e97b4fe 100644 --- a/sys/dev/pci/if_de.c +++ b/sys/dev/pci/if_de.c @@ -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; diff --git a/sys/dev/pci/if_dge.c b/sys/dev/pci/if_dge.c index b39a27b..67b81f5 100644 --- a/sys/dev/pci/if_dge.c +++ b/sys/dev/pci/if_dge.c @@ -1807,11 +1807,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); } diff --git a/sys/dev/pci/if_et.c b/sys/dev/pci/if_et.c index a9ff3e8..85b400e 100644 --- a/sys/dev/pci/if_et.c +++ b/sys/dev/pci/if_et.c @@ -1756,9 +1756,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 { diff --git a/sys/dev/pci/if_jme.c b/sys/dev/pci/if_jme.c index 7ff65a6..d64d9c6 100644 --- a/sys/dev/pci/if_jme.c +++ b/sys/dev/pci/if_jme.c @@ -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)) { diff --git a/sys/dev/pci/if_kse.c b/sys/dev/pci/if_kse.c index 30d2ae2..c0adfc5 100644 --- a/sys/dev/pci/if_kse.c +++ b/sys/dev/pci/if_kse.c @@ -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) { diff --git a/sys/dev/pci/if_lii.c b/sys/dev/pci/if_lii.c index b4e3f76..3c271aa 100644 --- a/sys/dev/pci/if_lii.c +++ b/sys/dev/pci/if_lii.c @@ -997,9 +997,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); } diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c index 309ecea..91a0a72 100644 --- a/sys/dev/pci/if_msk.c +++ b/sys/dev/pci/if_msk.c @@ -1770,10 +1770,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); } diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c index d7c1ca6..a5b24d6 100644 --- a/sys/dev/pci/if_nfe.c +++ b/sys/dev/pci/if_nfe.c @@ -944,8 +944,6 @@ mbufcopied: device_xname(sc->sc_dev))); } } - bpf_mtap(ifp, m); - ifp->if_ipackets++; if_percpuq_enqueue(ifp->if_percpuq, m); skip1: diff --git a/sys/dev/pci/if_pcn.c b/sys/dev/pci/if_pcn.c index 7a8499f..5301e47 100644 --- a/sys/dev/pci/if_pcn.c +++ b/sys/dev/pci/if_pcn.c @@ -1547,12 +1547,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. */ diff --git a/sys/dev/pci/if_sip.c b/sys/dev/pci/if_sip.c index d587ad7..7d2f6d9 100644 --- a/sys/dev/pci/if_sip.c +++ b/sys/dev/pci/if_sip.c @@ -2232,16 +2232,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); } @@ -2399,16 +2392,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); } diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index cc43889..cd57e54 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -2113,9 +2113,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); } diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c index 1159fe6..97e0696 100644 --- a/sys/dev/pci/if_ste.c +++ b/sys/dev/pci/if_ste.c @@ -1048,12 +1048,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); } diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c index 4f5d189..994beed 100644 --- a/sys/dev/pci/if_stge.c +++ b/sys/dev/pci/if_stge.c @@ -1352,7 +1352,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 diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c index 317ed3c..f8cc8b2 100644 --- a/sys/dev/pci/if_ti.c +++ b/sys/dev/pci/if_ti.c @@ -1967,17 +1967,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 diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c index a7d91a0..9269409 100644 --- a/sys/dev/pci/if_tl.c +++ b/sys/dev/pci/if_tl.c @@ -1078,7 +1078,6 @@ tl_intr(void *v) ether_printheader(eh); } #endif - bpf_mtap(ifp, m); if_percpuq_enqueue(ifp->if_percpuq, m); } } diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c index b74c108..3a391a8 100644 --- a/sys/dev/pci/if_txp.c +++ b/sys/dev/pci/if_txp.c @@ -730,11 +730,6 @@ txp_rx_reclaim(struct txp_softc *sc, struct txp_rx_ring *r, } #endif - /* - * Handle BPF listeners. Let the BPF user see the packet. - */ - bpf_mtap(ifp, m); - if (rxd->rx_stat & htole32(RX_STAT_IPCKSUMBAD)) sumflags |= (M_CSUM_IPv4|M_CSUM_IPv4_BAD); else if (rxd->rx_stat & htole32(RX_STAT_IPCKSUMGOOD)) diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c index 206ac68..6ef1854 100644 --- a/sys/dev/pci/if_vge.c +++ b/sys/dev/pci/if_vge.c @@ -1326,7 +1326,6 @@ vge_rxeof(struct vge_softc *sc) #ifndef __NO_STRICT_ALIGNMENT vge_fixup_rx(m); #endif - ifp->if_ipackets++; m_set_rcvif(m, ifp); /* Do RX checksumming if enabled */ @@ -1368,11 +1367,6 @@ vge_rxeof(struct vge_softc *sc) bswap16(rxctl & VGE_RDCTL_VLANID), continue); } - /* - * Handle BPF listeners. - */ - bpf_mtap(ifp, m); - if_percpuq_enqueue(ifp->if_percpuq, m); lim++; diff --git a/sys/dev/pci/if_vioif.c b/sys/dev/pci/if_vioif.c index ed89412..fafe60b 100644 --- a/sys/dev/pci/if_vioif.c +++ b/sys/dev/pci/if_vioif.c @@ -1035,8 +1035,6 @@ vioif_rx_deq_locked(struct vioif_softc *sc) virtio_dequeue_commit(vsc, vq, slot); m_set_rcvif(m, ifp); m->m_len = m->m_pkthdr.len = len; - ifp->if_ipackets++; - bpf_mtap(ifp, m); VIOIF_RX_UNLOCK(sc); if_percpuq_enqueue(ifp->if_percpuq, m); diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 331f28b..bbc9868 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -777,16 +777,8 @@ vr_rxeof(struct vr_softc *sc) ds->ds_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 = total_len; - /* - * 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); /* Pass it on. */ if_percpuq_enqueue(ifp->if_percpuq, m); } diff --git a/sys/dev/pci/if_vte.c b/sys/dev/pci/if_vte.c index f483fba..be2f37f 100644 --- a/sys/dev/pci/if_vte.c +++ b/sys/dev/pci/if_vte.c @@ -1134,8 +1134,6 @@ vte_rxeof(struct vte_softc *sc) */ m->m_pkthdr.len = m->m_len = total_len - ETHER_CRC_LEN; m_set_rcvif(m, ifp); - ifp->if_ipackets++; - bpf_mtap(ifp, m); if_percpuq_enqueue(ifp->if_percpuq, m); } diff --git a/sys/dev/pci/if_wm.c b/sys/dev/pci/if_wm.c index 1fdc9ae..d12e479 100644 --- a/sys/dev/pci/if_wm.c +++ b/sys/dev/pci/if_wm.c @@ -7540,13 +7540,8 @@ wm_rxeof(struct wm_rxqueue *rxq) } } - ifp->if_ipackets++; - mutex_exit(rxq->rxq_lock); - /* Pass this up to any BPF listeners. */ - bpf_mtap(ifp, m); - /* Pass it on. */ if_percpuq_enqueue(sc->sc_ipq, m); diff --git a/sys/dev/pci/if_xge.c b/sys/dev/pci/if_xge.c index 27acb76..38abc05 100644 --- a/sys/dev/pci/if_xge.c +++ b/sys/dev/pci/if_xge.c @@ -805,8 +805,6 @@ xge_intr(void *pv) break; } - ifp->if_ipackets++; - if (RXD_CTL1_PROTOS(val) & (RXD_CTL1_P_IPv4|RXD_CTL1_P_IPv6)) { m->m_pkthdr.csum_flags |= M_CSUM_IPv4; if (RXD_CTL1_L3CSUM(val) != 0xffff) @@ -823,8 +821,6 @@ xge_intr(void *pv) m->m_pkthdr.csum_flags |= M_CSUM_TCP_UDP_BAD; } - bpf_mtap(ifp, m); - if_percpuq_enqueue(ifp->if_percpuq, m); if (++sc->sc_nextrx == NRXREAL) diff --git a/sys/dev/pci/ixgbe/ix_txrx.c b/sys/dev/pci/ixgbe/ix_txrx.c index 1b28d1d..c1302cd 100644 --- a/sys/dev/pci/ixgbe/ix_txrx.c +++ b/sys/dev/pci/ixgbe/ix_txrx.c @@ -1747,8 +1747,6 @@ ixgbe_rx_input(struct rx_ring *rxr, struct ifnet *ifp, struct mbuf *m, u32 ptype IXGBE_RX_UNLOCK(rxr); s = splnet(); - /* Pass this up to any BPF listeners. */ - bpf_mtap(ifp, m); if_input(ifp, m); splx(s); diff --git a/sys/dev/pcmcia/if_cnw.c b/sys/dev/pcmcia/if_cnw.c index 355a2f0..cd2faf76 100644 --- a/sys/dev/pcmcia/if_cnw.c +++ b/sys/dev/pcmcia/if_cnw.c @@ -852,8 +852,6 @@ cnw_recv(struct cnw_softc *sc) } ++ifp->if_ipackets; - bpf_mtap(ifp, m); - /* Pass the packet up. */ if_percpuq_enqueue(ifp->if_percpuq, m); } diff --git a/sys/dev/pcmcia/if_malo_pcmcia.c b/sys/dev/pcmcia/if_malo_pcmcia.c index b0d2b77..353b1b6 100644 --- a/sys/dev/pcmcia/if_malo_pcmcia.c +++ b/sys/dev/pcmcia/if_malo_pcmcia.c @@ -1008,14 +1008,9 @@ cmalo_rx(struct malo_softc *sc) return; } - if (ifp->if_bpf) - bpf_ops->bpf_mtap(ifp->if_bpf, m); - /* push the frame up to the network stack if not in monitor mode */ - if (ic->ic_opmode != IEEE80211_M_MONITOR) { + if (ic->ic_opmode != IEEE80211_M_MONITOR) if_percpuq_enqueue(ifp->if_percpuq, m); - ifp->if_ipackets++; - } } static int diff --git a/sys/dev/pcmcia/if_xi.c b/sys/dev/pcmcia/if_xi.c index d3b177a..33baa6a 100644 --- a/sys/dev/pcmcia/if_xi.c +++ b/sys/dev/pcmcia/if_xi.c @@ -471,10 +471,6 @@ xi_get(struct xi_softc *sc) /* Trim the CRC off the end of the packet. */ m_adj(top, -ETHER_CRC_LEN); - ifp->if_ipackets++; - - bpf_mtap(ifp, top); - if_percpuq_enqueue(ifp->if_percpuq, top); return (recvcount); } diff --git a/sys/dev/qbus/if_de.c b/sys/dev/qbus/if_de.c index 418e8a2..6b7c5ff 100644 --- a/sys/dev/qbus/if_de.c +++ b/sys/dev/qbus/if_de.c @@ -541,7 +541,6 @@ derecv(struct de_softc *sc) dc = sc->sc_dedata; rp = &dc->dc_rrent[sc->sc_rindex]; while ((rp->r_flags & RFLG_OWN) == 0) { - sc->sc_if.if_ipackets++; len = (rp->r_lenerr&RERR_MLEN) - ETHER_CRC_LEN; /* check for errors */ if ((rp->r_flags & (RFLG_ERRS|RFLG_FRAM|RFLG_OFLO|RFLG_CRC)) || @@ -555,7 +554,6 @@ derecv(struct de_softc *sc) sc->sc_if.if_ierrors++; goto next; } - bpf_mtap(ifp, m); if_percpuq_enqueue(ifp->if_percpuq, m); diff --git a/sys/dev/qbus/if_qe.c b/sys/dev/qbus/if_qe.c index 93a18a3..997dcdb 100644 --- a/sys/dev/qbus/if_qe.c +++ b/sys/dev/qbus/if_qe.c @@ -595,7 +595,6 @@ qeintr(void *arg) m->m_pkthdr.len = m->m_len = len; if (++sc->sc_nextrx == RXDESCS) sc->sc_nextrx = 0; - bpf_mtap(ifp, m); if ((status1 & QE_ESETUP) == 0) if_percpuq_enqueue(ifp->if_percpuq, m); else diff --git a/sys/dev/qbus/if_qt.c b/sys/dev/qbus/if_qt.c index 3b9fb1a..6340a25 100644 --- a/sys/dev/qbus/if_qt.c +++ b/sys/dev/qbus/if_qt.c @@ -585,7 +585,6 @@ qtrint(struct qt_softc *sc) sc->is_if.if_ierrors++; goto rnext; } - bpf_mtap(ifp, m); if_percpuq_enqueue(ifp->if_percpuq, m); rnext: --sc->nrcv; diff --git a/sys/dev/sbus/be.c b/sys/dev/sbus/be.c index bd80182..3da7695 100644 --- a/sys/dev/sbus/be.c +++ b/sys/dev/sbus/be.c @@ -566,13 +566,7 @@ be_read(struct be_softc *sc, int idx, int len) ifp->if_ierrors++; 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); } diff --git a/sys/dev/sbus/qe.c b/sys/dev/sbus/qe.c index 270be5b..b09c0709 100644 --- a/sys/dev/sbus/qe.c +++ b/sys/dev/sbus/qe.c @@ -421,13 +421,7 @@ qe_read(struct qe_softc *sc, int idx, int len) ifp->if_ierrors++; 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); } diff --git a/sys/dev/scsipi/if_se.c b/sys/dev/scsipi/if_se.c index 5d3db2e..e454d5d 100644 --- a/sys/dev/scsipi/if_se.c +++ b/sys/dev/scsipi/if_se.c @@ -667,13 +667,6 @@ se_read(struct se_softc *sc, char *data, int datalen) if ((ifp->if_flags & IFF_PROMISC) != 0) { m_adj(m, SE_PREFIX); } - 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_input(ifp, m); diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 290bc1a..4805d20 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -1152,7 +1152,6 @@ aue_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m = c->aue_mbuf; total_len -= ETHER_CRC_LEN + 4; m->m_pkthdr.len = m->m_len = total_len; - ifp->if_ipackets++; m_set_rcvif(m, ifp); @@ -1164,14 +1163,6 @@ aue_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done1; } - /* - * 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); - DPRINTFN(10,("%s: %s: deliver %d\n", device_xname(sc->aue_dev), __func__, m->m_len)); if_percpuq_enqueue(ifp->if_percpuq, m); diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index d05c28d..3c9735b 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -1364,7 +1364,6 @@ axe_rxeof(struct usbd_xfer *xfer, void * priv, usbd_status status) } m->m_data += ETHER_ALIGN; - ifp->if_ipackets++; m_set_rcvif(m, ifp); m->m_pkthdr.len = m->m_len = pktlen; m->m_pkthdr.csum_flags = flags; @@ -1376,8 +1375,6 @@ axe_rxeof(struct usbd_xfer *xfer, void * priv, usbd_status status) s = splnet(); - bpf_mtap(ifp, m); - if_percpuq_enqueue((ifp)->if_percpuq, (m)); splx(s); diff --git a/sys/dev/usb/if_axen.c b/sys/dev/usb/if_axen.c index d6c595c..0b84167 100644 --- a/sys/dev/usb/if_axen.c +++ b/sys/dev/usb/if_axen.c @@ -1077,7 +1077,6 @@ axen_rxeof(struct usbd_xfer *xfer, void * priv, usbd_status status) } /* skip pseudo header (2byte) */ - ifp->if_ipackets++; m_set_rcvif(m, ifp); m->m_pkthdr.len = m->m_len = pkt_len - 6; @@ -1106,7 +1105,6 @@ axen_rxeof(struct usbd_xfer *xfer, void * priv, usbd_status status) /* push the packet up */ s = splnet(); - bpf_mtap(ifp, m); if_percpuq_enqueue((ifp)->if_percpuq, (m)); splx(s); diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c index 3f4dfa8..f0e2bb4 100644 --- a/sys/dev/usb/if_cdce.c +++ b/sys/dev/usb/if_cdce.c @@ -712,7 +712,6 @@ cdce_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done; } - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = total_len; m_set_rcvif(m, ifp); @@ -723,8 +722,6 @@ cdce_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done1; } - bpf_mtap(ifp, m); - if_percpuq_enqueue((ifp)->if_percpuq, (m)); done1: diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index c4c51d9..cad6f6b 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -768,7 +768,6 @@ cue_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done; } - ifp->if_ipackets++; m_adj(m, sizeof(uint16_t)); m->m_pkthdr.len = m->m_len = total_len; @@ -782,14 +781,6 @@ cue_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done1; } - /* - * 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); - DPRINTFN(10,("%s: %s: deliver %d\n", device_xname(sc->cue_dev), __func__, m->m_len)); if_percpuq_enqueue(ifp->if_percpuq, m); diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index c14f38a..12111da 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -706,20 +706,11 @@ kue_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) /* copy data to mbuf */ memcpy(mtod(m, uint8_t *), c->kue_buf + 2, pktlen); - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = pktlen; m_set_rcvif(m, ifp); s = splnet(); - /* - * 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); - DPRINTFN(10,("%s: %s: deliver %d\n", device_xname(sc->kue_dev), __func__, m->m_len)); if_percpuq_enqueue(ifp->if_percpuq, m); diff --git a/sys/dev/usb/if_smsc.c b/sys/dev/usb/if_smsc.c index 3fdfd3a..01f400a 100644 --- a/sys/dev/usb/if_smsc.c +++ b/sys/dev/usb/if_smsc.c @@ -1346,7 +1346,6 @@ smsc_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done; } - ifp->if_ipackets++; m_set_rcvif(m, ifp); m->m_pkthdr.len = m->m_len = pktlen; m->m_flags |= M_HASFCS; @@ -1416,7 +1415,6 @@ smsc_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) /* push the packet up */ s = splnet(); - bpf_mtap(ifp, m); if_percpuq_enqueue(ifp->if_percpuq, m); splx(s); } diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index f34893b..6a51dfe 100644 --- a/sys/dev/usb/if_udav.c +++ b/sys/dev/usb/if_udav.c @@ -1176,7 +1176,6 @@ udav_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done; } - ifp->if_ipackets++; total_len -= ETHER_CRC_LEN; m->m_pkthdr.len = m->m_len = total_len; @@ -1189,8 +1188,6 @@ udav_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done1; } - bpf_mtap(ifp, m); - DPRINTF(("%s: %s: deliver %d\n", device_xname(sc->sc_dev), __func__, m->m_len)); if_percpuq_enqueue((ifp)->if_percpuq, (m)); diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c index c5c8897..af2717a 100644 --- a/sys/dev/usb/if_upl.c +++ b/sys/dev/usb/if_upl.c @@ -516,7 +516,6 @@ upl_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m = c->upl_mbuf; memcpy(mtod(c->upl_mbuf, char *), c->upl_buf, total_len); - ifp->if_ipackets++; m->m_pkthdr.len = m->m_len = total_len; m_set_rcvif(m, ifp); @@ -529,14 +528,6 @@ upl_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done1; } - /* - * 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); - DPRINTFN(10,("%s: %s: deliver %d\n", device_xname(sc->sc_dev), __func__, m->m_len)); diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c index 9736db4..9265b35 100644 --- a/sys/dev/usb/if_url.c +++ b/sys/dev/usb/if_url.c @@ -1035,7 +1035,6 @@ url_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done; } - ifp->if_ipackets++; total_len -= ETHER_CRC_LEN; m = c->url_mbuf; @@ -1049,8 +1048,6 @@ url_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) goto done1; } - bpf_mtap(ifp, m); - DPRINTF(("%s: %s: deliver %d\n", device_xname(sc->sc_dev), __func__, m->m_len)); if_percpuq_enqueue((ifp)->if_percpuq, (m)); diff --git a/sys/dev/usb/if_urndis.c b/sys/dev/usb/if_urndis.c index 052a29a..fd0c9d0 100644 --- a/sys/dev/usb/if_urndis.c +++ b/sys/dev/usb/if_urndis.c @@ -868,7 +868,6 @@ urndis_decap(struct urndis_softc *sc, struct urndis_chain *c, uint32_t len) le32toh(msg->rm_datalen)); m->m_pkthdr.len = m->m_len = le32toh(msg->rm_datalen); - ifp->if_ipackets++; m_set_rcvif(m, ifp); s = splnet(); @@ -876,9 +875,6 @@ urndis_decap(struct urndis_softc *sc, struct urndis_chain *c, uint32_t len) if (urndis_newbuf(sc, c) == ENOBUFS) { ifp->if_ierrors++; } else { - - bpf_mtap(ifp, m); - if_percpuq_enqueue(ifp->if_percpuq, m); } splx(s); diff --git a/sys/net/agr/if_agr.c b/sys/net/agr/if_agr.c index 0065619..e57a46d 100644 --- a/sys/net/agr/if_agr.c +++ b/sys/net/agr/if_agr.c @@ -161,7 +161,6 @@ agr_input(struct ifnet *ifp_port, struct mbuf *m) return; } - ifp->if_ipackets++; m_set_rcvif(m, ifp); #define DNH_DEBUG @@ -185,7 +184,6 @@ agr_input(struct ifnet *ifp_port, struct mbuf *m) } #endif - bpf_mtap(ifp, m); if_percpuq_enqueue(ifp->if_percpuq, m); } diff --git a/sys/net/if.c b/sys/net/if.c index 3282459..56c82a2 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -141,6 +141,7 @@ __KERNEL_RCSID(0, "$NetBSD: if.c,v 1.363 2016/12/06 01:23:01 ozaki-r Exp $"); #ifndef IPSEC #include #endif +#include #ifdef INET6 #include @@ -765,8 +766,18 @@ if_percpuq_softint(void *arg) struct ifnet *ifp = ipq->ipq_ifp; struct mbuf *m; - while ((m = if_percpuq_dequeue(ipq)) != NULL) + while ((m = if_percpuq_dequeue(ipq)) != NULL) { + ifp->if_ipackets++; +#ifndef NET_MPSAFE + KERNEL_LOCK(1, NULL); +#endif + bpf_mtap(ifp, m); +#ifndef NET_MPSAFE + KERNEL_UNLOCK_ONE(NULL); +#endif + ifp->_if_input(ifp, m); + } } static void @@ -966,6 +977,15 @@ if_input(struct ifnet *ifp, struct mbuf *m) KASSERT(ifp->if_percpuq == NULL); KASSERT(!cpu_intr_p()); + ifp->if_ipackets++; +#ifndef NET_MPSAFE + KERNEL_LOCK(1, NULL); +#endif + bpf_mtap(ifp, m); +#ifndef NET_MPSAFE + KERNEL_UNLOCK_ONE(NULL); +#endif + ifp->_if_input(ifp, m); } diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c index bc78559..2cfe9ee 100644 --- a/sys/net/if_tap.c +++ b/sys/net/if_tap.c @@ -1086,10 +1086,8 @@ tap_dev_write(int unit, struct uio *uio, int flags) return (error); } - ifp->if_ipackets++; m_set_rcvif(m, ifp); - bpf_mtap(ifp, m); s = splnet(); if_input(ifp, m); splx(s); diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 35c39a6..3e89c5e 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -937,8 +937,6 @@ vlan_input(struct ifnet *ifp, struct mbuf *m) m_set_rcvif(m, &ifv->ifv_if); ifv->ifv_if.if_ipackets++; - bpf_mtap(&ifv->ifv_if, m); - m->m_flags &= ~M_PROMISC; if_input(&ifv->ifv_if, m); } diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 45b675f..e3f53f7 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -784,11 +784,6 @@ ieee80211_deliver_data(struct ieee80211com *ic, } } if (m != NULL) { - /* - * XXX If we forward packet into transmitter of the AP, - * we don't need to duplicate for DLT_EN10MB. - */ - bpf_mtap(ifp, m); if (ni->ni_vlan != 0) { /* attach vlan tag */ diff --git a/sys/netinet/ip_etherip.c b/sys/netinet/ip_etherip.c index 0d8180b..92bfc59 100644 --- a/sys/netinet/ip_etherip.c +++ b/sys/netinet/ip_etherip.c @@ -254,10 +254,6 @@ ip_etherip_input(struct mbuf *m, ...) m_set_rcvif(m, ifp); m->m_flags &= ~(M_BCAST|M_MCAST); - bpf_mtap(ifp, m); - - ifp->if_ipackets++; - s = splnet(); if_input(ifp, m); splx(s); diff --git a/sys/netinet6/ip6_etherip.c b/sys/netinet6/ip6_etherip.c index 4972b21..abf26ce 100644 --- a/sys/netinet6/ip6_etherip.c +++ b/sys/netinet6/ip6_etherip.c @@ -259,10 +259,6 @@ ip6_etherip_input(struct mbuf **mp, int *offp, int proto) m_set_rcvif(m, ifp); m->m_flags &= ~(M_BCAST|M_MCAST); - bpf_mtap(ifp, m); - - ifp->if_ipackets++; - s = splnet(); if_input(ifp, m); splx(s); diff --git a/sys/netisdn/i4b_isppp.c b/sys/netisdn/i4b_isppp.c index 91d39bf..8b02c5a 100644 --- a/sys/netisdn/i4b_isppp.c +++ b/sys/netisdn/i4b_isppp.c @@ -678,8 +678,6 @@ i4bisppp_rx_data_rdy(void *softc) m_set_rcvif(m, &sc->sc_sp.pp_if); m->m_pkthdr.len = m->m_len; - sc->sc_sp.pp_if.if_ipackets++; - #if I4BISPPPACCT sc->sc_inb += m->m_pkthdr.len; #endif @@ -688,19 +686,6 @@ i4bisppp_rx_data_rdy(void *softc) printf("i4bisppp_rx_data_ready: received packet!\n"); #endif -#if NBPFILTER > 0 || NBPF > 0 - -#ifdef __FreeBSD__ - if(sc->sc_sp.pp_if.if_bpf) - bpf_mtap(&sc->sc_sp.pp_if, m); -#endif /* __FreeBSD__ */ - -#ifdef __NetBSD__ - bpf_mtap(&sc->sc_sp.pp_if, m); -#endif - -#endif /* NBPFILTER > 0 || NBPF > 0 */ - if_percpuq_enqueue(sc->sc_sp.pp_if.if_percpuq, m); } diff --git a/sys/rump/net/lib/libshmif/if_shmem.c b/sys/rump/net/lib/libshmif/if_shmem.c index a761f66..8278352 100644 --- a/sys/rump/net/lib/libshmif/if_shmem.c +++ b/sys/rump/net/lib/libshmif/if_shmem.c @@ -765,11 +765,9 @@ shmif_rcv(void *arg) if (passup) { int bound; - ifp->if_ipackets++; KERNEL_LOCK(1, NULL); /* Prevent LWP migrations between CPUs for psref(9) */ bound = curlwp_bind(); - bpf_mtap(ifp, m); if_input(ifp, m); curlwp_bindx(bound); KERNEL_UNLOCK_ONE(NULL); diff --git a/sys/rump/net/lib/libvirtif/if_virt.c b/sys/rump/net/lib/libvirtif/if_virt.c index 14ae276..943ec2c 100644 --- a/sys/rump/net/lib/libvirtif/if_virt.c +++ b/sys/rump/net/lib/libvirtif/if_virt.c @@ -375,12 +375,10 @@ VIF_DELIVERPKT(struct virtif_sc *sc, struct iovec *iov, size_t iovlen) if (passup) { int bound; - ifp->if_ipackets++; m_set_rcvif(m, ifp); KERNEL_LOCK(1, NULL); /* Prevent LWP migrations between CPUs for psref(9) */ bound = curlwp_bind(); - bpf_mtap(ifp, m); if_input(ifp, m); curlwp_bindx(bound); KERNEL_UNLOCK_LAST(NULL);