On Tue, 2005-29-11 at 00:26 +0100, Stefan Rompf wrote: > Am Montag 28 November 2005 23:13 schrieb Thomas Graf:
> > > The effort is nice but why do we need sysfs? Isn't netlink enough for > > you? > > Well, there are already a *lot* of device attributes in sysfs (just ls > -l /sys/class/net/eth0 f.e.), so it seems politically correct to add mine, > too ;-) > bah. Like Thomas i had the same question. I suppose since carrier is already there - it is ok to add it. > > > +#define IFF_CARRIER 0x10000 /* driver signals carrier > > > */ > > > +#define IFF_DORMANT 0x20000 /* driver signals dormant > > > */ > > > > I would favour another name for IFF_CARRIER such as IFF_LOWERLAYER or > > something like that so we can use it to define it to be the status of > > the lower layer in general not just of underlying hardware media. > > OTOH this naming is consistent to the names of the > netif_carrier_*()-functions. > I would agree as well that "carrier" is a misnomer; > > > + IF_OPER_NOTPRESENT, > > > > Why don't we use this to represent the hardware not being present? > > Currently, a netdevice that is not present is removed due to the way the > device model works, so I just omitted the code for it. I can add it though. > lets keep it simple for now. There is already the register/unregister state machine where this would certainly fit in (and the states NETREG_UN/REGISTER* could be substates)- but lets leave it out of that for simplicity sake. Not sure if thats what you meant. > > > Nice idea although I think it's not needed. I disagree with adding a new > > feature flag just to please an RFC which is obviously incomplete in this > > regard. The representation of the staking is needed, no doubt there. And we _already have_ the representation of stacking via dev->iflink; > > The purpose of LOWERLAYERDOWN proposed by the RFC is correct but > > it can easly be extended to include the hardware carrier without violating > > any rules. LOWERLAYERDOWN is a refinement of DOWN so all stacking rules > > will continue to work. > > I must admit that I interpret the RFC differently here. But the question > remains, do we want to differ between LOWERLAYERDOWN and DOWN. Jamal, your > thoughts? > Yes, certainly we do need to present it. But try to use dev->iflink instead; in the case of VLAN/bridge it should point to the ifindex of the netdevice on which you are stacked on last or first etc, probably (or pick one of the netdevices as long as it is not -1). I noticed the VLAN code has some comment on setting it; all others like ipip/sit etc already do a good job. slight digression: There is a small "defect" which has always been there; really nothing to do with our current discussion - and that is poor representation at the moment if you have multi-down/up plexing of netdevices because we conform to older RFCs in this regard. But like i said, thats a different issue and lets talk about it anymore in case we deviate. > Too bad that I had to drop the device specific oper_state() method, it would > have avoided that flag ;-) > If this the main reason you needed it, then it was good to get rid of it ;-> > > > + unsigned char link_mode; /* mapping policy to operstate */ > > > > We can't use flags for this? Do we really need a new field just to > > mark an interface to go dormant? > > I'd ask the other way: Will we need further link modes in the future? Not > sure, but willing to sacrifice a byte for it that would be alignment > otherwise. > > I am indifferent on this. You guys settle it. cheers, jamal - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html