diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-17 23:26:44 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-17 23:26:44 +0100 |
commit | 6bf6d1af86e7dec914f7916f2a00910650a73469 (patch) | |
tree | 7fb14c7fce10a9f3e5c48f49941b8642562017ec /include/net/codel.h | |
parent | 45a690f6bcd5506d9988d0d069811ac9380750ad (diff) | |
parent | 63f49dce39e5d6a19e5f1f9004eb48e73ba259e8 (diff) | |
download | linux-rt-6bf6d1af86e7dec914f7916f2a00910650a73469.tar.gz |
Merge remote-tracking branch 'asoc/topic/blackfin' into for-3.7
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 550debfc2403..389cf621161d 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. |