Terry Lambert writes:
 > Andrew Gallatin wrote:
 > > I imagine that this was done to follow alignment constraints on
 > > non-i386 platforms where having the ip header misaligned is fatal.
 > > (the tulip is not capable of byte granularity DMA, so you can't
 > > intentionally misalign the ethernet header & end up with an aligned IP
 > > header)
 > 
 > This is the reason: the ethernet header is 14 bytes.
 > 
 > 
 > > I imagine the i386 should be made an exception. See rev 1.17 of
 > > sys/dev/nge/if_nge.c
 > 
 > I disagree with this code; the elemenets in the header
 > are referenced multiple times.  If you are doing the
 > checksum check, you might as well be relocating the data,
 > as well.  The change I would make would be to integrate
 > the checksum calculation with the m_devget(), to ensure
 > a single pass, in the case that m_devget() must be used
 > to get aligned packet payload, and the checksum has not
 > been offloaded to hardware.

Interesting idea... However, what if you're a bridge or a router?
You've just done a whole lot of work for nothing.  I imagine its just
this case that Luigi cares about.

If you want to integrate a checksum & a copy, it should really be done
at the copyout() stage. 

Drew

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to