aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_fq.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2013-11-15 11:57:26 -0500
committerDavid S. Miller <davem@davemloft.net>2013-11-15 21:01:52 -0500
commit65c5189a2b57b9aa1d89e4b79da39928257c9505 (patch)
treeaf0fb3f1d9aa0ae4c76e7a13463234e61eec0398 /net/sched/sch_fq.c
parent568508aa0724cc39bcf7d3d8001bd27a45609800 (diff)
pkt_sched: fq: warn users using defrate
Commit 7eec4174ff29 ("pkt_sched: fq: fix non TCP flows pacing") obsoleted TCA_FQ_FLOW_DEFAULT_RATE without notice for the users. Suggested by David Miller Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_fq.c')
-rw-r--r--net/sched/sch_fq.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c
index d4fa38e4af80..26906ab51c52 100644
--- a/net/sched/sch_fq.c
+++ b/net/sched/sch_fq.c
@@ -88,7 +88,6 @@ struct fq_sched_data {
88 struct fq_flow internal; /* for non classified or high prio packets */ 88 struct fq_flow internal; /* for non classified or high prio packets */
89 u32 quantum; 89 u32 quantum;
90 u32 initial_quantum; 90 u32 initial_quantum;
91 u32 flow_default_rate;/* rate per flow : bytes per second */
92 u32 flow_max_rate; /* optional max rate per flow */ 91 u32 flow_max_rate; /* optional max rate per flow */
93 u32 flow_plimit; /* max packets per flow */ 92 u32 flow_plimit; /* max packets per flow */
94 struct rb_root *fq_root; 93 struct rb_root *fq_root;
@@ -650,7 +649,8 @@ static int fq_change(struct Qdisc *sch, struct nlattr *opt)
650 q->initial_quantum = nla_get_u32(tb[TCA_FQ_INITIAL_QUANTUM]); 649 q->initial_quantum = nla_get_u32(tb[TCA_FQ_INITIAL_QUANTUM]);
651 650
652 if (tb[TCA_FQ_FLOW_DEFAULT_RATE]) 651 if (tb[TCA_FQ_FLOW_DEFAULT_RATE])
653 q->flow_default_rate = nla_get_u32(tb[TCA_FQ_FLOW_DEFAULT_RATE]); 652 pr_warn_ratelimited("sch_fq: defrate %u ignored.\n",
653 nla_get_u32(tb[TCA_FQ_FLOW_DEFAULT_RATE]));
654 654
655 if (tb[TCA_FQ_FLOW_MAX_RATE]) 655 if (tb[TCA_FQ_FLOW_MAX_RATE])
656 q->flow_max_rate = nla_get_u32(tb[TCA_FQ_FLOW_MAX_RATE]); 656 q->flow_max_rate = nla_get_u32(tb[TCA_FQ_FLOW_MAX_RATE]);
@@ -699,7 +699,6 @@ static int fq_init(struct Qdisc *sch, struct nlattr *opt)
699 q->flow_plimit = 100; 699 q->flow_plimit = 100;
700 q->quantum = 2 * psched_mtu(qdisc_dev(sch)); 700 q->quantum = 2 * psched_mtu(qdisc_dev(sch));
701 q->initial_quantum = 10 * psched_mtu(qdisc_dev(sch)); 701 q->initial_quantum = 10 * psched_mtu(qdisc_dev(sch));
702 q->flow_default_rate = 0;
703 q->flow_max_rate = ~0U; 702 q->flow_max_rate = ~0U;
704 q->rate_enable = 1; 703 q->rate_enable = 1;
705 q->new_flows.first = NULL; 704 q->new_flows.first = NULL;
@@ -726,9 +725,8 @@ static int fq_dump(struct Qdisc *sch, struct sk_buff *skb)
726 if (opts == NULL) 725 if (opts == NULL)
727 goto nla_put_failure; 726 goto nla_put_failure;
728 727
729 /* TCA_FQ_FLOW_DEFAULT_RATE is not used anymore, 728 /* TCA_FQ_FLOW_DEFAULT_RATE is not used anymore */
730 * do not bother giving its value 729
731 */
732 if (nla_put_u32(skb, TCA_FQ_PLIMIT, sch->limit) || 730 if (nla_put_u32(skb, TCA_FQ_PLIMIT, sch->limit) ||
733 nla_put_u32(skb, TCA_FQ_FLOW_PLIMIT, q->flow_plimit) || 731 nla_put_u32(skb, TCA_FQ_FLOW_PLIMIT, q->flow_plimit) ||
734 nla_put_u32(skb, TCA_FQ_QUANTUM, q->quantum) || 732 nla_put_u32(skb, TCA_FQ_QUANTUM, q->quantum) ||