netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Jackson <jerj@coplanar.net>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: keeping ifindex in 16bits or does it have to be sparse?
Date: Tue, 31 Mar 2009 11:08:17 -0400	[thread overview]
Message-ID: <1238512097.22664.190.camel@ragnarok> (raw)

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


             reply	other threads:[~2009-03-31 15:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 15:08 Jeremy Jackson [this message]
2009-03-31 15:24 ` keeping ifindex in 16bits or does it have to be sparse? Ben Greear
2009-03-31 17:02 ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1238512097.22664.190.camel@ragnarok \
    --to=jerj@coplanar.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).