netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netem: restart device after inserting packets
@ 2004-12-08 20:31 Stephen Hemminger
  2004-12-09  5:00 ` David S. Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Hemminger @ 2004-12-08 20:31 UTC (permalink / raw)
  To: David S. Miller; +Cc: netem, netdev

The version of netem in 2.6.10 moves packets from the delayed queue
to the qdisc in a timer interrupt. But it forgot to force the device to
pick them up.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c
--- a/net/sched/sch_netem.c	2004-12-08 12:29:12 -08:00
+++ b/net/sched/sch_netem.c	2004-12-08 12:29:12 -08:00
@@ -258,12 +258,13 @@
 {
 	struct Qdisc *sch = (struct Qdisc *)arg;
 	struct netem_sched_data *q = qdisc_priv(sch);
+	struct net_device *dev = sch->dev;
 	struct sk_buff *skb;
 	psched_time_t now;
 
 	pr_debug("netem_watchdog: fired @%lu\n", jiffies);
 
-	spin_lock_bh(&sch->dev->queue_lock);
+	spin_lock_bh(&dev->queue_lock);
 	PSCHED_GET_TIME(now);
 
 	while ((skb = skb_peek(&q->delayed)) != NULL) {
@@ -286,7 +287,8 @@
 		else
 			sch->q.qlen++;
 	}
-	spin_unlock_bh(&sch->dev->queue_lock);
+	qdisc_restart(dev);
+	spin_unlock_bh(&dev->queue_lock);
 }
 
 static void netem_reset(struct Qdisc *sch)

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

end of thread, other threads:[~2004-12-20 23:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-08 20:31 [PATCH] netem: restart device after inserting packets Stephen Hemminger
2004-12-09  5:00 ` David S. Miller
2004-12-10  3:33   ` Patrick McHardy
2004-12-13 19:08     ` Stephen Hemminger
2004-12-14 19:32     ` David S. Miller
2004-12-14 21:11       ` Stephen Hemminger
2004-12-20 23:43         ` David S. 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).