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

Commit b2ce49e7 authored by Yang Yingliang's avatar Yang Yingliang Committed by David S. Miller
Browse files

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: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f06c7f9f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -414,7 +414,7 @@ static int hhf_enqueue(struct sk_buff *skb, struct Qdisc *sch)
		}
		}
		bucket->deficit = weight * q->quantum;
		bucket->deficit = weight * q->quantum;
	}
	}
	if (++sch->q.qlen < sch->limit)
	if (++sch->q.qlen <= sch->limit)
		return NET_XMIT_SUCCESS;
		return NET_XMIT_SUCCESS;


	q->drop_overlimit++;
	q->drop_overlimit++;