kernel: update kernel 4.4 to version 4.4.6
[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 @@ -623,7 +623,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 @@ -639,6 +639,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 @@ -728,7 +728,7 @@ static void attach_one_default_qdisc(str
46 void *_unused)
47 {
48 struct Qdisc *qdisc;
49 - const struct Qdisc_ops *ops = default_qdisc_ops;
50 + const struct Qdisc_ops *ops = &fq_codel_qdisc_ops;
51
52 if (dev->priv_flags & IFF_NO_QUEUE)
53 ops = &noqueue_qdisc_ops;
54 --- a/net/sched/sch_mq.c
55 +++ b/net/sched/sch_mq.c
56 @@ -57,7 +57,7 @@ static int mq_init(struct Qdisc *sch, st
57
58 for (ntx = 0; ntx < dev->num_tx_queues; ntx++) {
59 dev_queue = netdev_get_tx_queue(dev, ntx);
60 - qdisc = qdisc_create_dflt(dev_queue, default_qdisc_ops,
61 + qdisc = qdisc_create_dflt(dev_queue, &fq_codel_qdisc_ops,
62 TC_H_MAKE(TC_H_MAJ(sch->handle),
63 TC_H_MIN(ntx + 1)));
64 if (qdisc == NULL)
65 --- a/net/sched/sch_mqprio.c
66 +++ b/net/sched/sch_mqprio.c
67 @@ -124,7 +124,7 @@ static int mqprio_init(struct Qdisc *sch
68
69 for (i = 0; i < dev->num_tx_queues; i++) {
70 dev_queue = netdev_get_tx_queue(dev, i);
71 - qdisc = qdisc_create_dflt(dev_queue, default_qdisc_ops,
72 + qdisc = qdisc_create_dflt(dev_queue, &fq_codel_qdisc_ops,
73 TC_H_MAKE(TC_H_MAJ(sch->handle),
74 TC_H_MIN(i + 1)));
75 if (qdisc == NULL) {