Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Apr 2004 23:38:18 -0700
From:      Luigi Rizzo <rizzo@icir.org>
To:        Petri Helenius <pete@he.iki.fi>
Cc:        net@freebsd.org
Subject:   Re: what is the story on if_index allocation ?
Message-ID:  <20040420233818.B43347@xorpc.icir.org>
In-Reply-To: <408613F7.1090806@he.iki.fi>; from pete@he.iki.fi on Wed, Apr 21, 2004 at 09:25:59AM %2B0300
References:  <20040419110912.A71274@xorpc.icir.org> <408613F7.1090806@he.iki.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 21, 2004 at 09:25:59AM +0300, Petri Helenius wrote:
> Luigi Rizzo wrote:
> 
> >Can someone explain what is the goal ? Reuse a number if an
> >interface has the same name of a previously existing one and
> >the index is free ? And does it make sense, anyways, or
> >we could just simplify that code and just reuse the first
> >available entry in ifindex_table[] ?
> >  
> >
> The optimal course of action (from management software point of view) is 
> to retain as static ifName to ifIndex mapping. If the index changes for 

I do not think the current code supports this, as any free
index at the top of the array is reused. So if you had 'vlan12' there
and it went away, the next interface that comes in will grab that
index and vlan12 will get a new one. On top of this you can rename
interfaces without changing the index, you can change MAC and IP
addresses, in the already mentioned case of a tunnel server
there is basically no relation between successive creations on
the same interface.

My feeling is that there is not even a sensible way to specify
how one would like to retain the mapping of indexes, let alone
the fact that the specification changes depending on whom you
ask. When this happens, it is a good hint to move the issue
outside the kernel.

cheers
luigi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040420233818.B43347>