[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1301037459.2714.570.camel@edumazet-laptop>
Date: Fri, 25 Mar 2011 08:17:39 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Maciej Żenczykowski <zenczykowski@...il.com>
Cc: Linux NetDev <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>
Subject: Re: On Linux rate limiting and the magic value of 34.64 Gbps...
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists