diff options
| author | Eric Dumazet <edumazet@google.com> | 2014-09-17 07:49:49 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-09-19 16:25:23 -0400 |
| commit | 2e4e44107176d552f8bb1bb76053e850e3809841 (patch) | |
| tree | b5cbc8a9e0a02bd3973e918e67493b9d81ffae4a /include/linux | |
| parent | cb93471acc42b71fa3f2e46805020f2b323db64f (diff) | |
net: add alloc_skb_with_frags() helper
Extract from sock_alloc_send_pskb() code building skb with frags,
so that we can reuse this in other contexts.
Intent is to use it from tcp_send_rcvq(), tcp_collapse(), ...
We also want to replace some skb_linearize() calls to a more reliable
strategy in pathological cases where we need to reduce number of frags.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/skbuff.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 756e3d057e84..f1bfa3781c75 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -769,6 +769,12 @@ static inline struct sk_buff *alloc_skb(unsigned int size, | |||
| 769 | return __alloc_skb(size, priority, 0, NUMA_NO_NODE); | 769 | return __alloc_skb(size, priority, 0, NUMA_NO_NODE); |
| 770 | } | 770 | } |
| 771 | 771 | ||
| 772 | struct sk_buff *alloc_skb_with_frags(unsigned long header_len, | ||
| 773 | unsigned long data_len, | ||
| 774 | int max_page_order, | ||
| 775 | int *errcode, | ||
| 776 | gfp_t gfp_mask); | ||
| 777 | |||
| 772 | static inline struct sk_buff *alloc_skb_fclone(unsigned int size, | 778 | static inline struct sk_buff *alloc_skb_fclone(unsigned int size, |
| 773 | gfp_t priority) | 779 | gfp_t priority) |
| 774 | { | 780 | { |
