struct rtattr *tab);
extern void qdisc_put_rtab(struct qdisc_rate_table *tab);
-extern int qdisc_restart(struct net_device *dev);
+extern void __qdisc_run(struct net_device *dev);
static inline void qdisc_run(struct net_device *dev)
{
- while (!netif_queue_stopped(dev) && qdisc_restart(dev) < 0)
- /* NOTHING */;
+ if (!netif_queue_stopped(dev) &&
+ !test_and_set_bit(__LINK_STATE_QDISC_RUNNING, &dev->state))
+ __qdisc_run(dev);
}
extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp,
NOTE: Called under dev->queue_lock with locally disabled BH.
*/
-int qdisc_restart(struct net_device *dev)
+static inline int qdisc_restart(struct net_device *dev)
{
struct Qdisc *q = dev->qdisc;
struct sk_buff *skb;
return q->q.qlen;
}
+void __qdisc_run(struct net_device *dev)
+{
+ while (qdisc_restart(dev) < 0 && !netif_queue_stopped(dev))
+ /* NOTHING */;
+
+ clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);
+}
+
static void dev_watchdog(unsigned long arg)
{
struct net_device *dev = (struct net_device *)arg;
EXPORT_SYMBOL(qdisc_alloc);
EXPORT_SYMBOL(qdisc_destroy);
EXPORT_SYMBOL(qdisc_reset);
-EXPORT_SYMBOL(qdisc_restart);
EXPORT_SYMBOL(qdisc_lock_tree);
EXPORT_SYMBOL(qdisc_unlock_tree);