From: Patrick McHardy Date: Wed, 6 May 2009 23:45:07 +0000 (-0700) Subject: net-sched: fix bfifo default limit X-Git-Tag: v2.6.30-rc6~48^2~7 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=6473990c7f0565fca2007f8662395d122e30f0d8;p=~shefty%2Frdma-dev.git 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 Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c index 92cfc9d7e3b..69188e8358b 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 {