662-use_fq_codel_by_default.patch 3.0 KB

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