Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Mar 2010 08:49:40 +0000
From:      "Robert N. M. Watson" <rwatson@freebsd.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        svn-src-head@freebsd.org, Qing Li <qingli@freebsd.org>, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r205024 - head/sys/net
Message-ID:  <385F840D-4011-443C-8FC9-FAB9FDF211DF@freebsd.org>
In-Reply-To: <4B99FF0A.5080504@elischer.org>
References:  <201003111756.o2BHukJu042449@svn.freebsd.org> <alpine.BSF.2.00.1003112128020.97017@fledge.watson.org> <9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com> <5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org> <9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com> <A543276F-1982-4F12-B325-7277C2B42C92@freebsd.org> <9ace436c1003120011v3c627aadka2e57615ae01fe6f@mail.gmail.com> <8726950E-5110-4FE1-90BB-B4205D637764@freebsd.org> <9ace436c1003120030m39f518basc77c7cff40299008@mail.gmail.com> <DEE37FC3-0843-4121-A001-51AB80FE2B32@freebsd.org> <4B99FE46.6090001@elischer.org> <4B99FF0A.5080504@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mar 12, 2010, at 8:44 AM, Julian Elischer wrote:

>>>>> I'm confused about Julian's proposal because it seems to me that =
we already know when a driver hasn't set or is unable to determine the =
link state: it will (should) be set to LINK_STATE_UNKNOWN by default.
>=20
> the question is whether there is any other meaning for this state.
> For example "I have not started up yet"

Right now LINK_STATE_UNKNOWN conflates three different conditions:

(1) I haven't and won't ever set the link state
(2) I haven't yet, but may in the future set the link state
(3) I wanted to check the link state, and the hardware is $*$**=A3*@@ so =
I left or set this value instead

My preferred solution is to advertise driver capabilities via the driver =
capabilities flag, if_capabilities, and define a new flag =
IFCAP_LINKSTATE (or something similar) that allows a driver to declare =
that it is able to determine link state. If the flag is set, then =
components like ECMP, but also dhclient, can reasonably expect that the =
driver will do its best to provide link state information, addressing =
the difference between (1) and (2) when a value of LINK_STATE_UNKNOWN is =
found.

If we are able to explicitly handle (3) in any of our drivers, then a =
new link state definition should be defined, LINK_STATE_ERROR, which =
should be set by the driver if it declared ICAP_LINKSTATE but was =
unable, due to hardware failure, to check it.

Robert=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?385F840D-4011-443C-8FC9-FAB9FDF211DF>