Eric Dumazet 6f532612cc net: introduce netdev_alloc_frag()
Fix two issues introduced in commit a1c7fff7e18f5
( net: netdev_alloc_skb() use build_skb() )

- Must be IRQ safe (non NAPI drivers can use it)
- Must not leak the frag if build_skb() fails to allocate sk_buff

This patch introduces netdev_alloc_frag() for drivers willing to
use build_skb() instead of __netdev_alloc_skb() variants.

Factorize code so that :
__dev_alloc_skb() is a wrapper around __netdev_alloc_skb(), and
dev_alloc_skb() a wrapper around netdev_alloc_skb()

Use __GFP_COLD flag.

Almost all network drivers now benefit from skb->head_frag
infrastructure.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-18 13:31:25 -04:00
..
2012-04-02 04:33:44 -04:00
2012-04-15 12:44:40 -04:00
2012-04-02 04:33:44 -04:00
2012-05-17 05:00:04 -04:00
2012-05-17 05:00:04 -04:00
2010-11-28 18:24:14 -08:00
2012-05-17 05:00:04 -04:00
2012-05-17 05:00:04 -04:00
2012-03-28 18:30:03 +01:00
2012-01-17 10:31:12 -05:00
2012-05-18 13:31:25 -04:00
2012-05-17 05:00:04 -04:00