netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Andy Walker <camtarn@camtarn.org>
Cc: netdev@vger.kernel.org
Subject: Re: TBF man page: peakrate must be greater than rate
Date: Fri, 3 Sep 2021 09:21:29 -0700	[thread overview]
Message-ID: <20210903092129.3dda2d82@hermes.local> (raw)
In-Reply-To: <CAD6Lk=r8Yf8_09X31bcLECEKmy3gS5rKDKt+pVHfyNk2_NMHTA@mail.gmail.com>

On Fri, 3 Sep 2021 16:48:45 +0100
Andy Walker <camtarn@camtarn.org> wrote:

> Hi,
> 
> I was struggling with the following command line:
> tc qdisc add dev eth1 parent 1:1 handle 10: tbf rate 10.0kbit maxburst
> 10kb latency 50ms peakrate 10kbit mtu 1600
> RTNETLINK answers: Invalid argument
> 
> When I altered peakrate to be 10.1kbit, tbf accepted its parameters.
> 
> Looking in dmesg, I found the following:
> 
> sch_tbf: peakrate 1250 is lower than or equals to rate 1250
> 
> The man page does not specify that peakrate needs to be greater than
> rate. This would probably be a useful addition, as it's easy to assume
> that the two can/should be set to the same value for precise rate
> limiting.
> 
> Thanks,
> Andy

The kernel should be reporting error message via netlink extack
but it isn't.  Anytime user has to look in dmesg to see an error
it is bad.

TBF is old and rarely modified code in the kernel. It looks like
it could use some attention.

  reply	other threads:[~2021-09-03 16:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAD6Lk=r=mCMPb3YyKHMKtLENteRPsGw2L4Axy5kdVvnd2j29Zw@mail.gmail.com>
2021-09-03 15:48 ` TBF man page: peakrate must be greater than rate Andy Walker
2021-09-03 16:21   ` Stephen Hemminger [this message]
2021-09-03 16:27   ` Stephen Hemminger

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=20210903092129.3dda2d82@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=camtarn@camtarn.org \
    --cc=netdev@vger.kernel.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).