diff options
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r-- | include/net/sch_generic.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index ea33176616ff..8cfdaebbbab3 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -233,6 +233,15 @@ static inline void qdisc_reset_all_tx(struct net_device *dev) | |||
233 | qdisc_reset(dev->tx_queue.qdisc); | 233 | qdisc_reset(dev->tx_queue.qdisc); |
234 | } | 234 | } |
235 | 235 | ||
236 | /* Are all TX queues of the device empty? */ | ||
237 | static inline bool qdisc_all_tx_empty(const struct net_device *dev) | ||
238 | { | ||
239 | const struct netdev_queue *txq = &dev->tx_queue; | ||
240 | const struct Qdisc *q = txq->qdisc; | ||
241 | |||
242 | return (q->q.qlen == 0); | ||
243 | } | ||
244 | |||
236 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | 245 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, |
237 | struct sk_buff_head *list) | 246 | struct sk_buff_head *list) |
238 | { | 247 | { |