netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* net-sched: fix bfifo default limit
@ 2009-05-06 13:35 Patrick McHardy
  2009-05-06 23:45 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2009-05-06 13:35 UTC (permalink / raw)
  To: Linux Netdev List, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: x --]
[-- Type: text/plain, Size: 705 bytes --]

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>

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 {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: net-sched: fix bfifo default limit
  2009-05-06 13:35 net-sched: fix bfifo default limit Patrick McHardy
@ 2009-05-06 23:45 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-05-06 23:45 UTC (permalink / raw)
  To: kaber; +Cc: netdev

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!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-06 23:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-06 13:35 net-sched: fix bfifo default limit Patrick McHardy
2009-05-06 23:45 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).