Manuel Bouyer <bouyer%antioche.eu.org@localhost> writes: > On Thu, Dec 11, 2014 at 03:14:57AM +0000, Roy Marples wrote: >> [...] >> The only elephants left in the room are drivers that don't set IFF_UP before >> LINK_STATE_UPi (hi sk(4)) > > I don't understant this. IFF_UP should not be set by the driver; it's > externally set to ask the driver to start operations. > What's the problem with setting link state independantly from IFF_UP ? > sk(4) is probably not the only driver doing this; if the link state can > be polled independanly from packet reception (I guess all interfaces supporting > wake on lan, or shared with an IPMI management card will, or should, do this) But if the interface is not UP, then the driver should not be enabling the PHY and there should be no way to get positive link status. Still, it seems unnecessary for userland to get upset about link state already being up when bringing an interface up. I guess the point is that assume link state is down because !IFF_UP ifconfig foo0 up assume that tracking up/down notifications leads to understanding the state doesn't really work. Obvious fixes would seem to be poll once after bringing up, and having drivers send a notify of current state immediately on being brought up. Or sending a positive link indication if already up when bring brought up, which seems easy and probably broadly helpful.
Attachment:
pgpfKQDHMeazy.pgp
Description: PGP signature