Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd68ddd4 authored by Vijay Subramanian's avatar Vijay Subramanian Committed by David S. Miller
Browse files

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: default avatarVijay Subramanian <subramanian.vijay@gmail.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e6c3827d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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++;