From: Pavel Emelyanov Date: Mon, 22 Oct 2007 00:01:29 +0000 (-0700) Subject: [NET]: Make and use skb_get_queue_mapping X-Git-Tag: v2.6.24-rc1~62^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e3ab47a547616e583c7a5458beced6aa34c8ef3;p=linux-2.6 [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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c index ed53aaab4c..ae41973615 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c @@ -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 diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 369f60a479..ecb0edef0b 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 diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c index be57cf317a..a9fad7162b 100644 --- a/net/sched/sch_teql.c +++ b/net/sched/sch_teql.c @@ -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;