netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* keeping ifindex in 16bits or does it have to be sparse?
@ 2009-03-31 15:08 Jeremy Jackson
  2009-03-31 15:24 ` Ben Greear
  2009-03-31 17:02 ` Stephen Hemminger
  0 siblings, 2 replies; 3+ messages in thread
From: Jeremy Jackson @ 2009-03-31 15:08 UTC (permalink / raw)
  To: netdev@vger.kernel.org

The question came up when profiling Quagga... a performance issue occurs
because it's iterating over a linked list of interface structures... and
this person is using 2000 interfaces for ADSL PPPoE server.  It's an
interesting use case.

There are 2 options to make the interface lookup in quagga scale: array
or hash.  My first thought was array, but it seems that ifindex can get
sparse, that is, the largest ifindex can be much bigger (eg 408589) the
number of max number of interfaces.

So question to netdev, is it possible to reuse ifindex eventually, so it
won't keep growing with interface add/delete, and are there
(unnecessary) large jumps in the allocation sequence?

-- 
Jeremy Jackson
Coplanar Networks
(519)489-4903
http://www.coplanar.net
jerj@coplanar.net


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-31 17:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-31 15:08 keeping ifindex in 16bits or does it have to be sparse? Jeremy Jackson
2009-03-31 15:24 ` Ben Greear
2009-03-31 17:02 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).