Ben Greear wrote:
> As someone pointed
> out (sorry, deleted the mail), other than the dev_get_by[index/name], there
> is one other place, in the IP stack, that ***may*** be called often that
> walks the device list.
Well there are others, but they're in weird protocols (decnet, rose, netrom).
I doubt we'll ever need to support large numbers of devices running
those protocols. If we want them to perform well even with lots of
devices running other protocols we can have them keep their own list
of the net_devices they are using. IPX does this, for instance.
> 3) Investigate the linear walk in IP land.
Someone should try putting a counter there to report who many times that
code actually gets hit on normal use.
> One thing I didn't bring up
> before: If the IP code needs to walk all 'routable things', then even
> if VLANs are not devices, this code will probably need to walk them.
Exactly right. It specifically searches each device and for each
one linearly searches all the "ifa" structures on the device.
So if all the VLANs were using the same net_device there would
still be as many ifa's total. In fact, the situation would be far,
far worse since there are a lot of other places in the ipv4 code
that the ifa list on a particular device gets searched.