diff options
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 3b71a4e83642..c2d89335f637 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -498,7 +498,7 @@ struct sk_buff { | |||
498 | * headers if needed | 498 | * headers if needed |
499 | */ | 499 | */ |
500 | __u8 encapsulation:1; | 500 | __u8 encapsulation:1; |
501 | /* 7/9 bit hole (depending on ndisc_nodetype presence) */ | 501 | /* 6/8 bit hole (depending on ndisc_nodetype presence) */ |
502 | kmemcheck_bitfield_end(flags2); | 502 | kmemcheck_bitfield_end(flags2); |
503 | 503 | ||
504 | #if defined CONFIG_NET_DMA || defined CONFIG_NET_RX_BUSY_POLL | 504 | #if defined CONFIG_NET_DMA || defined CONFIG_NET_RX_BUSY_POLL |
@@ -1805,10 +1805,13 @@ static inline void pskb_trim_unique(struct sk_buff *skb, unsigned int len) | |||
1805 | */ | 1805 | */ |
1806 | static inline void skb_orphan(struct sk_buff *skb) | 1806 | static inline void skb_orphan(struct sk_buff *skb) |
1807 | { | 1807 | { |
1808 | if (skb->destructor) | 1808 | if (skb->destructor) { |
1809 | skb->destructor(skb); | 1809 | skb->destructor(skb); |
1810 | skb->destructor = NULL; | 1810 | skb->destructor = NULL; |
1811 | skb->sk = NULL; | 1811 | skb->sk = NULL; |
1812 | } else { | ||
1813 | BUG_ON(skb->sk); | ||
1814 | } | ||
1812 | } | 1815 | } |
1813 | 1816 | ||
1814 | /** | 1817 | /** |
@@ -1902,8 +1905,8 @@ static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev, | |||
1902 | return __netdev_alloc_skb_ip_align(dev, length, GFP_ATOMIC); | 1905 | return __netdev_alloc_skb_ip_align(dev, length, GFP_ATOMIC); |
1903 | } | 1906 | } |
1904 | 1907 | ||
1905 | /* | 1908 | /** |
1906 | * __skb_alloc_page - allocate pages for ps-rx on a skb and preserve pfmemalloc data | 1909 | * __skb_alloc_pages - allocate pages for ps-rx on a skb and preserve pfmemalloc data |
1907 | * @gfp_mask: alloc_pages_node mask. Set __GFP_NOMEMALLOC if not for network packet RX | 1910 | * @gfp_mask: alloc_pages_node mask. Set __GFP_NOMEMALLOC if not for network packet RX |
1908 | * @skb: skb to set pfmemalloc on if __GFP_MEMALLOC is used | 1911 | * @skb: skb to set pfmemalloc on if __GFP_MEMALLOC is used |
1909 | * @order: size of the allocation | 1912 | * @order: size of the allocation |
@@ -2356,6 +2359,10 @@ extern int skb_copy_datagram_from_iovec(struct sk_buff *skb, | |||
2356 | const struct iovec *from, | 2359 | const struct iovec *from, |
2357 | int from_offset, | 2360 | int from_offset, |
2358 | int len); | 2361 | int len); |
2362 | extern int zerocopy_sg_from_iovec(struct sk_buff *skb, | ||
2363 | const struct iovec *frm, | ||
2364 | int offset, | ||
2365 | size_t count); | ||
2359 | extern int skb_copy_datagram_const_iovec(const struct sk_buff *from, | 2366 | extern int skb_copy_datagram_const_iovec(const struct sk_buff *from, |
2360 | int offset, | 2367 | int offset, |
2361 | const struct iovec *to, | 2368 | const struct iovec *to, |
@@ -2385,7 +2392,7 @@ extern void skb_split(struct sk_buff *skb, | |||
2385 | struct sk_buff *skb1, const u32 len); | 2392 | struct sk_buff *skb1, const u32 len); |
2386 | extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, | 2393 | extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, |
2387 | int shiftlen); | 2394 | int shiftlen); |
2388 | extern void skb_scrub_packet(struct sk_buff *skb); | 2395 | extern void skb_scrub_packet(struct sk_buff *skb, bool xnet); |
2389 | 2396 | ||
2390 | extern struct sk_buff *skb_segment(struct sk_buff *skb, | 2397 | extern struct sk_buff *skb_segment(struct sk_buff *skb, |
2391 | netdev_features_t features); | 2398 | netdev_features_t features); |