kernel: switch default qdisc from pfifo_fast to fq_codel and remove pfifo_fast
[openwrt/openwrt.git] / target / linux / generic / patches-3.8 / 662-use_fq_codel_by_default.patch
1 --- a/net/sched/Kconfig
2 +++ b/net/sched/Kconfig
3 @@ -5,6 +5,7 @@
4 menuconfig NET_SCHED
5 bool "QoS and/or fair queueing"
6 select NET_SCH_FIFO
7 + select NET_SCH_FQ_CODEL
8 ---help---
9 When the kernel has several packets to send out over a network
10 device, it has to decide which ones to send first, which ones to
11 --- a/net/sched/sch_fq_codel.c
12 +++ b/net/sched/sch_fq_codel.c
13 @@ -594,7 +594,7 @@ static const struct Qdisc_class_ops fq_c
14 .walk = fq_codel_walk,
15 };
16
17 -static struct Qdisc_ops fq_codel_qdisc_ops __read_mostly = {
18 +struct Qdisc_ops fq_codel_qdisc_ops __read_mostly = {
19 .cl_ops = &fq_codel_class_ops,
20 .id = "fq_codel",
21 .priv_size = sizeof(struct fq_codel_sched_data),
22 @@ -610,6 +610,7 @@ static struct Qdisc_ops fq_codel_qdisc_o
23 .dump_stats = fq_codel_dump_stats,
24 .owner = THIS_MODULE,
25 };
26 +EXPORT_SYMBOL(fq_codel_qdisc_ops);
27
28 static int __init fq_codel_module_init(void)
29 {
30 --- a/include/net/sch_generic.h
31 +++ b/include/net/sch_generic.h
32 @@ -315,6 +315,7 @@ extern struct Qdisc noop_qdisc;
33 extern struct Qdisc_ops noop_qdisc_ops;
34 extern struct Qdisc_ops pfifo_fast_ops;
35 extern struct Qdisc_ops mq_qdisc_ops;
36 +extern struct Qdisc_ops fq_codel_qdisc_ops;
37
38 struct Qdisc_class_common {
39 u32 classid;
40 --- a/net/sched/sch_generic.c
41 +++ b/net/sched/sch_generic.c
42 @@ -680,7 +680,7 @@ static void attach_one_default_qdisc(str
43
44 if (dev->tx_queue_len) {
45 qdisc = qdisc_create_dflt(dev_queue,
46 - &pfifo_fast_ops, TC_H_ROOT);
47 + &fq_codel_qdisc_ops, TC_H_ROOT);
48 if (!qdisc) {
49 netdev_info(dev, "activation failed\n");
50 return;
51 --- a/net/sched/sch_mq.c
52 +++ b/net/sched/sch_mq.c
53 @@ -57,7 +57,7 @@ static int mq_init(struct Qdisc *sch, st
54
55 for (ntx = 0; ntx < dev->num_tx_queues; ntx++) {
56 dev_queue = netdev_get_tx_queue(dev, ntx);
57 - qdisc = qdisc_create_dflt(dev_queue, &pfifo_fast_ops,
58 + qdisc = qdisc_create_dflt(dev_queue, &fq_codel_qdisc_ops,
59 TC_H_MAKE(TC_H_MAJ(sch->handle),
60 TC_H_MIN(ntx + 1)));
61 if (qdisc == NULL)
62 --- a/net/sched/sch_mqprio.c
63 +++ b/net/sched/sch_mqprio.c
64 @@ -124,7 +124,7 @@ static int mqprio_init(struct Qdisc *sch
65
66 for (i = 0; i < dev->num_tx_queues; i++) {
67 dev_queue = netdev_get_tx_queue(dev, i);
68 - qdisc = qdisc_create_dflt(dev_queue, &pfifo_fast_ops,
69 + qdisc = qdisc_create_dflt(dev_queue, &fq_codel_qdisc_ops,
70 TC_H_MAKE(TC_H_MAJ(sch->handle),
71 TC_H_MIN(i + 1)));
72 if (qdisc == NULL) {