From: Thomas Graf Date: Sat, 5 Nov 2005 20:14:07 +0000 (+0100) Subject: [PKT_SCHED]: RED: Dont start idle periods while already idling X-Git-Tag: v2.6.15-rc1~452^2^2~21 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a1b63d467281eb6bd64aafbbf6130a1b42c8c2e;p=linux-2.6 [PKT_SCHED]: RED: Dont start idle periods while already idling We should not interrupt and restart an idle period while idling already. Signed-off-by: Thomas Graf Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c index d5e934c33f..76e8df8447 100644 --- a/net/sched/sch_red.c +++ b/net/sched/sch_red.c @@ -135,7 +135,7 @@ red_dequeue(struct Qdisc* sch) skb = qdisc_dequeue_head(sch); - if (skb == NULL) + if (skb == NULL && !red_is_idling(&q->parms)) red_start_of_idle_period(&q->parms); return skb; @@ -154,7 +154,9 @@ static unsigned int red_drop(struct Qdisc* sch) return len; } - red_start_of_idle_period(&q->parms); + if (!red_is_idling(&q->parms)) + red_start_of_idle_period(&q->parms); + return 0; }