On Fri, Mar 15, 2002 at 02:15:22PM -0500, Mark Wisner wrote:
> I am working on a change to the IBM 405 Ethernet driver. The Ethernet
What is an IBM 405?
> allows us to define buffer sizes smaller than the MTU size. If a packet
> comes in larger than the buffer size, it will be received across multiple
> buffers. The current driver is a zero copy driver, it uses buffers of the
> MTU size, where we allocate a SKB for each descriptor and have the
> descriptor buffer pointer point to the SKB's data buffer. This allows the
> driver to avoid memory to memory moves.
> I would like to implement the same zero copy but I want to use smaller
> buffers. I would like to have each descriptor point to the buffer area of a
> separate SKB. When a large packet is received and it is received into
> multiple SKB's. I would like to pass these multiple SKBs to the stack. I
> want to avoid using memcopies. I think frag_list is what I want to use.
Only when you don't want to support TCP. TCP will always reallocate and copy
list linked packets currently.
frag_list is purely a hack to handle fragmented packets for UDP and RAW.
Instead you should use the skb data array (skb_shinfo()->frags) and fill
it with page sized chunks.
Documentation on how to use that is unfortunately a bit scarce, you'll need
to do some RTFS.
-Andi
|