[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: altq tbr_set



Dan Shechter wrote:
> Just trying to read src/sys/altq.
> 
> What are TBR_SCALE and TBR_UNSCALE used for? I know what they do, but
> I don't understand what they r used for?

in the userland, the tokenbucket rate and depth are expressed in
bits/sec and bytes but, in the kernel,  they are converted to values
relative to the CPU clock frequency.   these values are scaled not to
overflow or underflow u_int64_t with varying clock frequencies.

> Whare machclk_freq is declaired? It's extern in altq_var.h but i
> can't find it in src/sys

in sys/altq/altq_subr.c.

-Kenjiro