662-use_fq_codel_by_default.patch 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. @@ -599,7 +599,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. @@ -615,6 +615,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. @@ -343,6 +343,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. 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. @@ -742,7 +742,7 @@ static void attach_one_default_qdisc(str
  42. if (dev->tx_queue_len) {
  43. qdisc = qdisc_create_dflt(dev_queue,
  44. - default_qdisc_ops, TC_H_ROOT);
  45. + &fq_codel_qdisc_ops, TC_H_ROOT);
  46. if (!qdisc) {
  47. netdev_info(dev, "activation failed\n");
  48. return;
  49. --- a/net/sched/sch_mq.c
  50. +++ b/net/sched/sch_mq.c
  51. @@ -57,7 +57,7 @@ static int mq_init(struct Qdisc *sch, st
  52. for (ntx = 0; ntx < dev->num_tx_queues; ntx++) {
  53. dev_queue = netdev_get_tx_queue(dev, ntx);
  54. - qdisc = qdisc_create_dflt(dev_queue, default_qdisc_ops,
  55. + qdisc = qdisc_create_dflt(dev_queue, &fq_codel_qdisc_ops,
  56. TC_H_MAKE(TC_H_MAJ(sch->handle),
  57. TC_H_MIN(ntx + 1)));
  58. if (qdisc == NULL)
  59. --- a/net/sched/sch_mqprio.c
  60. +++ b/net/sched/sch_mqprio.c
  61. @@ -124,7 +124,7 @@ static int mqprio_init(struct Qdisc *sch
  62. for (i = 0; i < dev->num_tx_queues; i++) {
  63. dev_queue = netdev_get_tx_queue(dev, i);
  64. - qdisc = qdisc_create_dflt(dev_queue, default_qdisc_ops,
  65. + qdisc = qdisc_create_dflt(dev_queue, &fq_codel_qdisc_ops,
  66. TC_H_MAKE(TC_H_MAJ(sch->handle),
  67. TC_H_MIN(i + 1)));
  68. if (qdisc == NULL) {