patch-2.4.26 linux-2.4.26/net/sched/sch_fifo.c
Next file: linux-2.4.26/net/sched/sch_gred.c
Previous file: linux-2.4.26/net/sched/sch_delay.c
Back to the patch index
Back to the overall index
- Lines: 15
- Date:
2004-04-14 06:05:41.000000000 -0700
- Orig file:
linux-2.4.25/net/sched/sch_fifo.c
- Orig date:
2004-02-18 05:36:32.000000000 -0800
diff -urN linux-2.4.25/net/sched/sch_fifo.c linux-2.4.26/net/sched/sch_fifo.c
@@ -140,10 +140,12 @@
struct fifo_sched_data *q = (void*)sch->data;
if (opt == NULL) {
+ unsigned int limit = sch->dev->tx_queue_len ? : 1;
+
if (sch->ops == &bfifo_qdisc_ops)
- q->limit = sch->dev->tx_queue_len*sch->dev->mtu;
+ q->limit = limit*sch->dev->mtu;
else
- q->limit = sch->dev->tx_queue_len;
+ q->limit = limit;
} else {
struct tc_fifo_qopt *ctl = RTA_DATA(opt);
if (opt->rta_len < RTA_LENGTH(sizeof(*ctl)))
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)