public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Maciej Żenczykowski" <zenczykowski@gmail.com>
Cc: Linux NetDev <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>
Subject: Re: On Linux rate limiting and the magic value of 34.64 Gbps...
Date: Fri, 25 Mar 2011 08:17:39 +0100	[thread overview]
Message-ID: <1301037459.2714.570.camel@edumazet-laptop> (raw)
In-Reply-To: <AANLkTi=UTcZ8Q-ULk4CAkbZztYKkDeZHK55LHVDRFH2r@mail.gmail.com>

Le vendredi 25 mars 2011 à 00:14 -0700, Maciej Żenczykowski a écrit :
> Hey,
> 
> The Linux rate limiting code relies on the rate field of struct tc_ratespec.
> This field is a __u32 and measures rate in "bytes per second".
> 
> This basically means maximum representable rate is 4GB per second.
> This is equivalent to 34.36 Gbps and I just ran across that limit with
> 40 Gbps (which behaves like 5.64 Gbps because of overflow/truncation).
> Seeing as this structure is exposed to userspace for both read and
> write via various netlink paths (in cbq, htb, tbf, etc...) there
> doesn't seem to be a particularly clean way to increase the size of
> this field.  While there is a __reserved field that could
> theoretically be repurposed as some sort of rate bit shift register, I
> don't think we can rely on __reserved having been set to zero by
> userspace (by older programs), and we will definitely see problems
> with output by programs (tc) that don't expect to have to parse this
> field to output an understandable rate limit...
> 
> Anybody have any bright ideas?

Well, netlink is extensible, so we can easily add a new structure, with
64bit fields if necessary.

We did that for 64bit stats already.




  reply	other threads:[~2011-03-25  7:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25  7:14 On Linux rate limiting and the magic value of 34.64 Gbps Maciej Żenczykowski
2011-03-25  7:17 ` Eric Dumazet [this message]
2011-03-28  4:43   ` Maciej Żenczykowski

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=1301037459.2714.570.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=zenczykowski@gmail.com \
    /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