Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a1b63d4 authored by Thomas Graf's avatar Thomas Graf Committed by Thomas Graf
Browse files

[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: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
parent 9e178ff2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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;
	}

	if (!red_is_idling(&q->parms))
		red_start_of_idle_period(&q->parms);

	return 0;
}