Patch to correct HTB rtable/HZ calculations

Andrew Collins bsderandrew at gmail.com
Fri May 25 20:08:06 EDT 2012


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libnl_tc_ticks.patch
Type: application/octet-stream
Size: 4483 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20120525/f02b679b/attachment.obj>


More information about the libnl mailing list