Date: Wed, 22 Mar 2000 13:29:17 -0800 From: "Sam Leffler" <sam@errno.com> To: "Bakul Shah" <bakul@torrentnet.com> Cc: <freebsd-net@FreeBSD.ORG>, "C. Stephen Gunn" <csg@waterspout.com> Subject: Re: Trimming ether_header before ether_input() Message-ID: <011001bf9445$adaca3d0$0132a8c0@MELANGE> References: <200003221915.OAA21851@chai.torrentnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
If you read the RFC or the book you'll see that the original Ethernet header
was copied to the end (the "trailer") and a new one was created. The
purpose was to get the payload page-aligned on receipt so we could do page
flipping tricks with the Unibus adapter. Worked very well for it's time;
but people frowned on it because it wasn't standard and so led to
interoperability problems.
Sam
----- Original Message -----
From: "Bakul Shah" <bakul@torrentnet.com>
To: "Sam Leffler" <sam@errno.com>
Cc: <freebsd-net@FreeBSD.ORG>; "C. Stephen Gunn" <csg@waterspout.com>
Sent: Wednesday, March 22, 2000 11:15 AM
Subject: Re: Trimming ether_header before ether_input()
> > > something peculiar in all ethernet drivers. Is there a historical
> > > reason that the ethernet header is trimmed from the mbuf chain
> > > before its passed to ether_input()?
> > >
> > > I can only assume that (at one time) there were ethernet devices
> > > (back in the IMP days) that handed you the link header and the
> > > payload in separate buffers.
> > >
> >
> > When all this code was written there was a link layer encapsulation
called a
> > trailer protocol that placed the Ethernet header at the end of the
packet.
> ^^^^^^^^^^^^^^^
> > I think it's described in the "real BSD book" (the 4.2 one, not a later
one
> > :-)); if not there is an RFC that describes it.
>
> Perhaps you mean ``protocol header(s) above the ethernet
> level at the end of the packet''? The 14 byte ethernet header
> has to be at the front (unless you had significantly simpler
> devices than that old seeq8005). A separate arg for the
> ethernet header may have something to do with a device where
> the header was in a separate place that could not be an mbuf
> struct? Another reason may have to do with alignment.
> Some devices may prefer to put ethernet payload as well as
> header on a 4 byte boundary.
>
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?011001bf9445$adaca3d0$0132a8c0>
