diff options
author | Andrew Collins <bsderandrew@gmail.com> | 2012-05-26 00:08:06 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@redhat.com> | 2012-05-29 09:42:48 (GMT) |
commit | 970f5d0221863b1473740455ca4d8cefcb34ff31 (patch) | |
tree | 4d5081a4f375c0949640da790fbdbf357431e7c0 /include | |
parent | 9bb30a5e801fff2333d9b847be42294aa2e34e06 (diff) | |
download | libnl-970f5d0221863b1473740455ca4d8cefcb34ff31.zip libnl-970f5d0221863b1473740455ca4d8cefcb34ff31.tar.gz libnl-970f5d0221863b1473740455ca4d8cefcb34ff31.tar.bz2 |
correct HTB rtable/HZ calculations
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 higher 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.
Note that the TBF qdisc uses microseconds incorrectly in two spots as
well, I fixed this but did not test.
Diffstat (limited to 'include')
-rw-r--r-- | include/netlink/utils.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/netlink/utils.h b/include/netlink/utils.h index 4d7b969..502341a 100644 --- a/include/netlink/utils.h +++ b/include/netlink/utils.h @@ -56,6 +56,7 @@ extern long nl_prob2int(const char *); /* time translations */ extern int nl_get_user_hz(void); +extern int nl_get_psched_hz(void); extern uint32_t nl_us2ticks(uint32_t); extern uint32_t nl_ticks2us(uint32_t); extern int nl_str2msec(const char *, uint64_t *); |