-current link layer spaghetti diagram

Julian Elischer julian at elischer.org
Wed Oct 26 21:12:44 PDT 2005


Andrew Thompson wrote:

>On Wed, Oct 26, 2005 at 06:46:03PM -0700, Julian Elischer wrote:
>  
>
>>A first attempt can be seen at:
>>http://www.freebsd.org/~julian/layer2-current.pdf
>>
>>this is not a call graph, but a diagram of where packets can be passed.
>>
>>comments from vlan, pfil, CARP. if_bridge  developers are welcome.
>>those new-fangled bits worry me :-)
>>
>>    
>>
>
>if_bridge looks fine. It does also hook into dummynet with a
>handoff/callback, but I dont know if you want that much detail.
>
>
>Andrew
>  
>
I think I do want to show it if it is a possible packet path.
I'll change it and add that path.. (and fix a bogon I just noticed.)

check again in 20 minutes.

I'm looking at what we can do to simplify this..
it's a mess.. Personally (I am biased of course) we could have 
imlemented almost everything
outside of basic processing as netgraph modules.

firewall, divert, bridging, vlans, CARP, flow control.
these could have all been implemented as graph nodes..
well, too late for that.

There are problems for example I'd rather that the if_bridge code didn't 
call
the driver queue directly on output but passed it to the driver by 
calling ether_output_frame()
and I'm not sure that the ipfw hook on output shouldn't be in 
ether_output() instead
of in ether_output_frame().

I do think the output hook of netgraph should be above the bridging hook.
If you are using netgraph you probably will use netgraph bridging as 
well but
if you are using bridging that doesn't mean you don't want to do 
something with netgraph..

It's a bit of a problem actually. The order of calling these things 
almost wants to be adjustable because
different people seem to want to call them in different orders.




More information about the freebsd-net mailing list