diff options
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 66f8819f9568..16eef03ce0eb 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -134,9 +134,10 @@ struct skb_frag_struct { | |||
134 | struct skb_shared_info { | 134 | struct skb_shared_info { |
135 | atomic_t dataref; | 135 | atomic_t dataref; |
136 | unsigned short nr_frags; | 136 | unsigned short nr_frags; |
137 | unsigned short tso_size; | 137 | unsigned short gso_size; |
138 | unsigned short tso_segs; | 138 | /* Warning: this field is not always filled in (UFO)! */ |
139 | unsigned short ufo_size; | 139 | unsigned short gso_segs; |
140 | unsigned short gso_type; | ||
140 | unsigned int ip6_frag_id; | 141 | unsigned int ip6_frag_id; |
141 | struct sk_buff *frag_list; | 142 | struct sk_buff *frag_list; |
142 | skb_frag_t frags[MAX_SKB_FRAGS]; | 143 | skb_frag_t frags[MAX_SKB_FRAGS]; |
@@ -168,6 +169,11 @@ enum { | |||
168 | SKB_FCLONE_CLONE, | 169 | SKB_FCLONE_CLONE, |
169 | }; | 170 | }; |
170 | 171 | ||
172 | enum { | ||
173 | SKB_GSO_TCPV4 = 1 << 0, | ||
174 | SKB_GSO_UDPV4 = 1 << 1, | ||
175 | }; | ||
176 | |||
171 | /** | 177 | /** |
172 | * struct sk_buff - socket buffer | 178 | * struct sk_buff - socket buffer |
173 | * @next: Next buffer in list | 179 | * @next: Next buffer in list |
@@ -209,6 +215,8 @@ enum { | |||
209 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c | 215 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c |
210 | * @tc_index: Traffic control index | 216 | * @tc_index: Traffic control index |
211 | * @tc_verd: traffic control verdict | 217 | * @tc_verd: traffic control verdict |
218 | * @dma_cookie: a cookie to one of several possible DMA operations | ||
219 | * done by skb DMA functions | ||
212 | * @secmark: security marking | 220 | * @secmark: security marking |
213 | */ | 221 | */ |
214 | 222 | ||
@@ -345,7 +353,7 @@ extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, | |||
345 | extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb, | 353 | extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb, |
346 | int newheadroom, int newtailroom, | 354 | int newheadroom, int newtailroom, |
347 | gfp_t priority); | 355 | gfp_t priority); |
348 | extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad); | 356 | extern int skb_pad(struct sk_buff *skb, int pad); |
349 | #define dev_kfree_skb(a) kfree_skb(a) | 357 | #define dev_kfree_skb(a) kfree_skb(a) |
350 | extern void skb_over_panic(struct sk_buff *skb, int len, | 358 | extern void skb_over_panic(struct sk_buff *skb, int len, |
351 | void *here); | 359 | void *here); |
@@ -1122,16 +1130,15 @@ static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) | |||
1122 | * | 1130 | * |
1123 | * Pads up a buffer to ensure the trailing bytes exist and are | 1131 | * Pads up a buffer to ensure the trailing bytes exist and are |
1124 | * blanked. If the buffer already contains sufficient data it | 1132 | * blanked. If the buffer already contains sufficient data it |
1125 | * is untouched. Returns the buffer, which may be a replacement | 1133 | * is untouched. Otherwise it is extended. Returns zero on |
1126 | * for the original, or NULL for out of memory - in which case | 1134 | * success. The skb is freed on error. |
1127 | * the original buffer is still freed. | ||
1128 | */ | 1135 | */ |
1129 | 1136 | ||
1130 | static inline struct sk_buff *skb_padto(struct sk_buff *skb, unsigned int len) | 1137 | static inline int skb_padto(struct sk_buff *skb, unsigned int len) |
1131 | { | 1138 | { |
1132 | unsigned int size = skb->len; | 1139 | unsigned int size = skb->len; |
1133 | if (likely(size >= len)) | 1140 | if (likely(size >= len)) |
1134 | return skb; | 1141 | return 0; |
1135 | return skb_pad(skb, len-size); | 1142 | return skb_pad(skb, len-size); |
1136 | } | 1143 | } |
1137 | 1144 | ||
@@ -1292,6 +1299,7 @@ extern void skb_split(struct sk_buff *skb, | |||
1292 | struct sk_buff *skb1, const u32 len); | 1299 | struct sk_buff *skb1, const u32 len); |
1293 | 1300 | ||
1294 | extern void skb_release_data(struct sk_buff *skb); | 1301 | extern void skb_release_data(struct sk_buff *skb); |
1302 | extern struct sk_buff *skb_segment(struct sk_buff *skb, int sg); | ||
1295 | 1303 | ||
1296 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, | 1304 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, |
1297 | int len, void *buffer) | 1305 | int len, void *buffer) |