From b16738583f470ac5b396c709865f27e167b5e406 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Sun, 29 Jul 2012 20:52:21 +0000 Subject: [PATCH] --- yaml --- r: 321596 b: refs/heads/master c: 2359a47671fc4fb0fe5e9945f76c2cb10792c0f8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/codel.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index b49ae1a63369..f34e6b8e6f61 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 55461ddbcb0b36d1575e01fb4f130c609ca1cfee +refs/heads/master: 2359a47671fc4fb0fe5e9945f76c2cb10792c0f8 diff --git a/trunk/include/net/codel.h b/trunk/include/net/codel.h index 550debfc2403..389cf621161d 100644 --- a/trunk/include/net/codel.h +++ b/trunk/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.