diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/skbuff.h | 11 |
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; | |||
| 151 | struct scatterlist; | 151 | struct scatterlist; |
| 152 | struct pipe_inode_info; | 152 | struct pipe_inode_info; |
| 153 | struct iov_iter; | 153 | struct iov_iter; |
| 154 | struct 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) |
| 156 | struct nf_conntrack { | 157 | struct 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 */ |
| 678 | static inline bool skb_pfmemalloc(const struct sk_buff *skb) | 680 | static 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 | ||
| 2169 | void *napi_alloc_frag(unsigned int fragsz); | ||
| 2170 | struct sk_buff *__napi_alloc_skb(struct napi_struct *napi, | ||
| 2171 | unsigned int length, gfp_t gfp_mask); | ||
| 2172 | static 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 |
