From owner-freebsd-net Tue Apr 25 9:17:26 2000 Delivered-To: freebsd-net@freebsd.org Received: from bubba.whistle.com (bubba.whistle.com [207.76.205.7]) by hub.freebsd.org (Postfix) with ESMTP id E27EA37BDF3; Tue, 25 Apr 2000 09:17:23 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from archie@localhost) by bubba.whistle.com (8.9.3/8.9.2) id JAA32979; Tue, 25 Apr 2000 09:15:14 -0700 (PDT) From: Archie Cobbs Message-Id: <200004251615.JAA32979@bubba.whistle.com> Subject: Re: Proposal for ethernet, bridging, netgraph In-Reply-To: <20000425105926.A518@waterspout.com> from "C. Stephen Gunn" at "Apr 25, 2000 10:59:26 am" To: csg@waterspout.com (C. Stephen Gunn) Date: Tue, 25 Apr 2000 09:15:14 -0700 (PDT) Cc: archie@whistle.com (Archie Cobbs), julian@elischer.org (Julian Elischer), pavel@alum.mit.edu, nsayer@sftw.com, luigi@FreeBSD.ORG, freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org C. Stephen Gunn 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(). > > Why not also modify ether_input() to remove the Ethernet header > when appropriate? Instead of the monkey business to add the Ethernet > Header back on. > > There are a couple of places in ether_input() that do this already, > and you're proposing another for passing the packet to bpf. > > I proposed this a few weeks ago, but never cleaned up my patch > for submission. > > It would certainly prevent some of the kludges to deal with the > Ethernet Header for things that want a peek at it, like VLANs. I started doing that, but there are some reasons not too.. 1. Less code changes => fewer new bugs 2. NFS requires that the IP packet be longword aligned (or something). If you start the mbuf with a 14-byte Ethernet header, then this is broken (?? is this still true ??) 3. Some code actually reads the header and the payload into different buffers. Putting them together, and then separating them again later would be slower than it is now. But the main reason was #1 - i.e., "one thing at a time" :-) -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message