aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/skbuff.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index ab0bc43c82a4..85ab7d72b54c 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -151,6 +151,7 @@ struct net_device;
151struct scatterlist; 151struct scatterlist;
152struct pipe_inode_info; 152struct pipe_inode_info;
153struct iov_iter; 153struct iov_iter;
154struct napi_struct;
154 155
155#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 156#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
156struct nf_conntrack { 157struct nf_conntrack {
@@ -673,6 +674,7 @@ struct sk_buff {
673 674
674#define SKB_ALLOC_FCLONE 0x01 675#define SKB_ALLOC_FCLONE 0x01
675#define SKB_ALLOC_RX 0x02 676#define SKB_ALLOC_RX 0x02
677#define SKB_ALLOC_NAPI 0x04
676 678
677/* Returns true if the skb was allocated from PFMEMALLOC reserves */ 679/* Returns true if the skb was allocated from PFMEMALLOC reserves */
678static inline bool skb_pfmemalloc(const struct sk_buff *skb) 680static inline bool skb_pfmemalloc(const struct sk_buff *skb)
@@ -2164,6 +2166,15 @@ static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
2164 return __netdev_alloc_skb_ip_align(dev, length, GFP_ATOMIC); 2166 return __netdev_alloc_skb_ip_align(dev, length, GFP_ATOMIC);
2165} 2167}
2166 2168
2169void *napi_alloc_frag(unsigned int fragsz);
2170struct sk_buff *__napi_alloc_skb(struct napi_struct *napi,
2171 unsigned int length, gfp_t gfp_mask);
2172static inline struct sk_buff *napi_alloc_skb(struct napi_struct *napi,
2173 unsigned int length)
2174{
2175 return __napi_alloc_skb(napi, length, GFP_ATOMIC);
2176}
2177
2167/** 2178/**
2168 * __dev_alloc_pages - allocate page for network Rx 2179 * __dev_alloc_pages - allocate page for network Rx
2169 * @gfp_mask: allocation priority. Set __GFP_NOMEMALLOC if not for network Rx 2180 * @gfp_mask: allocation priority. Set __GFP_NOMEMALLOC if not for network Rx