diff options
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index f93f22b3d2ff..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 |
@@ -1770,6 +1770,15 @@ static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping) | |||
1770 | #endif | 1770 | #endif |
1771 | } | 1771 | } |
1772 | 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 | |||
1773 | 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) |
1774 | { | 1783 | { |
1775 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | 1784 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE |