On Fri, Mar 12, 2010 at 00:11, Qing Li <qin...@freebsd.org> wrote:
> I like Julian's suggestion because it is simple and very low risk.
> And there isn't a need to check for interface type any more.
> Here is why:

For actual link state, you can already see whether a driver is in
UNKNOWN state, like:

%%%
/*
 * Values for if_link_state.
 */
#define LINK_STATE_UNKNOWN      0       /* link invalid/unknown */
#define LINK_STATE_DOWN         1       /* link is down */
#define LINK_STATE_UP           2       /* link is up */
%%%

Therefore you should be able to easily add assertions and debugging
printfs for interfaces that don't event support *setting* link state
-- which is the real problem more than changing link state, since a
driver probably won't report link as down if it has no intention of
changing it.

It doesn't help that there are two things wrt link state floating
around -- one in the form of LINK_STATE (the one that matters here)
and the other in ifmedia stuff.  I think that's confusing this
discussion gratuitously.

Juli.
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to