On Sun, 10 Jun 2001, David S. Miller wrote:
> Manfred Spraul writes:
> > Several cheap busmaster nics only accept tx buffers that are 32-bit
> > aligned.
>
> I'm going to assume that it is safe to bet that such cards cannot take
> multiple buffers for a TX packet too.
Incorrect assumption.
> Because if they could, then we could do something like copy the header
> forward a few bytes to get it aligned, and set up two buffer pointers
> into the packet such that the 32-bit alignment requirement is met.
If it were that easy, don't you think the device driver writer would
have used the same technique to avoid the bulk copy?
There wouldn't be an alignment requirement if it were not built into the
hardware. The usual reason for the limitation is that the Tx FIFO is 32
bits wide, and doesn't have byte rotate circuitry. The byte alignment
will always remain the same. In software this appears as a four
byte rounding of the Tx fragment length.
Luckily, Tx alignment is required less commonly than Rx buffer alignment.
Donald Becker becker@xxxxxxxxx
Scyld Computing Corporation http://www.scyld.com
410 Severn Ave. Suite 210 Second Generation Beowulf Clusters
Annapolis MD 21403 410-990-9993
|