It isn't worth inlining qdisc_run, into two parts. The code is
cleaner (and smaller) to just have it as one routine.

--- a/include/net/pkt_sched.h   2007-05-02 12:26:34.000000000 -0700
+++ b/include/net/pkt_sched.h   2007-05-30 09:12:22.000000000 -0700
@@ -80,14 +80,7 @@ extern struct qdisc_rate_table *qdisc_ge
                struct rtattr *tab);
 extern void qdisc_put_rtab(struct qdisc_rate_table *tab);
 
-extern void __qdisc_run(struct net_device *dev);
-
-static inline void qdisc_run(struct net_device *dev)
-{
-       if (!netif_queue_stopped(dev) &&
-           !test_and_set_bit(__LINK_STATE_QDISC_RUNNING, &dev->state))
-               __qdisc_run(dev);
-}
+extern void qdisc_run(struct net_device *dev);
 
 extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp,
        struct tcf_result *res);
--- a/net/sched/sch_generic.c   2007-05-29 08:14:38.000000000 -0700
+++ b/net/sched/sch_generic.c   2007-05-30 09:14:08.000000000 -0700
@@ -177,14 +177,16 @@ out:
        return q->q.qlen;
 }
 
-void __qdisc_run(struct net_device *dev)
+void qdisc_run(struct net_device *dev)
 {
-       do {
-               if (!qdisc_restart(dev))
-                       break;
-       } while (!netif_queue_stopped(dev));
+       if (!test_and_set_bit(__LINK_STATE_QDISC_RUNNING, &dev->state)) {
+               while (!netif_queue_stopped(dev)) {
+                       if (!qdisc_restart(dev))
+                               break;
+               }
 
-       clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);
+               clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);
+       }
 }
 
 static void dev_watchdog(unsigned long arg)
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to