net: sched: drop all special handling of tx_queue_len == 0
authorPhil Sutter <phil@nwl.cc>
Tue, 18 Aug 2015 08:30:49 +0000 (10:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Aug 2015 18:55:08 +0000 (11:55 -0700)
Those were all workarounds for the formerly double meaning of
tx_queue_len, which broke scheduling algorithms if untreated.

Now that all in-tree drivers have been converted away from setting
tx_queue_len = 0, it should be safe to drop these workarounds for
categorically broken setups.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_fifo.c
net/sched/sch_gred.c
net/sched/sch_htb.c
net/sched/sch_plug.c
net/sched/sch_sfb.c

index 2e2398c..2177eac 100644 (file)
@@ -54,7 +54,7 @@ static int fifo_init(struct Qdisc *sch, struct nlattr *opt)
        bool is_bfifo = sch->ops == &bfifo_qdisc_ops;
 
        if (opt == NULL) {
-               u32 limit = qdisc_dev(sch)->tx_queue_len ? : 1;
+               u32 limit = qdisc_dev(sch)->tx_queue_len;
 
                if (is_bfifo)
                        limit *= psched_mtu(qdisc_dev(sch));
index abb9f2f..8010510 100644 (file)
@@ -512,11 +512,9 @@ static int gred_init(struct Qdisc *sch, struct nlattr *opt)
 
        if (tb[TCA_GRED_LIMIT])
                sch->limit = nla_get_u32(tb[TCA_GRED_LIMIT]);
-       else {
-               u32 qlen = qdisc_dev(sch)->tx_queue_len ? : 1;
-
-               sch->limit = qlen * psched_mtu(qdisc_dev(sch));
-       }
+       else
+               sch->limit = qdisc_dev(sch)->tx_queue_len
+                            * psched_mtu(qdisc_dev(sch));
 
        return gred_change_table_def(sch, tb[TCA_GRED_DPS]);
 }
Simple merge
Simple merge
Simple merge