diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-27 07:15:30 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-27 07:15:30 -0700 |
| commit | a7bdf7fa33127bf08eb0810698bca607a9462df4 (patch) | |
| tree | 2f4be686e49710d10cc4f5ebc2d5f06ae030b9bd /include/net/codel.h | |
| parent | 7fda953ffed1b94aa68f80c6c3ab312328aedcb3 (diff) | |
| parent | fea7a08acb13524b47711625eebea40a0ede69a0 (diff) | |
Merge v3.6-rc3 into usb-next
This picks up fixes that we need in this branch for testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net/codel.h')
| -rw-r--r-- | include/net/codel.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/net/codel.h b/include/net/codel.h index 550debfc240..389cf621161 100644 --- a/include/net/codel.h +++ b/include/net/codel.h @@ -305,6 +305,8 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch, } } } else if (drop) { + u32 delta; + if (params->ecn && INET_ECN_set_ce(skb)) { stats->ecn_mark++; } else { @@ -320,9 +322,11 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch, * assume that the drop rate that controlled the queue on the * last cycle is a good starting point to control it now. */ - if (codel_time_before(now - vars->drop_next, + delta = vars->count - vars->lastcount; + if (delta > 1 && + codel_time_before(now - vars->drop_next, 16 * params->interval)) { - vars->count = (vars->count - vars->lastcount) | 1; + vars->count = delta; /* we dont care if rec_inv_sqrt approximation * is not very precise : * Next Newton steps will correct it quadratically. |
