| To: | Mitchell Blank Jr <mitch@xxxxxxxxxx> |
|---|---|
| Subject: | Re: 802.1q Was (Re: Plans for 2.5 / 2.6 ??? |
| From: | "Benjamin C.R. LaHaise" <blah@xxxxxxxxx> |
| Date: | Mon, 5 Jun 2000 14:27:36 -0400 (EDT) |
| Cc: | Ben Greear <greearb@xxxxxxxxxxxxxxx>, jamal <hadi@xxxxxxxxxx>, rob@xxxxxxxxxxx, buytenh@xxxxxxx, netdev@xxxxxxxxxxx, gleb@xxxxxxxxxxxxxxxxxxxxx |
| In-reply-to: | <20000605110034.G77216@sfgoth.com> |
| Sender: | owner-netdev@xxxxxxxxxxx |
On Mon, 5 Jun 2000, Mitchell Blank Jr wrote:
> Ben Greear wrote:
> > Seems a hashtable would be nice for the ifindex....
>
> The problemn with using a hashtable: how big should it be? After all
> you want it small enough that there isn't much memory waste if you
> have 3 devices, yet we can efficiently do a lookup on 10000 devices.
> That's why I'm thinking a B+ tree or something would be more
> appropriate.
Before going that far, why not just take advantage of the fact that
network devices have a structure to their name: class<number>? Since the
numbers are typically contiguous starting at zero, just have an array
pointing to the device structs hanging off of the class name. That way
memory can be saved on device names too.
-ben
|
| Previous by Date: | Re: 802.1q Was (Re: Plans for 2.5 / 2.6 ???, Mitchell Blank Jr |
|---|---|
| Next by Date: | Re: 802.1q Was (Re: Plans for 2.5 / 2.6 ???, Ben Greear |
| Previous by Thread: | Re: 802.1q Was (Re: Plans for 2.5 / 2.6 ???, Mitchell Blank Jr |
| Next by Thread: | Re: 802.1q Was (Re: Plans for 2.5 / 2.6 ???, Ben Greear |
| Indexes: | [Date] [Thread] [Top] [All Lists] |