if_flags usage etc.

M. Warner Losh imp at bsdimp.com
Thu Jan 26 20:10:52 PST 2006


In message: <20060125104901.X70912 at fledge.watson.org>
            Robert Watson <rwatson at freebsd.org> writes:
: 
: On Tue, 24 Jan 2006, John-Mark Gurney wrote:
: 
: > sthaug at nethelp.no wrote this message on Tue, Jan 24, 2006 at 23:15 +0100:
: >>> We should probably better document the interface "interface". if we are
: >>> going to (as Sam suggests)
: >>> do some cleanups we might as well consider what other changes should be
: >>> put in at the same time.
: >>
: >> A couple of other suggestions:
: >>
: >> - For software routers (quagga, zebra etc.) it would be very nice to
: >> have "link up" / "link down" notifications to the routing process(es).
: >
: > already supported, either through kqueue, routing socket, or devd (I 
: > believe)...
: 
: However, I believe some interface drivers don't generate these events. 
: Drivers not supporting a specific event delivered by an interrupt probably 
: need to learn to poll for state changes so that they can generate an event.

Most of the problem is that mii_tick doesn't run when the interface is
not UP.  This means they are blind to interface changes.

Really old drivers, without mii support, do need to poll for link
changes.

Really really old hardware, like ne-2000, can't even poll for link
changes.  You know the link is up/down based on errors or success of
last packet...

Warner


More information about the freebsd-current mailing list