> On Sat, 3 Jun 2000, Ben Greear wrote:
> > Ok, the question is where is the lookup 'hit' you are talking about.
> > Where is this searching that is slowing everything down? Don't just
> > say there is a hit, show me the specific code or logic where this hit takes
> > place.
> You register_netdevice() each VLAN device (because you have a device for
> each vlan).
True, for __non-critical__ path, like setup and destroy, there may be a linear
hit, based on number of devices. That does not bother me, because this will
happen once or twice every couple of days or so (or when you boot...) on
average I think. Am I missing something that happens more often here?
> So in the worst case for 4 ethernet ports you have grown dev_base to over
> 15000 structures (in the worst case). Now go look at the associated code
> and tell me you dont see the repurcasions.
I give the user the flexibility to have as many VLANs as she desires. I
have not seen any critical-path performance hit relating to more devices.
The non-critical path hits that do exist should be linear, which
isn't really too bad, and they should be extremely rare, statistically speaking.
I do not expect anyone to actually configure 16k of VLAN devices, but if they
have a need, and the hardware/memory to run it with the performance they can
live with, then I'll not bother them about it. Once it's set up (which might
take a while), then it should run fairly fast, I think.
> Most of the manipulating code doesnt run in the critical data path, but
> you are adding unnecessary noise, and besides my point is that _you dont_
> need to have a device per VLAN; i might convert if you optimize it for
> everyone else.
Optimize what for everyone else? And I dissagree with your assumption about
not needing a device per VLAN anyway, as have others, with excellent arguments.
Does any of the manipulating code run in the critical path? I really would
be interested if there is anything in the critical path that is unduly burdened
by lots of VLAN (or other) interfaces...
> Ok so they use BPF. Either out of coolness or madness. Would packet socket
> have sufficed here for Linux ?
I think it would have, someone even mentioned that DHCPd would probably work
if just compiled to not use BPF (there are other options, like raw sockets
I think.) Haven't tried that though...
Ben Greear (greearb@xxxxxxxxxxxxxxx) http://www.candelatech.com
Author of ScryMUD: scry.wanfear.com 4444 (Released under GPL)