Date: Tue, 25 Apr 2000 16:40:27 -0500 From: "C. Stephen Gunn" <csg@waterspout.com> To: Archie Cobbs <archie@whistle.com> Cc: freebsd-net@freebsd.org Subject: Re: Proposal for ethernet, bridging, netgraph Message-ID: <20000425164027.A2553@waterspout.com> In-Reply-To: <200004251615.JAA32979@bubba.whistle.com>; from archie@whistle.com on Tue, Apr 25, 2000 at 09:15:14AM -0700 References: <20000425105926.A518@waterspout.com> <200004251615.JAA32979@bubba.whistle.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000425164027.A2553>