On Mon, 2005-25-07 at 16:25 -0700, Ben Greear wrote: > jamal wrote: > I'm not suggesting to change current behaviour. I am suggesting that > anyone who depends on ifindex for a primary key without checking the > name is asking for trouble, since ifindex is transient with regard > to device names. >
As it is right now, indeed yes. I am suggesting this could be changed. > pppd has it's own issues, but I don't think ifindex has any particular > bearing on it. The naming does. Name+ifindex is where the uniqueness comes in. Scripts that will break use name only. Most scripts do. Change that and you piss off a lot of script owners. > > Why not easily? It should be pretty trivial to tell user space "the > > ifindex you want is in use"; return -EEXIST > > If you have to deal with finding a free ifindex, how does it help you? > If you are going to use this to find a free index, you are doing the wrong thing. It's something along the lines of: greearb-snmp to kernel "please set ifindex of eth7 to 34" kernel to greearb-snmp "done" or "sorry 34 is taken". We can already do this with names for example. OTOH, if you just ifconfig up the device the first time without giving it a ifindex the kernel would provide it the first free one (as it does today). > Especially when the ifindex for 'eth7' can change any time due to having > the eth7 device leave and re-appear. > But thats what we are discussing to overcome;-> As an example, if eth7 appeared again, greearb-snmp by looking at lspci can validate it is still the same device type, some serial number output etc; it can also determine it was exactly the same card as before even though it now appears on a different bus; if it did that it could still name it eth7 and request for it to have ifindex 34. This helps both the scripters and standard management apps which (using RFC definitions) depend on mapping a netdevice to a ifindex. There are queit a few router vendors for example that have the ability to ensure ifindex persistence. > So, you want to make ifindex non-transient? How do you propose we > guarantee that removable devices (and virtuals such as vlans) get the > same device index when they are removed and re-created? > Refer to above. > The only way I see to do it requires way too much help from user space, > and for virtually no gain in usability, since user-space most often deals > with the names of devices instead of their index anyway. So name devices accordingly then. 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