kernel: update myloader for linux 4.9
[openwrt/openwrt.git] / target / linux / generic / patches-4.4 / 662-use_fq_codel_by_default.patch
1 --- a/net/sched/Kconfig
2 +++ b/net/sched/Kconfig
3 @@ -3,8 +3,9 @@
4 #
5
6 menuconfig NET_SCHED
7 - bool "QoS and/or fair queueing"
8 + def_bool y
9 select NET_SCH_FIFO
10 + select NET_SCH_FQ_CODEL
11 ---help---
12 When the kernel has several packets to send out over a network
13 device, it has to decide which ones to send first, which ones to
14 --- a/net/sched/sch_fq_codel.c
15 +++ b/net/sched/sch_fq_codel.c
16 @@ -688,7 +688,7 @@ static const struct Qdisc_class_ops fq_c
17 .walk = fq_codel_walk,
18 };
19
20 -static struct Qdisc_ops fq_codel_qdisc_ops __read_mostly = {
21 +struct Qdisc_ops fq_codel_qdisc_ops __read_mostly = {
22 .cl_ops = &fq_codel_class_ops,
23 .id = "fq_codel",
24 .priv_size = sizeof(struct fq_codel_sched_data),
25 @@ -704,6 +704,7 @@ static struct Qdisc_ops fq_codel_qdisc_o
26 .dump_stats = fq_codel_dump_stats,
27 .owner = THIS_MODULE,
28 };
29 +EXPORT_SYMBOL(fq_codel_qdisc_ops);
30
31 static int __init fq_codel_module_init(void)
32 {
33 --- a/include/net/sch_generic.h
34 +++ b/include/net/sch_generic.h
35 @@ -344,6 +344,7 @@ extern struct Qdisc_ops noop_qdisc_ops;
36 extern struct Qdisc_ops pfifo_fast_ops;
37 extern struct Qdisc_ops mq_qdisc_ops;
38 extern struct Qdisc_ops noqueue_qdisc_ops;
39 +extern struct Qdisc_ops fq_codel_qdisc_ops;
40 extern const struct Qdisc_ops *default_qdisc_ops;
41
42 struct Qdisc_class_common {
43 --- a/net/sched/sch_generic.c
44 +++ b/net/sched/sch_generic.c
45 @@ -31,7 +31,7 @@
46 #include <net/dst.h>
47
48 /* Qdisc to use by default */
49 -const struct Qdisc_ops *default_qdisc_ops = &pfifo_fast_ops;
50 +const struct Qdisc_ops *default_qdisc_ops = &fq_codel_qdisc_ops;
51 EXPORT_SYMBOL(default_qdisc_ops);
52
53 /* Main transmission queue. */
54 @@ -731,7 +731,7 @@ static void attach_one_default_qdisc(str
55 void *_unused)
56 {
57 struct Qdisc *qdisc;
58 - const struct Qdisc_ops *ops = default_qdisc_ops;
59 + const struct Qdisc_ops *ops = &fq_codel_qdisc_ops;
60
61 if (dev->priv_flags & IFF_NO_QUEUE)
62 ops = &noqueue_qdisc_ops;
63 --- a/net/sched/sch_mq.c
64 +++ b/net/sched/sch_mq.c
65 @@ -57,7 +57,7 @@ static int mq_init(struct Qdisc *sch, st
66
67 for (ntx = 0; ntx < dev->num_tx_queues; ntx++) {
68 dev_queue = netdev_get_tx_queue(dev, ntx);
69 - qdisc = qdisc_create_dflt(dev_queue, default_qdisc_ops,
70 + qdisc = qdisc_create_dflt(dev_queue, &fq_codel_qdisc_ops,
71 TC_H_MAKE(TC_H_MAJ(sch->handle),
72 TC_H_MIN(ntx + 1)));
73 if (qdisc == NULL)
74 --- a/net/sched/sch_mqprio.c
75 +++ b/net/sched/sch_mqprio.c
76 @@ -124,7 +124,7 @@ static int mqprio_init(struct Qdisc *sch
77
78 for (i = 0; i < dev->num_tx_queues; i++) {
79 dev_queue = netdev_get_tx_queue(dev, i);
80 - qdisc = qdisc_create_dflt(dev_queue, default_qdisc_ops,
81 + qdisc = qdisc_create_dflt(dev_queue, &fq_codel_qdisc_ops,
82 TC_H_MAKE(TC_H_MAJ(sch->handle),
83 TC_H_MIN(i + 1)));
84 if (qdisc == NULL) {
85 --- a/net/sched/sch_api.c
86 +++ b/net/sched/sch_api.c
87 @@ -1948,7 +1948,7 @@ static int __init pktsched_init(void)
88 return err;
89 }
90
91 - register_qdisc(&pfifo_fast_ops);
92 + register_qdisc(&fq_codel_qdisc_ops);
93 register_qdisc(&pfifo_qdisc_ops);
94 register_qdisc(&bfifo_qdisc_ops);
95 register_qdisc(&pfifo_head_drop_qdisc_ops);