From: Yang Yingliang Date: Fri, 9 May 2014 08:49:05 +0000 (+0800) Subject: sch_hhf: fix comparison of qlen and limit X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b2ce49e7375ff5b9b133c474875dfbd97ef00ef7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git sch_hhf: fix comparison of qlen and limit When I use the following command, eth0 cannot send any packets. #tc qdisc add dev eth0 root handle 1: hhf limit 1 Because qlen need be smaller than limit, all packets were dropped. Fix this by qlen *<=* limit. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_hhf.c b/net/sched/sch_hhf.c index 6e957c3b9854..6aab8619bbb0 100644 --- a/net/sched/sch_hhf.c +++ b/net/sched/sch_hhf.c @@ -414,7 +414,7 @@ static int hhf_enqueue(struct sk_buff *skb, struct Qdisc *sch) } bucket->deficit = weight * q->quantum; } - if (++sch->q.qlen < sch->limit) + if (++sch->q.qlen <= sch->limit) return NET_XMIT_SUCCESS; q->drop_overlimit++;