netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] qdisc_run de inline.
@ 2007-05-30 16:23 Stephen Hemminger
  2007-05-31  8:29 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2007-05-30 16:23 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC] qdisc_run de inline.
  2007-05-30 16:23 [RFC] qdisc_run de inline Stephen Hemminger
@ 2007-05-31  8:29 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-05-31  8:29 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@linux-foundation.org>
Date: Wed, 30 May 2007 09:23:24 -0700

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

This looks fine to me, I'll queue it up for 2.6.23 once I
cut the net-2.6.23 tree.

Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-31  8:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-30 16:23 [RFC] qdisc_run de inline Stephen Hemminger
2007-05-31  8:29 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).