mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 21:19:04 -04:00
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>
This commit is contained in:
parent
cb93471acc
commit
2e4e441071
3 changed files with 99 additions and 63 deletions
|
|
@ -769,6 +769,12 @@ static inline struct sk_buff *alloc_skb(unsigned int size,
|
|||
return __alloc_skb(size, priority, 0, NUMA_NO_NODE);
|
||||
}
|
||||
|
||||
struct sk_buff *alloc_skb_with_frags(unsigned long header_len,
|
||||
unsigned long data_len,
|
||||
int max_page_order,
|
||||
int *errcode,
|
||||
gfp_t gfp_mask);
|
||||
|
||||
static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
|
||||
gfp_t priority)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue