netdev
[Top] [All Lists]

Re: I need sk_buff frag_list info.

To: Donald Becker <becker@xxxxxxxxx>
Subject: Re: I need sk_buff frag_list info.
From: Andi Kleen <ak@xxxxxxx>
Date: Sun, 17 Mar 2002 10:59:28 +0100
Cc: Mark Wisner <markwiz@xxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.33.0203152124160.1150-100000@xxxxxxxxxxxxxxxxxxxxx>
References: <OF1B1A2F76.97320533-ON85256B7D.00695592@xxxxxxxxxxxxxxx> <Pine.LNX.4.33.0203152124160.1150-100000@xxxxxxxxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
User-agent: Mutt/1.3.22.1i
On Fri, Mar 15, 2002 at 10:43:12PM -0500, Donald Becker wrote:
> A final related note: drivers should always allocate consistently
> sized skbuffs.  Specifically, Ethernet drivers should always allocate
> 1536 byte buffers.  Using a single buffer size gives the skbuff
> allocator the opportunity to efficiently recycle buffers rather than
> having to allocate and free a mix of sizes.

The current skbuff allocator uses kmalloc for the data part. kmalloc
currently always rounds to a power of two. So for any 
2K>=value+sizeof(struct skb_shared_info)>1K 
you will get a 2K buffer. The skbuff head recycling works independently
of the data size.

-Andi

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