netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: Dan Kruchinin <dkruchinin@acm.org>
Cc: netdev@vger.kernel.org, Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	Stephen Hemminger <shemminger@osdl.org>
Subject: Re: [RFC][PATCH] QoS TBF and latency configuration misbehavior
Date: Tue, 31 Aug 2010 21:57:49 +0200	[thread overview]
Message-ID: <4C7D5EBD.103@gmail.com> (raw)
In-Reply-To: <20100831210101.3c059a91@leibniz>

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.


  reply	other threads:[~2010-08-31 19:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-31 13:56 [RFC][PATCH] QoS TBF and latency configuration misbehavior Dan Kruchinin
2010-08-31 17:01 ` Dan Kruchinin
2010-08-31 19:57   ` Jarek Poplawski [this message]
2010-08-31 21:00     ` Dan Kruchinin
2010-08-31 21:47       ` Jarek Poplawski
2010-08-31 21:48       ` Alexey Kuznetsov
2010-08-31 22:34         ` Alexey Kuznetsov
2010-09-01  6:36           ` Jarek Poplawski
2010-09-01  8:40             ` Alexey Kuznetsov
2010-09-01 11:29           ` Dan Kruchinin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C7D5EBD.103@gmail.com \
    --to=jarkao2@gmail.com \
    --cc=dkruchinin@acm.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).