Re: Change in alloc_skb() behavior in 3.2+ kernels?
From: Grant Edwards <hidden>
Date: 2012-06-07 13:24:10
On 2012-06-06, David Miller [off-list ref] wrote:
From: Grant Edwards <redacted> Date: Wed, 6 Jun 2012 18:59:19 +0000 (UTC)quoted
At the time it was written (probably 10+ years ago) it was relying on the documented API for alloc_skb() that stated alloc_skb() either returned an sk_buff of the requested size or it failed.It was never a formal API that we would only allocate 'size' amount of tailroom.
How can you say that?
From skbuff.c:
/**
*__alloc_skb-allocate a network buffer
*@size: size to allocate
*@gfp_mask: allocation mask
*@fclone: allocate from fclone cache instead of head cache
*and allocate a cloned (child) skb
*@node: numa node to allocate memory on
*quoted
quoted
*Allocate a new &sk_buff. The returned buffer has no headroom and a *tail room of size bytes. The object has a reference count of one.
*The return is the buffer. On a failure the return is %NULL.
*
*Buffers may only be allocated from interrupts using a @gfp_mask of
*%GFP_ATOMIC.
*/
--
Grant Edwards grant.b.edwards Yow! Did you move a lot of
at KOREAN STEAK KNIVES this
gmail.com trip, Dingy?