diff options
author | Thomas Graf <tgraf@suug.ch> | 2005-11-05 15:14:07 -0500 |
---|---|---|
committer | Thomas Graf <tgr@axs.localdomain> | 2005-11-05 16:02:25 -0500 |
commit | 6a1b63d467281eb6bd64aafbbf6130a1b42c8c2e (patch) | |
tree | 7137eda1a0d3ca6d6e6538cb0d2fb177b97bfb7f /net | |
parent | 9e178ff27cd9187babe86dc80ef766b722c88da6 (diff) |
[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 <tgraf@suug.ch>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/sch_red.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c index d5e934c33f96..76e8df8447d9 100644 --- a/net/sched/sch_red.c +++ b/net/sched/sch_red.c | |||
@@ -135,7 +135,7 @@ red_dequeue(struct Qdisc* sch) | |||
135 | 135 | ||
136 | skb = qdisc_dequeue_head(sch); | 136 | skb = qdisc_dequeue_head(sch); |
137 | 137 | ||
138 | if (skb == NULL) | 138 | if (skb == NULL && !red_is_idling(&q->parms)) |
139 | red_start_of_idle_period(&q->parms); | 139 | red_start_of_idle_period(&q->parms); |
140 | 140 | ||
141 | return skb; | 141 | return skb; |
@@ -154,7 +154,9 @@ static unsigned int red_drop(struct Qdisc* sch) | |||
154 | return len; | 154 | return len; |
155 | } | 155 | } |
156 | 156 | ||
157 | red_start_of_idle_period(&q->parms); | 157 | if (!red_is_idling(&q->parms)) |
158 | red_start_of_idle_period(&q->parms); | ||
159 | |||
158 | return 0; | 160 | return 0; |
159 | } | 161 | } |
160 | 162 | ||