diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-09 02:01:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-09 02:01:27 -0400 |
commit | 052979499c767268b912d25031ae524c451679d0 (patch) | |
tree | 0873da6b42fb8a8b7cdcd033fced0f50731fd824 /include/net/sch_generic.h | |
parent | 6fa9864b53f0680e432a2c431c2cf2055daa3a88 (diff) |
pkt_sched: Add qdisc_tx_is_noop() helper and use in IPV6.
This indicates if the NOOP scheduler is what is active for TX on a
given device.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sch_generic.h')
-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 bf8f7264a778..5ba66b555578 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -250,6 +250,14 @@ static inline bool qdisc_tx_changing(struct net_device *dev) | |||
250 | return (txq->qdisc != txq->qdisc_sleeping); | 250 | return (txq->qdisc != txq->qdisc_sleeping); |
251 | } | 251 | } |
252 | 252 | ||
253 | /* Is the device using the noop qdisc? */ | ||
254 | static inline bool qdisc_tx_is_noop(const struct net_device *dev) | ||
255 | { | ||
256 | const struct netdev_queue *txq = &dev->tx_queue; | ||
257 | |||
258 | return (txq->qdisc == &noop_qdisc); | ||
259 | } | ||
260 | |||
253 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | 261 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, |
254 | struct sk_buff_head *list) | 262 | struct sk_buff_head *list) |
255 | { | 263 | { |