Skip to content

Commit

Permalink
net-sched: fix bfifo default limit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed May 6, 2009
1 parent 77a2294 commit 6473990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/sch_fifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static int fifo_init(struct Qdisc *sch, struct nlattr *opt)
u32 limit = qdisc_dev(sch)->tx_queue_len ? : 1;

if (sch->ops == &bfifo_qdisc_ops)
limit *= qdisc_dev(sch)->mtu;
limit *= psched_mtu(qdisc_dev(sch));

q->limit = limit;
} else {
Expand Down

0 comments on commit 6473990

Please sign in to comment.