diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-09 02:01:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-09 02:01:06 -0400 |
commit | 6fa9864b53f0680e432a2c431c2cf2055daa3a88 (patch) | |
tree | 77e6964f84775d5f2ee152c249ee26aa326df4ac /include | |
parent | 3e745dd6950d72d19e4cb30dc44307e8d6671864 (diff) |
net: Clean up explicit ->tx_queue references in link watch.
First, we add a qdisc_tx_changing() helper which returns true if the
qdisc attachment is in transition.
Second, we remove an assertion warning which is of limited value and
is hard to express precisely in a multiqueue environment.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/sch_generic.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 8cfdaebbbab3..bf8f7264a778 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -242,6 +242,14 @@ static inline bool qdisc_all_tx_empty(const struct net_device *dev) | |||
242 | return (q->q.qlen == 0); | 242 | return (q->q.qlen == 0); |
243 | } | 243 | } |
244 | 244 | ||
245 | /* Are any of the TX qdiscs changing? */ | ||
246 | static inline bool qdisc_tx_changing(struct net_device *dev) | ||
247 | { | ||
248 | struct netdev_queue *txq = &dev->tx_queue; | ||
249 | |||
250 | return (txq->qdisc != txq->qdisc_sleeping); | ||
251 | } | ||
252 | |||
245 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | 253 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, |
246 | struct sk_buff_head *list) | 254 | struct sk_buff_head *list) |
247 | { | 255 | { |