kernel: add a small xfrm related performance optimization
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-3.10 / 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 @@ -594,7 +594,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 @@ -610,6 +610,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 @@ -315,6 +315,7 @@ extern struct Qdisc noop_qdisc;
36 extern struct Qdisc_ops noop_qdisc_ops;
37 extern struct Qdisc_ops pfifo_fast_ops;
38 extern struct Qdisc_ops mq_qdisc_ops;
39 +extern struct Qdisc_ops fq_codel_qdisc_ops;
40
41 struct Qdisc_class_common {
42 u32 classid;
43 --- a/net/sched/sch_generic.c
44 +++ b/net/sched/sch_generic.c
45 @@ -681,7 +681,7 @@ static void attach_one_default_qdisc(str
46
47 if (dev->tx_queue_len) {
48 qdisc = qdisc_create_dflt(dev_queue,
49 - &pfifo_fast_ops, TC_H_ROOT);
50 + &fq_codel_qdisc_ops, TC_H_ROOT);
51 if (!qdisc) {
52 netdev_info(dev, "activation failed\n");
53 return;
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, &pfifo_fast_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, &pfifo_fast_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) {