Re: [RFC][PATCH] QoS TBF and latency configuration misbehavior
From: Jarek Poplawski <hidden>
Date: 2010-08-31 19:57:55
From: Jarek Poplawski <hidden>
Date: 2010-08-31 19:57:55
Dan Kruchinin wrote, On 08/31/2010 07:01 PM:
I'm sorry it seems my email client has broken patch formating. Here is properly formated one:diff --git a/tc/q_tbf.c b/tc/q_tbf.c index dc556fe..850e6db 100644 --- a/tc/q_tbf.c +++ b/tc/q_tbf.c@@ -178,7 +178,7 @@ static int tbf_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nl } if (opt.limit == 0) { - double lim = opt.rate.rate*(double)latency/TIME_UNITS_PER_SEC + buffer; + double lim = opt.rate.rate*(double)latency/TIME_UNITS_PER_SEC;
The way limit is calculated here from latency suggests some safety defaults are taken wrt. the implementation, which could be omitted while setting the limit directly. You try to change/fix this to adhere to the documentation, but such a change would definitely break many user configs, so I doubt it's the right solution here. Probably you should rather think about fixing the manual. Thanks, Jarek P.