diff options
| author | Ingo Molnar <mingo@kernel.org> | 2012-04-25 08:59:16 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2012-04-25 08:59:16 +0200 |
| commit | 3dbe927b1eddcbd66da1653168e33122aca84f4e (patch) | |
| tree | 2357f4c55156597b1d07b9ea360b07086cd011e4 /include/linux/skbuff.h | |
| parent | a385ec4f11bdcf81af094c03e2444ee9b7fad2e5 (diff) | |
| parent | 66f75a5d028beaf67c931435fdc3e7823125730c (diff) | |
| download | linux-next-3dbe927b1eddcbd66da1653168e33122aca84f4e.tar.gz linux-next-3dbe927b1eddcbd66da1653168e33122aca84f4e.zip | |
Merge tag 'v3.4-rc4' into perf/core
Merge v3.4-rc4 - we were on -rc2 before.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/skbuff.h')
| -rw-r--r-- | include/linux/skbuff.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 33370271b8b2..70a3f8d49118 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -481,6 +481,7 @@ struct sk_buff { union { __u32 mark; __u32 dropcount; + __u32 avail_size; }; sk_buff_data_t transport_header; @@ -1366,6 +1367,18 @@ static inline int skb_tailroom(const struct sk_buff *skb) } /** + * skb_availroom - bytes at buffer end + * @skb: buffer to check + * + * Return the number of bytes of free space at the tail of an sk_buff + * allocated by sk_stream_alloc() + */ +static inline int skb_availroom(const struct sk_buff *skb) +{ + return skb_is_nonlinear(skb) ? 0 : skb->avail_size - skb->len; +} + +/** * skb_reserve - adjust headroom * @skb: buffer to alter * @len: bytes to move |
