From: Stephen Hemminger <shemminger@vyatta.com>
To: Jeremy Jackson <jerj@coplanar.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: keeping ifindex in 16bits or does it have to be sparse?
Date: Tue, 31 Mar 2009 10:02:31 -0700 [thread overview]
Message-ID: <20090331100231.7e7964eb@nehalam> (raw)
In-Reply-To: <1238512097.22664.190.camel@ragnarok>
On Tue, 31 Mar 2009 11:08:17 -0400
Jeremy Jackson <jerj@coplanar.net> wrote:
> 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?
>
Hash the names as well, since quagga does a lot of lookup by name.
prev parent reply other threads:[~2009-03-31 17:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=20090331100231.7e7964eb@nehalam \
--to=shemminger@vyatta.com \
--cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.