git: 2a3716432d20 - main - IfAPI: Retire if_etherbpfmtap() and if_bpfmtap()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 25 Aug 2023 16:52:52 UTC
The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=2a3716432d209c5fef1eb1a719f4c1914e7c8b5a commit 2a3716432d209c5fef1eb1a719f4c1914e7c8b5a Author: Justin Hibbits <jhibbits@FreeBSD.org> AuthorDate: 2023-07-21 18:16:25 +0000 Commit: Justin Hibbits <jhibbits@FreeBSD.org> CommitDate: 2023-08-25 16:50:14 +0000 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 --- sys/arm/allwinner/if_awg.c | 2 +- sys/arm64/broadcom/genet/if_genet.c | 2 +- sys/dev/bge/if_bge.c | 2 +- sys/dev/bxe/bxe.c | 4 ++-- sys/dev/dwc/if_dwc.c | 2 +- sys/dev/eqos/if_eqos.c | 2 +- sys/dev/fxp/if_fxp.c | 2 +- sys/dev/nfe/if_nfe.c | 2 +- sys/dev/ntb/if_ntb/if_ntb.c | 2 +- sys/net/if.c | 12 ------------ sys/net/if_var.h | 2 -- 11 files changed, 10 insertions(+), 24 deletions(-) diff --git a/sys/arm/allwinner/if_awg.c b/sys/arm/allwinner/if_awg.c index 566ba329e956..f511dd2309bb 100644 --- a/sys/arm/allwinner/if_awg.c +++ b/sys/arm/allwinner/if_awg.c @@ -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) { diff --git a/sys/arm64/broadcom/genet/if_genet.c b/sys/arm64/broadcom/genet/if_genet.c index 40fc096208c6..0c8730a43913 100644 --- a/sys/arm64/broadcom/genet/if_genet.c +++ b/sys/arm64/broadcom/genet/if_genet.c @@ -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); } } diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 77a4cb90d852..ce4d0856f447 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -5368,7 +5368,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) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 60450d0a6fbb..36b03ee5c135 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -5574,7 +5574,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); @@ -5715,7 +5715,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); } diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index cec3ebfbf4bb..18e86ac025d4 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -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; diff --git a/sys/dev/eqos/if_eqos.c b/sys/dev/eqos/if_eqos.c index d969c019a9a5..692629cc896f 100644 --- a/sys/dev/eqos/if_eqos.c +++ b/sys/dev/eqos/if_eqos.c @@ -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++; } diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 8d695861cffc..d5c977782440 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -1377,7 +1377,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); } /* diff --git a/sys/dev/nfe/if_nfe.c b/sys/dev/nfe/if_nfe.c index aedae79ddf80..901bdd5e1e6e 100644 --- a/sys/dev/nfe/if_nfe.c +++ b/sys/dev/nfe/if_nfe.c @@ -2621,7 +2621,7 @@ nfe_start_locked(if_t ifp) break; } enq++; - if_etherbpfmtap(ifp, m0); + ether_bpf_mtap_if(ifp, m0); } if (enq > 0) { diff --git a/sys/dev/ntb/if_ntb/if_ntb.c b/sys/dev/ntb/if_ntb/if_ntb.c index fb0c601f4222..b3707b8f769c 100644 --- a/sys/dev/ntb/if_ntb/if_ntb.c +++ b/sys/dev/ntb/if_ntb/if_ntb.c @@ -326,7 +326,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); diff --git a/sys/net/if.c b/sys/net/if.c index fd4db49a658d..7a78ebcfea05 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -4909,18 +4909,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) { diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 48a503df7ffe..ba37a98c96fb 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -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);