summaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorAlexander Duyck2015-05-07 06:12:03 +0200
committerDavid S. Miller2015-05-12 16:39:26 +0200
commit181edb2bfa22b50817684135ab6430ed2808abf0 (patch)
tree3715f6eb8768c5a8ef58dff4524ccfe3d87344d6 /include/linux/skbuff.h
parentmm/net: Rename and move page fragment handling from net/ to mm/ (diff)
downloadkernel-qcow2-linux-181edb2bfa22b50817684135ab6430ed2808abf0.tar.gz
kernel-qcow2-linux-181edb2bfa22b50817684135ab6430ed2808abf0.tar.xz
kernel-qcow2-linux-181edb2bfa22b50817684135ab6430ed2808abf0.zip
net: Add skb_free_frag to replace use of put_page in freeing skb->head
This change adds a function called skb_free_frag which is meant to compliment the function netdev_alloc_frag. The general idea is to enable a more lightweight version of page freeing since we don't actually need all the overhead of a put_page, and we don't quite fit the model of __free_pages. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 0039fcc45b3b..c0b574a414e7 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2182,6 +2182,11 @@ static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
return __netdev_alloc_skb_ip_align(dev, length, GFP_ATOMIC);
}
+static inline void skb_free_frag(void *addr)
+{
+ __free_page_frag(addr);
+}
+
void *napi_alloc_frag(unsigned int fragsz);
struct sk_buff *__napi_alloc_skb(struct napi_struct *napi,
unsigned int length, gfp_t gfp_mask);