summaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorPavel Emelyanov2007-10-22 02:01:29 +0200
committerDavid S. Miller2007-10-22 11:59:56 +0200
commit4e3ab47a547616e583c7a5458beced6aa34c8ef3 (patch)
treeb889a8a472c657f706f91c4831c2fd5ee19f6a4e /include/linux/skbuff.h
parent[NET]: Use the skb_set_queue_mapping where appropriate (diff)
downloadkernel-qcow2-linux-4e3ab47a547616e583c7a5458beced6aa34c8ef3.tar.gz
kernel-qcow2-linux-4e3ab47a547616e583c7a5458beced6aa34c8ef3.tar.xz
kernel-qcow2-linux-4e3ab47a547616e583c7a5458beced6aa34c8ef3.zip
[NET]: Make and use skb_get_queue_mapping
Make the helper for getting the field, symmetrical to the "set" one. Return 0 if CONFIG_NETDEVICES_MULTIQUEUE=n Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 369f60a4797d..ecb0edef0b39 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1769,6 +1769,15 @@ static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping)
#endif
}
+static inline u16 skb_get_queue_mapping(struct sk_buff *skb)
+{
+#ifdef CONFIG_NETDEVICES_MULTIQUEUE
+ return skb->queue_mapping;
+#else
+ return 0;
+#endif
+}
+
static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_buff *from)
{
#ifdef CONFIG_NETDEVICES_MULTIQUEUE