Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321596
b: refs/heads/master
c: 2359a47
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Aug 10, 2012
1 parent 7341353 commit b167385
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55461ddbcb0b36d1575e01fb4f130c609ca1cfee
refs/heads/master: 2359a47671fc4fb0fe5e9945f76c2cb10792c0f8
8 changes: 6 additions & 2 deletions trunk/include/net/codel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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.
Expand Down

0 comments on commit b167385

Please sign in to comment.