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

jamal wrote:


Name is not totaly sane either:
I think one of the fscked s/ware i have seen is pppd that tries
to recycle names immediately with the same name but different ifindex.
It should probably use ppp<ifindex> for name.

That would play merry hell with user-space applications that need to know
what the name of the ppp interface is that they just created
programatically.  There are options to give to pppd to specify the 'X'
in the pppX name, by the way.


I dont use pppd anymore these days; however, that may be insufficient
to guarantee uniqueness unless somehow it gets mapped to the ifindex.
Also a lot of scripts assume the nature of reusing names. You will piss
off a gazillion people if you changed the behavior.

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.

pppd has it's own issues, but I don't think ifindex has any particular
bearing on it.

In theory, one should be able from user space to really configure the
ifindex; we dont allow for it even for devices that are virtual.

Might work at creation time, but you can't be certain that someone else
hasn't already used the index, at least not easily,


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?

Especially when the ifindex for 'eth7' can change any time due to having
the eth7 device leave and re-appear.

so I don't see it gaining you very much.


The places (not linux) where it is used it does gain in consistency.
Linux (and a few other OSes, I should add) assume that scanning the bus
for example implies you alloc a netdevice and give it an ifindex.
If we assumed that we only do that after we ifconfig up a device the
first time (and disallow it afterwards), then we could easily have a
user space app defining what the ifindex should be.

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?

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.

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