lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 May 2007 09:23:24 -0700
From:	Stephen Hemminger <shemminger@...ux-foundation.org>
To:	"David S. Miller" <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: [RFC] qdisc_run de inline.

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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists