From owner-freebsd-net Tue Apr 25 14:31:52 2000 Delivered-To: freebsd-net@freebsd.org Received: from dustdevil.waterspout.com (fourier.physics.purdue.edu [128.210.146.43]) by hub.freebsd.org (Postfix) with ESMTP id 38BB837BF1A for ; Tue, 25 Apr 2000 14:31:41 -0700 (PDT) (envelope-from csg@dustdevil.waterspout.com) Received: (from csg@localhost) by dustdevil.waterspout.com (8.9.3/8.9.3) id QAA02702; Tue, 25 Apr 2000 16:40:27 -0500 (EST) (envelope-from csg) Date: Tue, 25 Apr 2000 16:40:27 -0500 From: "C. Stephen Gunn" To: Archie Cobbs Cc: freebsd-net@freebsd.org Subject: Re: Proposal for ethernet, bridging, netgraph Message-ID: <20000425164027.A2553@waterspout.com> References: <20000425105926.A518@waterspout.com> <200004251615.JAA32979@bubba.whistle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200004251615.JAA32979@bubba.whistle.com>; from archie@whistle.com on Tue, Apr 25, 2000 at 09:15:14AM -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, Apr 25, 2000 at 09:15:14AM -0700, Archie Cobbs wrote: > 1. Less code changes => fewer new bugs > But the main reason was #1 - i.e., "one thing at a time" :-) I certainly understand this motivation. > 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 ??) Perhaps I misunderstand something here, but the packet-header should be long-since-gone by the time it gets to NFS. If NFS needs the packet aligned, I'd assume that NFS takes care that monkey-business. It's the ethernet driver's responsibility to take care of the IP/NFS alignment issues. This should be taken care of long before we just trim the ether_header to pass the mbuf chain to ether_input(). Since this change still a call to m_adj(m,sizeof(struct ether_header)), the byte alignment shouldn't change by defering the call. After a check for ether_type(s) that still require the header for processing, and of course Bridging and BPF taps. > 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. I did a quick sampling of Ethernet devices in the kernel, and I couldn't find any that didn't call m_adj() right before ether_input(). This was back in January, so I can't be sure now it was an exhaustive search. I originally asked the question of why the two (the header, and the payload) were passed to ether_input() seperately. The historical answer, from Garrett Wollman, was that it was needed for TRAILERS. - Steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message