From owner-freebsd-net Tue Apr 25 19:31:23 2000 Delivered-To: freebsd-net@freebsd.org Received: from urban.iinet.net.au (urban.iinet.net.au [203.59.24.231]) by hub.freebsd.org (Postfix) with ESMTP id 6403B37B6BD; Tue, 25 Apr 2000 19:31:17 -0700 (PDT) (envelope-from julian@elischer.org) Received: from gothic.iinet.net.au (gothic.iinet.net.au [203.59.24.252]) by urban.iinet.net.au (8.8.7/8.8.7) with ESMTP id KAA17891; Wed, 26 Apr 2000 10:31:07 +0800 Received: from jules.elischer.org (reggae-11-129.nv.iinet.net.au [203.59.69.129]) by gothic.iinet.net.au (8.8.5/8.8.5) with SMTP id KAA27352; Wed, 26 Apr 2000 10:30:47 +0800 Message-ID: <39065497.237C228A@elischer.org> Date: Tue, 25 Apr 2000 19:29:46 -0700 From: Julian Elischer X-Mailer: Mozilla 3.04Gold (X11; I; FreeBSD 5.0-CURRENT i386) MIME-Version: 1.0 To: Archie Cobbs Cc: luigi@FreeBSD.ORG, remy@boostworks.com, csg@waterspout.com, pavel@alum.mit.edu, nsayer@sftw.com, freebsd-net@FreeBSD.ORG Subject: Re: Proposal for ethernet, bridging, netgraph References: <200004260055.RAA55462@bubba.whistle.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Archie Cobbs wrote: > > Archie Cobbs writes: > > OK, here's a patch ready for review & test.. this patch does one > > thing, which is move the calls to BPF and BRIDGE'ing out of each > > Ethernet driver and into ether_input(). > > Thanks for the input! The patch has been updated.. > > ftp://ftp.whistle.com/pub/archie/misc/net.cleanup.patch.2 > > Again, the only purpose of this patch is to move the BPF and > BRIDGE taps out of the individual ethernet drivers and up into > ether_input(). > > Changes to the patch include: > > - If the 'eh' parameter to ether_input() is NULL, then don't > do any of the link-layer stuff. This allows the existing > optimization in the if_ed.c driver to work the same. > > - Smaller change to the optimization in if_ed.c: simply NULL > out 'eh' before calling ether_input() > > - Changed bridge_in() and bridge_dst_lookup() prototypes to > take a struct ether_header * instead of an mbuf > > -Archie > I liked the original patch, and most of this is of course the same. I am not sure I like this as the if_ed driver is now still calling the bridging code directly, which means that changes to the if_ethersubr.c cod eneed to be duplicated into that driver (if the writer knows to do this). Also, not having the 'eh' available is going to make it kinda hard to work out what the ether_type is, is it not? I cannot see how you avoid getting a "using uninitialised variable" warning. I feel uncomfortable about it anyway. > ___________________________________________________________________________ > Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000 ---> X_.---._/ presently in: Perth v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message