Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jun 2026 16:05:35 -0500
From:      Aaron Espinoza <acesp25@freebsd.org>
To:        freebsd-net@freebsd.org
Subject:   if_bridge: unused 'disable' parameter in bridge_stop()
Message-ID:  <CAM6_VK=Sh8mGO7zHHck=Q5K_ji-NCDc2prgYZXDSNJrqAF2fOw@mail.gmail.com>

index | next in thread | raw e-mail

[-- Attachment #1 --]
Hello,

I was tracing the if_bridge driver on the current main branch and noticed
that the bridge_stop method takes in an 'int disable' parameter that
doesn't seem to be used in the function itself.

Currently, there are two calls to bridge_stop() in the driver:
1. In bridge_clone_destroy() - Line 940
2. In bridge_ioctl() - Line 1073
In both of these calls, the disable parameter is hard-coded to 1.
There doesn't seem to be any case where 0 is used for the parameter.

Since the ifnet structure doesn't require a stop function, I assume this is
purely for the bridge itself.

Is this parameter still relevant/needed in the driver architecture? If not,
I'd be happy to make a small pr to update this.

I'm still finding my footing around the FreeBSD network stack so please let
me know if this parameter has a purpose I overlooked.

Best,
Aaron

[-- Attachment #2 --]
<div dir="ltr"><div>Hello,</div><div><br></div><div>I was tracing the if_bridge driver on the current main branch and noticed that the bridge_stop method takes in an &#39;int disable&#39; parameter that doesn&#39;t seem to be used in the function itself.</div><div><br></div><div>Currently, there are two calls to bridge_stop() in the driver: </div><div>1. In bridge_clone_destroy() - Line 940</div><div>2. In bridge_ioctl() - Line 1073</div><div>In both of these calls, the disable parameter is hard-coded to 1.</div><div>There doesn&#39;t seem to be any case where 0 is used for the parameter.</div><div><br></div><div>Since the ifnet structure doesn&#39;t require a stop function, I assume this is purely for the bridge itself.</div><div><br></div><div>Is this parameter still relevant/needed in the driver architecture? If not, I&#39;d be happy to make a small pr to update this.</div><div><br></div><div>I&#39;m still finding my footing around the FreeBSD network stack so please let me know if this parameter has a purpose I overlooked.</div><div><br></div><div>Best,</div><div>Aaron</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><br></div>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM6_VK=Sh8mGO7zHHck=Q5K_ji-NCDc2prgYZXDSNJrqAF2fOw>