diff options
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index a656cecd373c..fd4e12f24270 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -41,8 +41,7 @@ | |||
41 | #define SKB_DATA_ALIGN(X) (((X) + (SMP_CACHE_BYTES - 1)) & \ | 41 | #define SKB_DATA_ALIGN(X) (((X) + (SMP_CACHE_BYTES - 1)) & \ |
42 | ~(SMP_CACHE_BYTES - 1)) | 42 | ~(SMP_CACHE_BYTES - 1)) |
43 | #define SKB_WITH_OVERHEAD(X) \ | 43 | #define SKB_WITH_OVERHEAD(X) \ |
44 | (((X) - sizeof(struct skb_shared_info)) & \ | 44 | ((X) - SKB_DATA_ALIGN(sizeof(struct skb_shared_info))) |
45 | ~(SMP_CACHE_BYTES - 1)) | ||
46 | #define SKB_MAX_ORDER(X, ORDER) \ | 45 | #define SKB_MAX_ORDER(X, ORDER) \ |
47 | SKB_WITH_OVERHEAD((PAGE_SIZE << (ORDER)) - (X)) | 46 | SKB_WITH_OVERHEAD((PAGE_SIZE << (ORDER)) - (X)) |
48 | #define SKB_MAX_HEAD(X) (SKB_MAX_ORDER((X), 0)) | 47 | #define SKB_MAX_HEAD(X) (SKB_MAX_ORDER((X), 0)) |
@@ -301,8 +300,9 @@ struct sk_buff { | |||
301 | #endif | 300 | #endif |
302 | 301 | ||
303 | int iif; | 302 | int iif; |
303 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
304 | __u16 queue_mapping; | 304 | __u16 queue_mapping; |
305 | 305 | #endif | |
306 | #ifdef CONFIG_NET_SCHED | 306 | #ifdef CONFIG_NET_SCHED |
307 | __u16 tc_index; /* traffic control index */ | 307 | __u16 tc_index; /* traffic control index */ |
308 | #ifdef CONFIG_NET_CLS_ACT | 308 | #ifdef CONFIG_NET_CLS_ACT |
@@ -357,6 +357,7 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size, | |||
357 | } | 357 | } |
358 | 358 | ||
359 | extern void kfree_skbmem(struct sk_buff *skb); | 359 | extern void kfree_skbmem(struct sk_buff *skb); |
360 | extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); | ||
360 | extern struct sk_buff *skb_clone(struct sk_buff *skb, | 361 | extern struct sk_buff *skb_clone(struct sk_buff *skb, |
361 | gfp_t priority); | 362 | gfp_t priority); |
362 | extern struct sk_buff *skb_copy(const struct sk_buff *skb, | 363 | extern struct sk_buff *skb_copy(const struct sk_buff *skb, |
@@ -1769,6 +1770,15 @@ static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping) | |||
1769 | #endif | 1770 | #endif |
1770 | } | 1771 | } |
1771 | 1772 | ||
1773 | static inline u16 skb_get_queue_mapping(struct sk_buff *skb) | ||
1774 | { | ||
1775 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
1776 | return skb->queue_mapping; | ||
1777 | #else | ||
1778 | return 0; | ||
1779 | #endif | ||
1780 | } | ||
1781 | |||
1772 | static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_buff *from) | 1782 | static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_buff *from) |
1773 | { | 1783 | { |
1774 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | 1784 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE |
@@ -1781,6 +1791,11 @@ static inline int skb_is_gso(const struct sk_buff *skb) | |||
1781 | return skb_shinfo(skb)->gso_size; | 1791 | return skb_shinfo(skb)->gso_size; |
1782 | } | 1792 | } |
1783 | 1793 | ||
1794 | static inline int skb_is_gso_v6(const struct sk_buff *skb) | ||
1795 | { | ||
1796 | return skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6; | ||
1797 | } | ||
1798 | |||
1784 | static inline void skb_forward_csum(struct sk_buff *skb) | 1799 | static inline void skb_forward_csum(struct sk_buff *skb) |
1785 | { | 1800 | { |
1786 | /* Unfortunately we don't support this one. Any brave souls? */ | 1801 | /* Unfortunately we don't support this one. Any brave souls? */ |