diff options
Diffstat (limited to 'include/linux/skbuff.h')
| -rw-r--r-- | include/linux/skbuff.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index bf221d65d9ad..d0ae90af0b40 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -122,8 +122,14 @@ struct sk_buff_head { | |||
| 122 | 122 | ||
| 123 | struct sk_buff; | 123 | struct sk_buff; |
| 124 | 124 | ||
| 125 | /* To allow 64K frame to be packed as single skb without frag_list */ | 125 | /* To allow 64K frame to be packed as single skb without frag_list. Since |
| 126 | * GRO uses frags we allocate at least 16 regardless of page size. | ||
| 127 | */ | ||
| 128 | #if (65536/PAGE_SIZE + 2) < 16 | ||
| 129 | #define MAX_SKB_FRAGS 16UL | ||
| 130 | #else | ||
| 126 | #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2) | 131 | #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2) |
| 132 | #endif | ||
| 127 | 133 | ||
| 128 | typedef struct skb_frag_struct skb_frag_t; | 134 | typedef struct skb_frag_struct skb_frag_t; |
| 129 | 135 | ||
| @@ -388,10 +394,7 @@ struct sk_buff { | |||
| 388 | kmemcheck_bitfield_begin(flags2); | 394 | kmemcheck_bitfield_begin(flags2); |
| 389 | __u16 queue_mapping:16; | 395 | __u16 queue_mapping:16; |
| 390 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | 396 | #ifdef CONFIG_IPV6_NDISC_NODETYPE |
| 391 | __u8 ndisc_nodetype:2, | 397 | __u8 ndisc_nodetype:2; |
| 392 | deliver_no_wcard:1; | ||
| 393 | #else | ||
| 394 | __u8 deliver_no_wcard:1; | ||
| 395 | #endif | 398 | #endif |
| 396 | __u8 ooo_okay:1; | 399 | __u8 ooo_okay:1; |
| 397 | kmemcheck_bitfield_end(flags2); | 400 | kmemcheck_bitfield_end(flags2); |
| @@ -471,7 +474,7 @@ static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) | |||
| 471 | extern void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst); | 474 | extern void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst); |
| 472 | 475 | ||
| 473 | /** | 476 | /** |
| 474 | * skb_dst_is_noref - Test if skb dst isnt refcounted | 477 | * skb_dst_is_noref - Test if skb dst isn't refcounted |
| 475 | * @skb: buffer | 478 | * @skb: buffer |
| 476 | */ | 479 | */ |
| 477 | static inline bool skb_dst_is_noref(const struct sk_buff *skb) | 480 | static inline bool skb_dst_is_noref(const struct sk_buff *skb) |
| @@ -1801,6 +1804,15 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len) | |||
| 1801 | prefetch(skb->prev), (skb != (struct sk_buff *)(queue)); \ | 1804 | prefetch(skb->prev), (skb != (struct sk_buff *)(queue)); \ |
| 1802 | skb = skb->prev) | 1805 | skb = skb->prev) |
| 1803 | 1806 | ||
| 1807 | #define skb_queue_reverse_walk_safe(queue, skb, tmp) \ | ||
| 1808 | for (skb = (queue)->prev, tmp = skb->prev; \ | ||
| 1809 | skb != (struct sk_buff *)(queue); \ | ||
| 1810 | skb = tmp, tmp = skb->prev) | ||
| 1811 | |||
| 1812 | #define skb_queue_reverse_walk_from_safe(queue, skb, tmp) \ | ||
| 1813 | for (tmp = skb->prev; \ | ||
| 1814 | skb != (struct sk_buff *)(queue); \ | ||
| 1815 | skb = tmp, tmp = skb->prev) | ||
| 1804 | 1816 | ||
| 1805 | static inline bool skb_has_frag_list(const struct sk_buff *skb) | 1817 | static inline bool skb_has_frag_list(const struct sk_buff *skb) |
| 1806 | { | 1818 | { |
| @@ -1868,7 +1880,7 @@ extern void skb_split(struct sk_buff *skb, | |||
| 1868 | extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, | 1880 | extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, |
| 1869 | int shiftlen); | 1881 | int shiftlen); |
| 1870 | 1882 | ||
| 1871 | extern struct sk_buff *skb_segment(struct sk_buff *skb, int features); | 1883 | extern struct sk_buff *skb_segment(struct sk_buff *skb, u32 features); |
| 1872 | 1884 | ||
| 1873 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, | 1885 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, |
| 1874 | int len, void *buffer) | 1886 | int len, void *buffer) |
