jamal wrote:
On Mon, 2005-25-07 at 16:25 -0700, Ben Greear wrote:

jamal wrote:

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.

You will need to enforce that nothing else gets the index 34 while eth7 is
removed.  How do you do that?  If you try to put that into the kernel, you
have a big nasty mess, and if you try to make user-space do it, any bogus
script can hose your system and potentially screw up your firewall and
worse.

Also, imagine that you remove your pro/100 pcmcia NIC and put in your
tulip.  Both will be, say, eth1 currently, and that is probably what you
want, but they will have different physical characteristics.  Even if you
put them in different cardbus slots, the likelyhood is that you want it
to be called eth1 and treated the same regardless of which NIC you are
using.  If you are matching firewall rules or whatever against a device
index instead of a device name, this will fail because the device indexes
will be different.

And, for purely virtual devices, with no lspci relationship, and no serial
number, how do you match those?


Maybe we could make a small effort to keep the device indexes the same
more often, but still not guarantee it.  That may help snmp related tools
without overly complicating the kernel or user space.

Thanks,
Ben

--
Ben Greear <[EMAIL PROTECTED]>
Candela Technologies Inc  http://www.candelatech.com

-
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

Reply via email to