pkt_sched: Add qdisc_tx_is_noop() helper and use in IPV6.
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / net / sch_generic.h
index bf8f7264a778be4414d647797f73701ab7924f8c..5ba66b555578b2c109aaa47dcefdd59d89d8d6fd 100644 (file)
@@ -250,6 +250,14 @@ static inline bool qdisc_tx_changing(struct net_device *dev)
        return (txq->qdisc != txq->qdisc_sleeping);
 }
 
+/* Is the device using the noop qdisc?  */
+static inline bool qdisc_tx_is_noop(const struct net_device *dev)
+{
+       const struct netdev_queue *txq = &dev->tx_queue;
+
+       return (txq->qdisc == &noop_qdisc);
+}
+
 static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch,
                                       struct sk_buff_head *list)
 {