summaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorEric Dumazet2013-10-18 01:27:07 +0200
committerDavid S. Miller2013-10-18 06:08:51 +0200
commit400dfd3ae899849b27d398ca7894e1b44430887f (patch)
tree5478cafc2fd175ea7f2307e4eda1f6a9a8618733 /include/linux/skbuff.h
parentMerge branch 'pci_set_drvdata' (diff)
downloadkernel-qcow2-linux-400dfd3ae899849b27d398ca7894e1b44430887f.tar.gz
kernel-qcow2-linux-400dfd3ae899849b27d398ca7894e1b44430887f.tar.xz
kernel-qcow2-linux-400dfd3ae899849b27d398ca7894e1b44430887f.zip
net: refactor sk_page_frag_refill()
While working on virtio_net new allocation strategy to increase payload/truesize ratio, we found that refactoring sk_page_frag_refill() was needed. This patch splits sk_page_frag_refill() into two parts, adding skb_page_frag_refill() which can be used without a socket. While we are at it, add a minimum frag size of 32 for sk_page_frag_refill() Michael will either use netdev_alloc_frag() from softirq context, or skb_page_frag_refill() from process context in refill_work() (GFP_KERNEL allocations) Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Michael Dalton <mwdalton@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 1cd32f96055e..ba74474836c0 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2062,6 +2062,8 @@ static inline void skb_frag_set_page(struct sk_buff *skb, int f,
__skb_frag_set_page(&skb_shinfo(skb)->frags[f], page);
}
+bool skb_page_frag_refill(unsigned int sz, struct page_frag *pfrag, gfp_t prio);
+
/**
* skb_frag_dma_map - maps a paged fragment via the DMA API
* @dev: the device to map the fragment to