From: Ben Greear <greearb@candelatech.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 08:24:50 -0700 [thread overview]
Message-ID: <49D235C2.3050208@candelatech.com> (raw)
In-Reply-To: <1238512097.22664.190.camel@ragnarok>
Jeremy Jackson 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?
>
Please use a hash...I'm sure someone will have a use-case with more than
64k interfaces
sometime soon.
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2009-03-31 15:25 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 [this message]
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=49D235C2.3050208@candelatech.com \
--to=greearb@candelatech.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 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).