]> err.no Git - linux-2.6/commitdiff
[NET]: Make and use skb_get_queue_mapping
authorPavel Emelyanov <xemul@openvz.org>
Mon, 22 Oct 2007 00:01:29 +0000 (17:01 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 22 Oct 2007 09:59:56 +0000 (02:59 -0700)
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>
drivers/net/cpmac.c
include/linux/skbuff.h
net/sched/sch_teql.c

index ed53aaab4c027a209d90a0b337d8e36bc3bd15c7..ae419736158eda973e556c81fa1be8c586947503 100644 (file)
@@ -471,7 +471,7 @@ static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev)
        }
 
        len = max(skb->len, ETH_ZLEN);
-       queue = skb->queue_mapping;
+       queue = skb_get_queue_mapping(skb);
 #ifdef CONFIG_NETDEVICES_MULTIQUEUE
        netif_stop_subqueue(dev, queue);
 #else
index 369f60a4797d3e7664042184575683611ddca617..ecb0edef0b398bba4437b65b42072acc5ba3c64a 100644 (file)
@@ -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
index be57cf317a7f0dfdaae0b09f2504346e6ba107d8..a9fad7162b5d1256a4ae9deb335312f2bbc5b761 100644 (file)
@@ -266,7 +266,7 @@ static int teql_master_xmit(struct sk_buff *skb, struct net_device *dev)
        int busy;
        int nores;
        int len = skb->len;
-       int subq = skb->queue_mapping;
+       int subq = skb_get_queue_mapping(skb);
        struct sk_buff *skb_res = NULL;
 
        start = master->slaves;