diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 17:59:15 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 17:59:15 -0800 |
| commit | 2a7117ac7c120c085c56745f753166b821022858 (patch) | |
| tree | d858db9ea8ddf2a5e58e44e5687bbd9479f7c5d4 /include/linux/skbuff.h | |
| parent | c8ebfc888f9ee93f2dc7cd62b3be66263755d99a (diff) | |
v2.4.1.3 -> v2.4.1.4
- big S/390x 64-bit merge
- typos and license name fixes. doc updates.
- more include file cleanups (phase out "malloc.h")
- even more elevator corner cases.. When not merging, find the best insertion point.
- pmac ide update
- network fixes (netif_wake_queue on tx timeout)
- USB printer select() fix
- NFS client missed initialization, deamon fixed client address check
Diffstat (limited to 'include/linux/skbuff.h')
| -rw-r--r-- | include/linux/skbuff.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 0213728a6d5b..24404cfda642 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -878,29 +878,48 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) } /** - * dev_alloc_skb - allocate an skbuff for sending + * __dev_alloc_skb - allocate an skbuff for sending * @length: length to allocate + * @gfp_mask: get_free_pages mask, passed to alloc_skb * * 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 in there is no free memory. Although this function - * allocates memory it can be called from an interrupt. + * %NULL is returned in there is no free memory. */ -static inline struct sk_buff *dev_alloc_skb(unsigned int length) +static inline struct sk_buff *__dev_alloc_skb(unsigned int length, + int gfp_mask) { struct sk_buff *skb; - skb = alloc_skb(length+16, GFP_ATOMIC); + skb = alloc_skb(length+16, gfp_mask); if (skb) skb_reserve(skb,16); return skb; } /** + * dev_alloc_skb - allocate an skbuff for sending + * @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 in 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); +} + +/** * skb_cow - copy a buffer if need be * @skb: buffer to copy * @headroom: needed headroom |
