netdev
[Top] [All Lists]

Re: I need sk_buff frag_list info.

To: Mark Wisner <markwiz@xxxxxxxxxx>
Subject: Re: I need sk_buff frag_list info.
From: Andi Kleen <ak@xxxxxxx>
Date: Sat, 16 Mar 2002 01:37:12 +0100
Cc: netdev@xxxxxxxxxxx
In-reply-to: <OF1B1A2F76.97320533-ON85256B7D.00695592@raleigh.ibm.com>
References: <OF1B1A2F76.97320533-ON85256B7D.00695592@raleigh.ibm.com>
Sender: owner-netdev@xxxxxxxxxxx
User-agent: Mutt/1.3.22.1i
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

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