mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
net-sched: fix bfifo default limit
When no limit is given, the bfifo uses a default of tx_queue_len * mtu. Packets handled by qdiscs include the link layer header, so this should be taken into account, similar to what other qdiscs do. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
77a22941f9
commit
6473990c7f
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ static int fifo_init(struct Qdisc *sch, struct nlattr *opt)
|
||||||
u32 limit = qdisc_dev(sch)->tx_queue_len ? : 1;
|
u32 limit = qdisc_dev(sch)->tx_queue_len ? : 1;
|
||||||
|
|
||||||
if (sch->ops == &bfifo_qdisc_ops)
|
if (sch->ops == &bfifo_qdisc_ops)
|
||||||
limit *= qdisc_dev(sch)->mtu;
|
limit *= psched_mtu(qdisc_dev(sch));
|
||||||
|
|
||||||
q->limit = limit;
|
q->limit = limit;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue