[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <jqqa1b$kug$1@dough.gmane.org>
Date: Thu, 7 Jun 2012 13:23:55 +0000 (UTC)
From: Grant Edwards <grant.b.edwards@...il.com>
To: netdev@...r.kernel.org
Subject: Re: Change in alloc_skb() behavior in 3.2+ kernels?
On 2012-06-06, David Miller <davem@...emloft.net> wrote:
> From: Grant Edwards <grant.b.edwards@...il.com>
> Date: Wed, 6 Jun 2012 18:59:19 +0000 (UTC)
>
>> 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
*@...e: size to allocate
*@..._mask: allocation mask
*@...one: allocate from fclone cache instead of head cache
*and allocate a cloned (child) skb
*@...e: numa node to allocate memory on
*
>>> *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?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists