Browse Source

[PKT_SCHED]: GRED: Fix restart of idle period in WRED mode upon dequeue and drop

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Thomas Graf 19 years ago
parent
commit
d8f64e1960
1 changed files with 2 additions and 2 deletions
  1. 2 2
      net/sched/sch_gred.c

+ 2 - 2
net/sched/sch_gred.c

@@ -267,7 +267,7 @@ static struct sk_buff *gred_dequeue(struct Qdisc* sch)
 		return skb;
 		return skb;
 	}
 	}
 
 
-	if (gred_wred_mode(t))
+	if (gred_wred_mode(t) && !red_is_idling(&t->wred_set))
 		red_start_of_idle_period(&t->wred_set);
 		red_start_of_idle_period(&t->wred_set);
 
 
 	return NULL;
 	return NULL;
@@ -301,7 +301,7 @@ static unsigned int gred_drop(struct Qdisc* sch)
 		return len;
 		return len;
 	}
 	}
 
 
-	if (gred_wred_mode(t))
+	if (gred_wred_mode(t) && !red_is_idling(&t->wred_set))
 		red_start_of_idle_period(&t->wred_set);
 		red_start_of_idle_period(&t->wred_set);
 
 
 	return 0;
 	return 0;