diff options
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 33370271b8b2..111f26b6e28b 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -238,11 +238,12 @@ enum { | |||
238 | /* | 238 | /* |
239 | * The callback notifies userspace to release buffers when skb DMA is done in | 239 | * The callback notifies userspace to release buffers when skb DMA is done in |
240 | * lower device, the skb last reference should be 0 when calling this. | 240 | * lower device, the skb last reference should be 0 when calling this. |
241 | * The desc is used to track userspace buffer index. | 241 | * The ctx field is used to track device context. |
242 | * The desc field is used to track userspace buffer index. | ||
242 | */ | 243 | */ |
243 | struct ubuf_info { | 244 | struct ubuf_info { |
244 | void (*callback)(void *); | 245 | void (*callback)(struct ubuf_info *); |
245 | void *arg; | 246 | void *ctx; |
246 | unsigned long desc; | 247 | unsigned long desc; |
247 | }; | 248 | }; |
248 | 249 | ||
@@ -481,6 +482,7 @@ struct sk_buff { | |||
481 | union { | 482 | union { |
482 | __u32 mark; | 483 | __u32 mark; |
483 | __u32 dropcount; | 484 | __u32 dropcount; |
485 | __u32 avail_size; | ||
484 | }; | 486 | }; |
485 | 487 | ||
486 | sk_buff_data_t transport_header; | 488 | sk_buff_data_t transport_header; |
@@ -1018,7 +1020,7 @@ static inline void skb_queue_splice(const struct sk_buff_head *list, | |||
1018 | } | 1020 | } |
1019 | 1021 | ||
1020 | /** | 1022 | /** |
1021 | * skb_queue_splice - join two skb lists and reinitialise the emptied list | 1023 | * skb_queue_splice_init - join two skb lists and reinitialise the emptied list |
1022 | * @list: the new list to add | 1024 | * @list: the new list to add |
1023 | * @head: the place to add it in the first list | 1025 | * @head: the place to add it in the first list |
1024 | * | 1026 | * |
@@ -1049,7 +1051,7 @@ static inline void skb_queue_splice_tail(const struct sk_buff_head *list, | |||
1049 | } | 1051 | } |
1050 | 1052 | ||
1051 | /** | 1053 | /** |
1052 | * skb_queue_splice_tail - join two skb lists and reinitialise the emptied list | 1054 | * skb_queue_splice_tail_init - join two skb lists and reinitialise the emptied list |
1053 | * @list: the new list to add | 1055 | * @list: the new list to add |
1054 | * @head: the place to add it in the first list | 1056 | * @head: the place to add it in the first list |
1055 | * | 1057 | * |
@@ -1366,6 +1368,18 @@ static inline int skb_tailroom(const struct sk_buff *skb) | |||
1366 | } | 1368 | } |
1367 | 1369 | ||
1368 | /** | 1370 | /** |
1371 | * skb_availroom - bytes at buffer end | ||
1372 | * @skb: buffer to check | ||
1373 | * | ||
1374 | * Return the number of bytes of free space at the tail of an sk_buff | ||
1375 | * allocated by sk_stream_alloc() | ||
1376 | */ | ||
1377 | static inline int skb_availroom(const struct sk_buff *skb) | ||
1378 | { | ||
1379 | return skb_is_nonlinear(skb) ? 0 : skb->avail_size - skb->len; | ||
1380 | } | ||
1381 | |||
1382 | /** | ||
1369 | * skb_reserve - adjust headroom | 1383 | * skb_reserve - adjust headroom |
1370 | * @skb: buffer to alter | 1384 | * @skb: buffer to alter |
1371 | * @len: bytes to move | 1385 | * @len: bytes to move |