From owner-svn-src-head@FreeBSD.ORG Sun Sep 28 19:05:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFE36570; Sun, 28 Sep 2014 19:05:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B321A6B; Sun, 28 Sep 2014 19:05:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SJ5OX7006232; Sun, 28 Sep 2014 19:05:24 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SJ5NPg006227; Sun, 28 Sep 2014 19:05:23 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201409281905.s8SJ5NPg006227@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 28 Sep 2014 19:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272266 - in head/sys/dev: ce cp ctau cx ie X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 19:05:24 -0000 Author: melifaro Date: Sun Sep 28 19:05:22 2014 New Revision: 272266 URL: http://svnweb.freebsd.org/changeset/base/272266 Log: Convert most BPF_TAP users to BPF_MTAP. MFC after: 2 weeks Modified: head/sys/dev/ce/if_ce.c head/sys/dev/cp/if_cp.c head/sys/dev/ctau/if_ct.c head/sys/dev/cx/if_cx.c head/sys/dev/ie/if_ie.c Modified: head/sys/dev/ce/if_ce.c ============================================================================== --- head/sys/dev/ce/if_ce.c Sun Sep 28 18:34:20 2014 (r272265) +++ head/sys/dev/ce/if_ce.c Sun Sep 28 19:05:22 2014 (r272266) @@ -1133,12 +1133,7 @@ static void ce_receive (ce_chan_t *c, un m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ -#if __FreeBSD_version >= 500000 - BPF_TAP (d->ifp, data, len); -#else - if (d->ifp->if_bpf) - bpf_tap (d->ifp, data, len); -#endif + BPF_MTAP(d->ifp, m); IF_ENQUEUE(&d->rqueue, m); #endif } Modified: head/sys/dev/cp/if_cp.c ============================================================================== --- head/sys/dev/cp/if_cp.c Sun Sep 28 18:34:20 2014 (r272265) +++ head/sys/dev/cp/if_cp.c Sun Sep 28 19:05:22 2014 (r272266) @@ -902,7 +902,7 @@ static void cp_receive (cp_chan_t *c, un m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ - BPF_TAP (d->ifp, data, len); + BPF_MTAP(d->ifp, m); IF_ENQUEUE (&d->queue, m); #endif } Modified: head/sys/dev/ctau/if_ct.c ============================================================================== --- head/sys/dev/ctau/if_ct.c Sun Sep 28 18:34:20 2014 (r272265) +++ head/sys/dev/ctau/if_ct.c Sun Sep 28 19:05:22 2014 (r272266) @@ -1120,7 +1120,7 @@ static void ct_receive (ct_chan_t *c, ch m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ - BPF_TAP (d->ifp, data, len); + BPF_MTAP(d->ifp, m); IF_ENQUEUE (&d->queue, m); #endif } Modified: head/sys/dev/cx/if_cx.c ============================================================================== --- head/sys/dev/cx/if_cx.c Sun Sep 28 18:34:20 2014 (r272265) +++ head/sys/dev/cx/if_cx.c Sun Sep 28 19:05:22 2014 (r272266) @@ -1318,7 +1318,7 @@ static void cx_receive (cx_chan_t *c, ch m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ - BPF_TAP (d->ifp, data, len); + BPF_MTAP(d->ifp, m); IF_ENQUEUE (&d->queue, m); #endif } Modified: head/sys/dev/ie/if_ie.c ============================================================================== --- head/sys/dev/ie/if_ie.c Sun Sep 28 18:34:20 2014 (r272265) +++ head/sys/dev/ie/if_ie.c Sun Sep 28 19:05:22 2014 (r272266) @@ -949,6 +949,8 @@ iestart_locked(struct ifnet *ifp) if (!m) break; + BPF_MTAP(ifp, m); + buffer = sc->xmit_cbuffs[sc->xmit_count]; len = 0; @@ -961,13 +963,6 @@ iestart_locked(struct ifnet *ifp) m_freem(m0); len = max(len, ETHER_MIN_LEN); - /* - * See if bpf is listening on this interface, let it see the - * packet before we commit it to the wire. - */ - BPF_TAP(sc->ifp, - (void *)sc->xmit_cbuffs[sc->xmit_count], len); - sc->xmit_buffs[sc->xmit_count]->ie_xmit_flags = IE_XMIT_LAST|len; sc->xmit_buffs[sc->xmit_count]->ie_xmit_next = 0xffff;