Message ID | 4A019210.5000108@trash.net |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Patrick McHardy <kaber@trash.net> Date: Wed, 06 May 2009 15:35:12 +0200 > 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> Applied, thanks a lot! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c index 92cfc9d..69188e8 100644 --- a/net/sched/sch_fifo.c +++ b/net/sched/sch_fifo.c @@ -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 {
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>