Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Mar 2010 10:56:39 -0800
From:      Qing Li <qingli@freebsd.org>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        src-committers@freebsd.org, Juli Mallett <jmallett@freebsd.org>, svn-src-all@freebsd.org, Robert Watson <rwatson@freebsd.org>, Julian Elischer <julian@elischer.org>, svn-src-head@freebsd.org
Subject:   Re: svn commit: r205024 - head/sys/net
Message-ID:  <9ace436c1003121056q1ebc90f6gf9f87c54dd187a20@mail.gmail.com>
In-Reply-To: <20100312151931.GS37184@FreeBSD.org>
References:  <201003111756.o2BHukJu042449@svn.freebsd.org> <alpine.BSF.2.00.1003112128020.97017@fledge.watson.org> <9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com> <eaa228be1003111535s12febe62x91124b0a015fd0ff@mail.gmail.com> <9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com> <eaa228be1003111607s4e78fe73k26a67161642d510d@mail.gmail.com> <4B99EA09.80108@elischer.org> <20100312151931.GS37184@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>
> We've got LINK_STATE_UNKNOWN, we can just initialize if_link_state to
> this value in ether_ifattach(). And Qing should treat this value as
> LINK_STATE_UP in routing decision until better times.
>

Thanks everyone for your input.

I generally try to avoid overloading a variable to have more than 1 meaning.
For example, the if_tun interface is in LINK_STATE_UNKNOWN until
it's opened, then the link can be one of the other two states.
Also, some of the pseudo drivers such as if_tun do not call ether_ifattach().

Right now I like to implement Robert's suggestion of using if_capabilities
field. I'd like to create a new flag, IFCAP_LINKSTATE_NOTIFY flag.
The routing decision will check against the if_link_state if this bit
is set.

Only a handful of drivers have this capability. So updating those drivers
is a small task.

Do we agree on this approach?

-- Qing



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9ace436c1003121056q1ebc90f6gf9f87c54dd187a20>