Re: if_bridge: unused 'disable' parameter in bridge_stop()

Zhenlei Huang <[email protected]> Sun, 21 Jun 2026 23:14:01 +0800
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]>

> On Jun 20, 2026, at 4:18 PM, Roy Marples <[email protected]> wrote:
> 
> From: Zhenlei Huang <[email protected]>
> To: "Aaron Espinoza"<[email protected]>
> Cc: <[email protected]>
> Date: Sat, 20 Jun 2026 07:41:33 +0100
> Subject: Re: if_bridge: unused 'disable' parameter in bridge_stop()
>> From git history, the parameter was introduced while importing from NetBSD. 
>> 
>> The purpose of that parameter is to match the requirement of NetBSD's ifnet protocol `ifp->if_stop` , 
>> ``` 
>> ifp->if_stop = bridge_stop; 
>> ``` 
>> 
>> That parameter is not even used in NetBSD, see https://github.com/NetBSD/src/blob/trunk/sys/net/if_bridge.c . 
> 
> NetBSD most definitely still uses if_stop
> https://github.com/NetBSD/src/blob/ff256e296a0ab1d32dacadd29b55a40b933b3014/sys/net/if.c#L2827

Oops, I might mislead. Let me try to make it clear.

Yes, if_stop is still used in NetBSD. What I said
> That parameter is not event used
meant `That parameter of bridge_stop() is not event used by bridge(4) in NetBSD`.

> 
> Roy
> 

Best regards,
Zhenlei