On Tue, 21 Mar 2000, Andrew Morton wrote:
> All the ethernet drivers do this in their Rx ISR::
>
> skb = dev_alloc_skb(length);
> ...
> skb_reserve(skb,2); /* Force 16 byte alignment */
Some bus master drivers require that the Rx data buffers begin on a long
word (or rarely, worse) boundary. The drivers that have this behavior do
document it, but not at every alloc_skb() instance, so don't break the
current semantics of dev_alloc_skb() when adding the new function.
Chips that have this requirement also require that the Rx data buffer end on
a longword boundary, so you can't work around the alignment by having a 14
byte buffer in the beginning of the descriptor chain :-<.
Most drivers give you the option to copy-align with the 'rx_copybreak'
parameter.
Donald Becker
Scyld Computing Corporation, becker@xxxxxxxxx
|