aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_hhf.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2014-05-09 04:49:05 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-12 14:55:21 -0400
commitb2ce49e7375ff5b9b133c474875dfbd97ef00ef7 (patch)
treee1c5b1a6c071392ac646e74b5c29bb30f649628c /net/sched/sch_hhf.c
parentf06c7f9f92295faf701a9628b383156c4efb6119 (diff)
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 <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_hhf.c')
-rw-r--r--net/sched/sch_hhf.c2
1 files changed, 1 insertions, 1 deletions
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)
414 } 414 }
415 bucket->deficit = weight * q->quantum; 415 bucket->deficit = weight * q->quantum;
416 } 416 }
417 if (++sch->q.qlen < sch->limit) 417 if (++sch->q.qlen <= sch->limit)
418 return NET_XMIT_SUCCESS; 418 return NET_XMIT_SUCCESS;
419 419
420 q->drop_overlimit++; 420 q->drop_overlimit++;