aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 14b950413495..5d4a990d5577 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -300,20 +300,26 @@ struct sk_buff {
300#include <asm/system.h> 300#include <asm/system.h>
301 301
302extern void __kfree_skb(struct sk_buff *skb); 302extern void __kfree_skb(struct sk_buff *skb);
303extern struct sk_buff *alloc_skb(unsigned int size, int priority); 303extern struct sk_buff *alloc_skb(unsigned int size,
304 unsigned int __nocast priority);
304extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp, 305extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
305 unsigned int size, int priority); 306 unsigned int size,
307 unsigned int __nocast priority);
306extern void kfree_skbmem(struct sk_buff *skb); 308extern void kfree_skbmem(struct sk_buff *skb);
307extern struct sk_buff *skb_clone(struct sk_buff *skb, int priority); 309extern struct sk_buff *skb_clone(struct sk_buff *skb,
308extern struct sk_buff *skb_copy(const struct sk_buff *skb, int priority); 310 unsigned int __nocast priority);
309extern struct sk_buff *pskb_copy(struct sk_buff *skb, int gfp_mask); 311extern struct sk_buff *skb_copy(const struct sk_buff *skb,
312 unsigned int __nocast priority);
313extern struct sk_buff *pskb_copy(struct sk_buff *skb,
314 unsigned int __nocast gfp_mask);
310extern int pskb_expand_head(struct sk_buff *skb, 315extern int pskb_expand_head(struct sk_buff *skb,
311 int nhead, int ntail, int gfp_mask); 316 int nhead, int ntail,
317 unsigned int __nocast gfp_mask);
312extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, 318extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb,
313 unsigned int headroom); 319 unsigned int headroom);
314extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb, 320extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
315 int newheadroom, int newtailroom, 321 int newheadroom, int newtailroom,
316 int priority); 322 unsigned int __nocast priority);
317extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad); 323extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad);
318#define dev_kfree_skb(a) kfree_skb(a) 324#define dev_kfree_skb(a) kfree_skb(a)
319extern void skb_over_panic(struct sk_buff *skb, int len, 325extern void skb_over_panic(struct sk_buff *skb, int len,
@@ -464,7 +470,8 @@ static inline int skb_shared(const struct sk_buff *skb)
464 * 470 *
465 * NULL is returned on a memory allocation failure. 471 * NULL is returned on a memory allocation failure.
466 */ 472 */
467static inline struct sk_buff *skb_share_check(struct sk_buff *skb, int pri) 473static inline struct sk_buff *skb_share_check(struct sk_buff *skb,
474 unsigned int __nocast pri)
468{ 475{
469 might_sleep_if(pri & __GFP_WAIT); 476 might_sleep_if(pri & __GFP_WAIT);
470 if (skb_shared(skb)) { 477 if (skb_shared(skb)) {
@@ -1001,7 +1008,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
1001 * %NULL is returned in there is no free memory. 1008 * %NULL is returned in there is no free memory.
1002 */ 1009 */
1003static inline struct sk_buff *__dev_alloc_skb(unsigned int length, 1010static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
1004 int gfp_mask) 1011 unsigned int __nocast gfp_mask)
1005{ 1012{
1006 struct sk_buff *skb = alloc_skb(length + 16, gfp_mask); 1013 struct sk_buff *skb = alloc_skb(length + 16, gfp_mask);
1007 if (likely(skb)) 1014 if (likely(skb))
@@ -1114,8 +1121,8 @@ static inline int skb_can_coalesce(struct sk_buff *skb, int i,
1114 * If there is no free memory -ENOMEM is returned, otherwise zero 1121 * If there is no free memory -ENOMEM is returned, otherwise zero
1115 * is returned and the old skb data released. 1122 * is returned and the old skb data released.
1116 */ 1123 */
1117extern int __skb_linearize(struct sk_buff *skb, int gfp); 1124extern int __skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp);
1118static inline int skb_linearize(struct sk_buff *skb, int gfp) 1125static inline int skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp)
1119{ 1126{
1120 return __skb_linearize(skb, gfp); 1127 return __skb_linearize(skb, gfp);
1121} 1128}