diff options
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 38501d20650c..c9525bce80f6 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -187,7 +187,6 @@ union skb_shared_tx { | |||
187 | * the end of the header data, ie. at skb->end. | 187 | * the end of the header data, ie. at skb->end. |
188 | */ | 188 | */ |
189 | struct skb_shared_info { | 189 | struct skb_shared_info { |
190 | atomic_t dataref; | ||
191 | unsigned short nr_frags; | 190 | unsigned short nr_frags; |
192 | unsigned short gso_size; | 191 | unsigned short gso_size; |
193 | /* Warning: this field is not always filled in (UFO)! */ | 192 | /* Warning: this field is not always filled in (UFO)! */ |
@@ -197,6 +196,12 @@ struct skb_shared_info { | |||
197 | union skb_shared_tx tx_flags; | 196 | union skb_shared_tx tx_flags; |
198 | struct sk_buff *frag_list; | 197 | struct sk_buff *frag_list; |
199 | struct skb_shared_hwtstamps hwtstamps; | 198 | struct skb_shared_hwtstamps hwtstamps; |
199 | |||
200 | /* | ||
201 | * Warning : all fields before dataref are cleared in __alloc_skb() | ||
202 | */ | ||
203 | atomic_t dataref; | ||
204 | |||
200 | skb_frag_t frags[MAX_SKB_FRAGS]; | 205 | skb_frag_t frags[MAX_SKB_FRAGS]; |
201 | /* Intermediate layers must ensure that destructor_arg | 206 | /* Intermediate layers must ensure that destructor_arg |
202 | * remains valid until skb destructor */ | 207 | * remains valid until skb destructor */ |
@@ -470,10 +475,6 @@ extern int skb_cow_data(struct sk_buff *skb, int tailbits, | |||
470 | struct sk_buff **trailer); | 475 | struct sk_buff **trailer); |
471 | extern int skb_pad(struct sk_buff *skb, int pad); | 476 | extern int skb_pad(struct sk_buff *skb, int pad); |
472 | #define dev_kfree_skb(a) consume_skb(a) | 477 | #define dev_kfree_skb(a) consume_skb(a) |
473 | extern void skb_over_panic(struct sk_buff *skb, int len, | ||
474 | void *here); | ||
475 | extern void skb_under_panic(struct sk_buff *skb, int len, | ||
476 | void *here); | ||
477 | 478 | ||
478 | extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, | 479 | extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, |
479 | int getfrag(void *from, char *to, int offset, | 480 | int getfrag(void *from, char *to, int offset, |
@@ -1132,6 +1133,11 @@ static inline unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len) | |||
1132 | return skb->data += len; | 1133 | return skb->data += len; |
1133 | } | 1134 | } |
1134 | 1135 | ||
1136 | static inline unsigned char *skb_pull_inline(struct sk_buff *skb, unsigned int len) | ||
1137 | { | ||
1138 | return unlikely(len > skb->len) ? NULL : __skb_pull(skb, len); | ||
1139 | } | ||
1140 | |||
1135 | extern unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta); | 1141 | extern unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta); |
1136 | 1142 | ||
1137 | static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len) | 1143 | static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len) |
@@ -1355,9 +1361,12 @@ static inline int skb_network_offset(const struct sk_buff *skb) | |||
1355 | * | 1361 | * |
1356 | * Various parts of the networking layer expect at least 32 bytes of | 1362 | * Various parts of the networking layer expect at least 32 bytes of |
1357 | * headroom, you should not reduce this. | 1363 | * headroom, you should not reduce this. |
1364 | * With RPS, we raised NET_SKB_PAD to 64 so that get_rps_cpus() fetches span | ||
1365 | * a 64 bytes aligned block to fit modern (>= 64 bytes) cache line sizes | ||
1366 | * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) | ||
1358 | */ | 1367 | */ |
1359 | #ifndef NET_SKB_PAD | 1368 | #ifndef NET_SKB_PAD |
1360 | #define NET_SKB_PAD 32 | 1369 | #define NET_SKB_PAD 64 |
1361 | #endif | 1370 | #endif |
1362 | 1371 | ||
1363 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); | 1372 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); |