Re: git: 135478abe3bc - stable/14 - ifnet: Don't include ethernet.h twice

From: Justin Hibbits <jhibbits_at_FreeBSD.org>
Date: Tue, 02 Sep 2025 15:06:34 UTC
Go for it.  No objections from me.  If if_etherbpfmtap() and
if_bpfmtap() are public APIs, though, we might need to keep them as
stubs, since removing them would break the ABI contract.  Might be
better to MFC 2, and rewrite if_*bpfmtap() as wrappers (aliases) to
those instead.

- Justin

On Tue, 2 Sep 2025 22:52:14 +0800
Zhenlei Huang <zlei@FreeBSD.org> wrote:

> Oops, this breaks LINT-NOIP build. The if_etherbpfmtap() in if.c
> requires ETHER_BPF_MTAP which is defined in ethernet.h .
> 
> Hi Justin,
> 
> I'd like to MFC commit [1] rather than reverting this, since the
> preferred ones bpf_mtap_if() and ether_bpf_mtap_if() have been in
> 14.0 [2].
> 
> Any objection ?
> 
> 1. 2a3716432d20 IfAPI: Retire if_etherbpfmtap() and if_bpfmtap()
> 2. 950cc1f44fbd bpf: Add "_if" tap APIs
> 
> Best regards,
> Zhenlei
> 
> > On Sep 1, 2025, at 9:36 PM, Zhenlei Huang <zlei@FreeBSD.org> wrote:
> > 
> > The branch stable/14 has been updated by zlei:
> > 
> > URL:
> > https://cgit.FreeBSD.org/src/commit/?id=135478abe3bcac1c5195b7e4d75e9f2d6ab40221
> > 
> > commit 135478abe3bcac1c5195b7e4d75e9f2d6ab40221
> > Author:     Zhenlei Huang <zlei@FreeBSD.org>
> > AuthorDate: 2025-08-28 04:29:06 +0000
> > Commit:     Zhenlei Huang <zlei@FreeBSD.org>
> > CommitDate: 2025-09-01 13:29:42 +0000
> > 
> >    ifnet: Don't include ethernet.h twice
> > 
> >    MFC after:      3 days
> > 
> >    (cherry picked from commit
> > 393356f25fb8b76e38b10347f0ad40d4a23372ba) ---
> > sys/net/if.c | 1 -
> > 1 file changed, 1 deletion(-)
> > 
> > diff --git a/sys/net/if.c b/sys/net/if.c
> > index 39854489f5f7..07369c4512cf 100644
> > --- a/sys/net/if.c
> > +++ b/sys/net/if.c
> > @@ -76,7 +76,6 @@
> > #include <vm/uma.h>
> > 
> > #include <net/bpf.h>
> > -#include <net/ethernet.h>
> > #include <net/if.h>
> > #include <net/if_arp.h>
> > #include <net/if_clone.h>  
> 
> 
>