netdev
[Top] [All Lists]

Re: [patch] skbuff cleanup

To: Andrew Morton <andrewm@xxxxxxxxxx>
Subject: Re: [patch] skbuff cleanup
From: Donald Becker <becker@xxxxxxxxx>
Date: Tue, 21 Mar 2000 09:23:08 -0500 (EST)
Cc: netdev <netdev@xxxxxxxxxxx>
In-reply-to: <38D76D15.95E8645B@uow.edu.au>
Sender: owner-netdev@xxxxxxxxxxx
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


<Prev in Thread] Current Thread [Next in Thread>