Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Apr 2004 12:28:23 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Luigi Rizzo <rizzo@icir.org>
Cc:        net@freebsd.org
Subject:   Re: what is the story on if_index allocation ?
Message-ID:  <Pine.BSF.4.21.0404191227150.64627-100000@InterJet.elischer.org>
In-Reply-To: <20040419110912.A71274@xorpc.icir.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>From memory,

It's completely un-needed except that some standards want to access 
interfaces by index for statitics purposes.


On Mon, 19 Apr 2004, Luigi Rizzo wrote:

> 
> I am a bit unclear -- how do we allocate if_index values for
> network interfaces ?
> I thought the strategy was allocate them sequentially, and
> only reuse numbers at the top of the allocated range.
> But then i see if_findindex() is quite complicated, and
> seems to look for hints using resource_string_value() and
> resource_find_dev() to possibly recycle old indexes below
> if_index.
> 
> 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[] ?
> Even the current allocation strategy does not guarantee that
> indexes reflect the order of creation of interfaces, if that
> is what we care about.
> 
> 	cheers
> 	luigi
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0404191227150.64627-100000>