Patch to correct HTB rtable/HZ calculations

Andrew Collins bsderandrew at gmail.com
Fri May 25 20:15:36 EDT 2012


On Fri, May 25, 2012 at 6:08 PM, Andrew Collins <bsderandrew at gmail.com> wrote:
> The HTB implementation in libnl uses units of microseconds in a number
> of places where it seems TC is expecting time in units of ticks, which
> causes actual rates much lower than requested.  Additionally, libnl
> uses USER_HZ for calculating buffer and cbuffer sizes, which can
> result in much larger buffers than necessary on systems with high
> resolution timers.
>
> Does the attached patch to fix these issues seems reasonable?  It
> works for me in light testing of HTB.
>
> Note that the TBF qdisc uses microseconds incorrectly in two spots as
> well, I fixed this but did not test.

Quick correction, the actual rates are much *higher* than requested...



More information about the libnl mailing list