Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Mar 2003 14:21:45 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Peter Jeremy <peterjeremy@optushome.com.au>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Realtek
Message-ID:  <3E691B79.1E0AB706@mindspring.com>
References:  <20030306230206.70461.qmail@web14913.mail.yahoo.com> <200303062136.44471.wes@softweyr.com> <3E68E859.EAB20A71@mindspring.com> <20030307221905.GA98940@cirb503493.alcatel.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Jeremy wrote:
> On Fri, Mar 07, 2003 at 10:43:37AM -0800, Terry Lambert wrote:
> >And TCP/IP headers are not an even multiple of the alignment boundary
> >(4 bytes, actually).  So every packet the card DMA's in has to be
> >copied so that access to the TCP packet contents are aligned.
> 
> Last time I looked at TCP/IP, the header lengths were all defined
> in 4-byte units so they must be a multiple of 4 bytes by definition.
> Maybe you are referring to the Ethernet header - which is 14 bytes
> long (18 bytes in a VLAN trunk).

Yes.  Unless the transfer is padded by the card in the DMA, or it
can DMA to a two-byte shifted boundary from it's own start address,
you end up having to copy to gt the TCP/IP headers onto a 4 byte
alignment boundary.

There are a couple other cards that suck this way; if Bill Paul
wrote the driver for the card, then the information is in the
comments in the driver.  Generally, reading the comments in all
the drivers, and picking the one with the least disparaging
remarks is a good way to pick hardware.  8-).

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E691B79.1E0AB706>