From 96a1f1605a62ecba4ddd8a2c615827488dbcb3c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Thu, 27 Mar 2008 17:51:31 -0700 Subject: [PATCH] --- yaml --- r: 90418 b: refs/heads/master c: f58518e678e5eef430c8d5cdcc7cd28d285f1980 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/skbuff.h | 17 +---------------- trunk/net/core/skbuff.c | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/[refs] b/[refs] index a2c028996cbd..0d4567d991cc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6be8ac2fdc5e69dec53913a42312a92dbfbd4907 +refs/heads/master: f58518e678e5eef430c8d5cdcc7cd28d285f1980 diff --git a/trunk/include/linux/skbuff.h b/trunk/include/linux/skbuff.h index 6d6cde7b243c..01a11b0c0291 100644 --- a/trunk/include/linux/skbuff.h +++ b/trunk/include/linux/skbuff.h @@ -1272,22 +1272,7 @@ static inline struct sk_buff *__dev_alloc_skb(unsigned int length, return skb; } -/** - * dev_alloc_skb - allocate an skbuff for receiving - * @length: length to allocate - * - * Allocate a new &sk_buff and assign it a usage count of one. The - * buffer has unspecified headroom built in. Users should allocate - * the headroom they think they need without accounting for the - * built in space. The built in space is used for optimisations. - * - * %NULL is returned if there is no free memory. Although this function - * allocates memory it can be called from an interrupt. - */ -static inline struct sk_buff *dev_alloc_skb(unsigned int length) -{ - return __dev_alloc_skb(length, GFP_ATOMIC); -} +extern struct sk_buff *dev_alloc_skb(unsigned int length); extern struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int length, gfp_t gfp_mask); diff --git a/trunk/net/core/skbuff.c b/trunk/net/core/skbuff.c index cf489b6329e8..0daf5c0e5b8d 100644 --- a/trunk/net/core/skbuff.c +++ b/trunk/net/core/skbuff.c @@ -263,6 +263,24 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev, return skb; } +/** + * dev_alloc_skb - allocate an skbuff for receiving + * @length: length to allocate + * + * Allocate a new &sk_buff and assign it a usage count of one. The + * buffer has unspecified headroom built in. Users should allocate + * the headroom they think they need without accounting for the + * built in space. The built in space is used for optimisations. + * + * %NULL is returned if there is no free memory. Although this function + * allocates memory it can be called from an interrupt. + */ +struct sk_buff *dev_alloc_skb(unsigned int length) +{ + return __dev_alloc_skb(length, GFP_ATOMIC); +} +EXPORT_SYMBOL(dev_alloc_skb); + static void skb_drop_list(struct sk_buff **listp) { struct sk_buff *list = *listp;