mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
[NET_SCHED]: sch_htb: fix event cache time calculation
The event cache time must be an absolute value, when no event exists it is incorrectly set to 1s instead of 1s in the future. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1b07a95a5b
commit
2e4b3b0e87
1 changed files with 3 additions and 2 deletions
|
@ -976,8 +976,9 @@ static struct sk_buff *htb_dequeue(struct Qdisc *sch)
|
||||||
|
|
||||||
if (q->now >= q->near_ev_cache[level]) {
|
if (q->now >= q->near_ev_cache[level]) {
|
||||||
event = htb_do_events(q, level);
|
event = htb_do_events(q, level);
|
||||||
q->near_ev_cache[level] = event ? event :
|
if (!event)
|
||||||
PSCHED_TICKS_PER_SEC;
|
event = q->now + PSCHED_TICKS_PER_SEC;
|
||||||
|
q->near_ev_cache[level] = event;
|
||||||
} else
|
} else
|
||||||
event = q->near_ev_cache[level];
|
event = q->near_ev_cache[level];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue