summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorVijay Subramanian <subramanian.vijay@gmail.com>2013-03-28 14:52:00 +0100
committerDavid S. Miller <davem@davemloft.net>2013-03-29 20:32:23 +0100
commitcd68ddd4c29ab523440299f24ff2417fe7a0dca6 (patch)
tree3d7adbca63406cef077fd4dcf6ce4a6c6e1d3cdb /net/sched
parentnet: calxedaxgmac: Wake-on-LAN fixes (diff)
downloadlinux-cd68ddd4c29ab523440299f24ff2417fe7a0dca6.tar.xz
linux-cd68ddd4c29ab523440299f24ff2417fe7a0dca6.zip
net: fq_codel: Fix off-by-one error
Currently, we hold a max of sch->limit -1 number of packets instead of sch->limit packets. Fix this off-by-one error. Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_fq_codel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index 4e606fcb2534..55786283a3df 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -195,7 +195,7 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch)
flow->deficit = q->quantum;
flow->dropped = 0;
}
- if (++sch->q.qlen < sch->limit)
+ if (++sch->q.qlen <= sch->limit)
return NET_XMIT_SUCCESS;
q->drop_overlimit++;