Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Yang Yingliang and committed by
David S. Miller
b2ce49e7 f06c7f9f

+1 -1
+1 -1
net/sched/sch_hhf.c
··· 414 414 } 415 415 bucket->deficit = weight * q->quantum; 416 416 } 417 - if (++sch->q.qlen < sch->limit) 417 + if (++sch->q.qlen <= sch->limit) 418 418 return NET_XMIT_SUCCESS; 419 419 420 420 q->drop_overlimit++;