mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 19:34:43 +01:00
IfAPI: Retire if_etherbpfmtap() and if_bpfmtap()
Summary:
These came in the original DrvAPI commits in 2014, and are obsoleted by
bpf_mtap_if() and ether_bpf_mtap_if(). The `_if` suffix, rather than
prefix, conveys that it's operating on the bpf of the interface, instead
than the interface itself.
Reviewed by: glebius
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D41146
(cherry picked from commit 2a3716432d)
This commit is contained in:
1 parent
d10640804e
commit
bceb9c2f2b
11 files changed
+10
-24
No files matched your search
@@ -984,7 +984,7 @@ awg_start_locked(struct awg_softc *sc)
|
||||
if_sendq_prepend(ifp, m);
|
||||
break;
|
||||
}
|
||||
if_bpfmtap(ifp, m);
|
||||
bpf_mtap_if(ifp, m);
|
||||
}
|
||||
|
||||
if (cnt != 0) {
|
||||
|
||||
@@ -1036,7 +1036,7 @@ gen_start_locked(struct gen_softc *sc)
|
||||
if_sendq_prepend(ifp, m);
|
||||
break;
|
||||
}
|
||||
if_bpfmtap(ifp, m);
|
||||
bpf_mtap_if(ifp, m);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5355,7 +5355,7 @@ bge_start_locked(if_t ifp)
|
||||
* If there's a BPF listener, bounce a copy of this frame
|
||||
* to him.
|
||||
*/
|
||||
if_bpfmtap(ifp, m_head);
|
||||
bpf_mtap_if(ifp, m_head);
|
||||
}
|
||||
|
||||
if (count > 0)
|
||||
|
||||
+2
-2
@@ -5565,7 +5565,7 @@ bxe_tx_start_locked(struct bxe_softc *sc,
|
||||
tx_count++;
|
||||
|
||||
/* send a copy of the frame to any BPF listeners. */
|
||||
if_etherbpfmtap(ifp, m);
|
||||
ether_bpf_mtap_if(ifp, m);
|
||||
|
||||
tx_bd_avail = bxe_tx_avail(sc, fp);
|
||||
|
||||
@@ -5706,7 +5706,7 @@ bxe_tx_mq_start_locked(struct bxe_softc *sc,
|
||||
tx_count++;
|
||||
|
||||
/* send a copy of the frame to any BPF listeners */
|
||||
if_etherbpfmtap(ifp, next);
|
||||
ether_bpf_mtap_if(ifp, next);
|
||||
|
||||
drbr_advance(ifp, tx_br);
|
||||
}
|
||||
|
||||
@@ -1132,7 +1132,7 @@ dwc_txstart_locked(struct dwc_softc *sc)
|
||||
if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0);
|
||||
break;
|
||||
}
|
||||
if_bpfmtap(ifp, m);
|
||||
bpf_mtap_if(ifp, m);
|
||||
sc->tx_map_head = next_txidx(sc, sc->tx_map_head);
|
||||
sc->tx_mapcount++;
|
||||
++enqueued;
|
||||
|
||||
@@ -597,7 +597,7 @@ eqos_start_locked(if_t ifp)
|
||||
if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0);
|
||||
break;
|
||||
}
|
||||
if_bpfmtap(ifp, m);
|
||||
bpf_mtap_if(ifp, m);
|
||||
pending++;
|
||||
}
|
||||
|
||||
|
||||
@@ -1358,7 +1358,7 @@ fxp_start_body(if_t ifp)
|
||||
/*
|
||||
* Pass packet to bpf if there is a listener.
|
||||
*/
|
||||
if_bpfmtap(ifp, mb_head);
|
||||
bpf_mtap_if(ifp, mb_head);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -2616,7 +2616,7 @@ nfe_start_locked(if_t ifp)
|
||||
break;
|
||||
}
|
||||
enq++;
|
||||
if_etherbpfmtap(ifp, m0);
|
||||
ether_bpf_mtap_if(ifp, m0);
|
||||
}
|
||||
|
||||
if (enq > 0) {
|
||||
|
||||
@@ -322,7 +322,7 @@ ntb_transmit_locked(struct ntb_net_queue *q)
|
||||
CTR0(KTR_NTB, "TX: ntb_transmit_locked");
|
||||
while ((m = drbr_peek(ifp, q->br)) != NULL) {
|
||||
CTR1(KTR_NTB, "TX: start mbuf %p", m);
|
||||
if_etherbpfmtap(ifp, m);
|
||||
ether_bpf_mtap_if(ifp, m);
|
||||
len = m->m_pkthdr.len;
|
||||
mflags = m->m_flags;
|
||||
rc = ntb_transport_tx_enqueue(q->qp, m, m, len);
|
||||
|
||||
@@ -4866,18 +4866,6 @@ if_gethandle(u_char type)
|
||||
return (if_alloc(type));
|
||||
}
|
||||
|
||||
void
|
||||
if_bpfmtap(if_t ifp, struct mbuf *m)
|
||||
{
|
||||
BPF_MTAP(ifp, m);
|
||||
}
|
||||
|
||||
void
|
||||
if_etherbpfmtap(if_t ifp, struct mbuf *m)
|
||||
{
|
||||
ETHER_BPF_MTAP(ifp, m);
|
||||
}
|
||||
|
||||
void
|
||||
if_vlancap(if_t ifp)
|
||||
{
|
||||
|
||||
@@ -629,8 +629,6 @@ int if_vlantrunkinuse(if_t ifp);
|
||||
caddr_t if_getlladdr(const if_t ifp);
|
||||
struct vnet *if_getvnet(const if_t ifp);
|
||||
void *if_gethandle(u_char);
|
||||
void if_bpfmtap(if_t ifp, struct mbuf *m);
|
||||
void if_etherbpfmtap(if_t ifp, struct mbuf *m);
|
||||
void if_vlancap(if_t ifp);
|
||||
int if_transmit(if_t ifp, struct mbuf *m);
|
||||
void if_init(if_t ifp, void *ctx);
|
||||
|
||||
Reference in new issue
Block a user