Skip to content

Commit 65c5189

Browse files
edumazetdavem330
authored andcommitted
pkt_sched: fq: warn users using defrate
Commit 7eec417 ("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>
1 parent 568508a commit 65c5189

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

include/uapi/linux/pkt_sched.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,9 +763,7 @@ enum {
763763

764764
TCA_FQ_RATE_ENABLE, /* enable/disable rate limiting */
765765

766-
TCA_FQ_FLOW_DEFAULT_RATE,/* for sockets with unspecified sk_rate,
767-
* use the following rate
768-
*/
766+
TCA_FQ_FLOW_DEFAULT_RATE,/* obsolete, do not use */
769767

770768
TCA_FQ_FLOW_MAX_RATE, /* per flow max rate */
771769

net/sched/sch_fq.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ struct fq_sched_data {
8888
struct fq_flow internal; /* for non classified or high prio packets */
8989
u32 quantum;
9090
u32 initial_quantum;
91-
u32 flow_default_rate;/* rate per flow : bytes per second */
9291
u32 flow_max_rate; /* optional max rate per flow */
9392
u32 flow_plimit; /* max packets per flow */
9493
struct rb_root *fq_root;
@@ -650,7 +649,8 @@ static int fq_change(struct Qdisc *sch, struct nlattr *opt)
650649
q->initial_quantum = nla_get_u32(tb[TCA_FQ_INITIAL_QUANTUM]);
651650

652651
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]));
654654

655655
if (tb[TCA_FQ_FLOW_MAX_RATE])
656656
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)
699699
q->flow_plimit = 100;
700700
q->quantum = 2 * psched_mtu(qdisc_dev(sch));
701701
q->initial_quantum = 10 * psched_mtu(qdisc_dev(sch));
702-
q->flow_default_rate = 0;
703702
q->flow_max_rate = ~0U;
704703
q->rate_enable = 1;
705704
q->new_flows.first = NULL;
@@ -726,9 +725,8 @@ static int fq_dump(struct Qdisc *sch, struct sk_buff *skb)
726725
if (opts == NULL)
727726
goto nla_put_failure;
728727

729-
/* TCA_FQ_FLOW_DEFAULT_RATE is not used anymore,
730-
* do not bother giving its value
731-
*/
728+
/* TCA_FQ_FLOW_DEFAULT_RATE is not used anymore */
729+
732730
if (nla_put_u32(skb, TCA_FQ_PLIMIT, sch->limit) ||
733731
nla_put_u32(skb, TCA_FQ_FLOW_PLIMIT, q->flow_plimit) ||
734732
nla_put_u32(skb, TCA_FQ_QUANTUM, q->quantum) ||

0 commit comments

Comments
 (0)