From owner-freebsd-net@FreeBSD.ORG Thu Oct 27 04:12:44 2005 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 775A716A420; Thu, 27 Oct 2005 04:12:44 +0000 (GMT) (envelope-from julian@elischer.org) Received: from delight.idiom.com (outbound.idiom.com [216.240.47.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1394A43D6B; Thu, 27 Oct 2005 04:12:40 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id 5DEFC226B1B; Wed, 26 Oct 2005 21:12:39 -0700 (PDT) Received: from [192.168.2.6] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id j9R4CcYw071285; Wed, 26 Oct 2005 21:12:39 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <436053B6.1060302@elischer.org> Date: Wed, 26 Oct 2005 21:12:38 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Thompson References: <4360315B.201@elischer.org> <20051027021622.GB81665@heff.fud.org.nz> In-Reply-To: <20051027021622.GB81665@heff.fud.org.nz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: net@freebsd.org Subject: Re: -current link layer spaghetti diagram X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2005 04:12:44 -0000 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.