Commit f7c908de authored by Patrick McHardy's avatar Patrick McHardy

[PKTSCHED]: Use queue limit of 1 when tx_queue_len is zero.

parent fff336d5
......@@ -141,10 +141,12 @@ static int fifo_init(struct Qdisc *sch, struct rtattr *opt)
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)))
......
......@@ -110,7 +110,7 @@ gred_enqueue(struct sk_buff *skb, struct Qdisc* sch)
unsigned long qave=0;
int i=0;
if (!t->initd && skb_queue_len(&sch->q) < sch->dev->tx_queue_len) {
if (!t->initd && skb_queue_len(&sch->q) < (sch->dev->tx_queue_len ? : 1)) {
D2PRINTK("NO GRED Queues setup yet! Enqueued anyway\n");
goto do_enqueue;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment