[Top] [All Lists]

Re: 802.1q Was (Re: Plans for 2.5 / 2.6 ???

To: Mitchell Blank Jr <mitch@xxxxxxxxxx>
Subject: Re: 802.1q Was (Re: Plans for 2.5 / 2.6 ???
From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Date: Mon, 05 Jun 2000 08:33:15 -0700
Cc: jamal <hadi@xxxxxxxxxx>, rob@xxxxxxxxxxx, buytenh@xxxxxxx, netdev@xxxxxxxxxxx, gleb@xxxxxxxxxxxxxxxxxxxxx
Organization: Candela Technologies
References: <20000603091818.B48132@xxxxxxxxxx> <Pine.GSO.4.20.0006040924390.16882-100000@xxxxxxxxxxxxxxxx> <20000604214856.B77216@xxxxxxxxxx> <393B414B.ACF84B1B@xxxxxxxxxxxxxxx> <20000605060321.E77216@xxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
Mitchell Blank Jr wrote:
> > The ppp component itself could keep track of things itself too, and
> > just never call the dev_alloc_name, perhaps with a list as you mentioned...
> Good point.  The only place this falls down is if two unrelated network
> devices are using the same naming scheme (like they both want to use
> "abc0", "abc1", etc).  It will still work, of course, but will have
> lots of collisions so it will tend towards N^2 performance just like
> now.  As long as only one of the contenders wants to make a lot
> of devices, it's just fine.  So you're right, this is the way to go.

With a little thought and community effort, we should be able to not
have any such collisions as well...untill someone implements the ability
to (re)name devices from user-space :)

> So if we can get the inet_select_addr() thing sorted then the entire
> impact of this change is to add two btrees to core/dev.c -- one
> for looking up net_devices by name, another for looking them up by
> ifindex.  Since these lookups are abstracted through the
> __dev_get_by_{name,index}() calls we could even make this
> CONFIG_SUPPORT_LOTSA_NET_DEVICES without too much gross code.

Seems a hashtable would be nice for the ifindex....

Also, if it takes out a linear search in a critical path (with seemingly
minimal overhead), then I don't even think it should be a configurable
option, just *IN* there!

> -Mitch

Ben Greear (greearb@xxxxxxxxxxxxxxx)
Author of ScryMUD: 4444        (Released under GPL)     

<Prev in Thread] Current Thread [Next in Thread>