aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 85577a4ffa61..14ec16d2d9ba 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -139,7 +139,7 @@ struct skb_shared_info {
139 /* Warning: this field is not always filled in (UFO)! */ 139 /* Warning: this field is not always filled in (UFO)! */
140 unsigned short gso_segs; 140 unsigned short gso_segs;
141 unsigned short gso_type; 141 unsigned short gso_type;
142 unsigned int ip6_frag_id; 142 __be32 ip6_frag_id;
143 struct sk_buff *frag_list; 143 struct sk_buff *frag_list;
144 skb_frag_t frags[MAX_SKB_FRAGS]; 144 skb_frag_t frags[MAX_SKB_FRAGS];
145}; 145};
@@ -216,7 +216,7 @@ enum {
216 * @tail: Tail pointer 216 * @tail: Tail pointer
217 * @end: End pointer 217 * @end: End pointer
218 * @destructor: Destruct function 218 * @destructor: Destruct function
219 * @nfmark: Can be used for communication between hooks 219 * @mark: Generic packet mark
220 * @nfct: Associated connection, if any 220 * @nfct: Associated connection, if any
221 * @ipvs_property: skbuff is owned by ipvs 221 * @ipvs_property: skbuff is owned by ipvs
222 * @nfctinfo: Relationship of this skb to the connection 222 * @nfctinfo: Relationship of this skb to the connection
@@ -273,8 +273,11 @@ struct sk_buff {
273 273
274 unsigned int len, 274 unsigned int len,
275 data_len, 275 data_len,
276 mac_len, 276 mac_len;
277 csum; 277 union {
278 __wsum csum;
279 __u32 csum_offset;
280 };
278 __u32 priority; 281 __u32 priority;
279 __u8 local_df:1, 282 __u8 local_df:1,
280 cloned:1, 283 cloned:1,
@@ -295,7 +298,6 @@ struct sk_buff {
295#ifdef CONFIG_BRIDGE_NETFILTER 298#ifdef CONFIG_BRIDGE_NETFILTER
296 struct nf_bridge_info *nf_bridge; 299 struct nf_bridge_info *nf_bridge;
297#endif 300#endif
298 __u32 nfmark;
299#endif /* CONFIG_NETFILTER */ 301#endif /* CONFIG_NETFILTER */
300#ifdef CONFIG_NET_SCHED 302#ifdef CONFIG_NET_SCHED
301 __u16 tc_index; /* traffic control index */ 303 __u16 tc_index; /* traffic control index */
@@ -310,6 +312,7 @@ struct sk_buff {
310 __u32 secmark; 312 __u32 secmark;
311#endif 313#endif
312 314
315 __u32 mark;
313 316
314 /* These elements must be at the end, see alloc_skb() for details. */ 317 /* These elements must be at the end, see alloc_skb() for details. */
315 unsigned int truesize; 318 unsigned int truesize;
@@ -1199,8 +1202,7 @@ static inline int skb_add_data(struct sk_buff *skb,
1199 1202
1200 if (skb->ip_summed == CHECKSUM_NONE) { 1203 if (skb->ip_summed == CHECKSUM_NONE) {
1201 int err = 0; 1204 int err = 0;
1202 unsigned int csum = csum_and_copy_from_user(from, 1205 __wsum csum = csum_and_copy_from_user(from, skb_put(skb, copy),
1203 skb_put(skb, copy),
1204 copy, 0, &err); 1206 copy, 0, &err);
1205 if (!err) { 1207 if (!err) {
1206 skb->csum = csum_block_add(skb->csum, csum, off); 1208 skb->csum = csum_block_add(skb->csum, csum, off);
@@ -1335,15 +1337,15 @@ extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb,
1335extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); 1337extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb);
1336extern void skb_kill_datagram(struct sock *sk, struct sk_buff *skb, 1338extern void skb_kill_datagram(struct sock *sk, struct sk_buff *skb,
1337 unsigned int flags); 1339 unsigned int flags);
1338extern unsigned int skb_checksum(const struct sk_buff *skb, int offset, 1340extern __wsum skb_checksum(const struct sk_buff *skb, int offset,
1339 int len, unsigned int csum); 1341 int len, __wsum csum);
1340extern int skb_copy_bits(const struct sk_buff *skb, int offset, 1342extern int skb_copy_bits(const struct sk_buff *skb, int offset,
1341 void *to, int len); 1343 void *to, int len);
1342extern int skb_store_bits(const struct sk_buff *skb, int offset, 1344extern int skb_store_bits(const struct sk_buff *skb, int offset,
1343 void *from, int len); 1345 void *from, int len);
1344extern unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb, 1346extern __wsum skb_copy_and_csum_bits(const struct sk_buff *skb,
1345 int offset, u8 *to, int len, 1347 int offset, u8 *to, int len,
1346 unsigned int csum); 1348 __wsum csum);
1347extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); 1349extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to);
1348extern void skb_split(struct sk_buff *skb, 1350extern void skb_split(struct sk_buff *skb,
1349 struct sk_buff *skb1, const u32 len); 1351 struct sk_buff *skb1, const u32 len);
@@ -1399,7 +1401,7 @@ static inline void skb_set_timestamp(struct sk_buff *skb, const struct timeval *
1399 1401
1400extern void __net_timestamp(struct sk_buff *skb); 1402extern void __net_timestamp(struct sk_buff *skb);
1401 1403
1402extern unsigned int __skb_checksum_complete(struct sk_buff *skb); 1404extern __sum16 __skb_checksum_complete(struct sk_buff *skb);
1403 1405
1404/** 1406/**
1405 * skb_checksum_complete - Calculate checksum of an entire packet 1407 * skb_checksum_complete - Calculate checksum of an entire packet