Lines Matching full:rate
117 rtnl_copy_ratespec(&d->ch_rate, &opts.rate); in htb_class_msg_parser()
119 d->ch_rbuffer = rtnl_tc_calc_bufsize(opts.buffer, opts.rate.rate); in htb_class_msg_parser()
120 d->ch_cbuffer = rtnl_tc_calc_bufsize(opts.cbuffer, opts.ceil.rate); in htb_class_msg_parser()
122 d->ch_overhead = (opts.rate.mpu >> 8) & 0xff; in htb_class_msg_parser()
123 d->ch_mpu = opts.rate.mpu & 0xff; in htb_class_msg_parser()
172 nl_dump(p, " rate %.2f%s/s (%.0f%s) log %u", in htb_class_dump_line()
255 static uint8_t compute_cell(uint32_t rate, uint32_t mtu) in compute_cell() argument
293 rtnl_rcopy_ratespec(&opts.rate, &d->ch_rate); in htb_class_get_opts()
295 if (opts.rate.cell_log == UINT8_MAX) in htb_class_get_opts()
296 opts.rate.cell_log = compute_cell(opts.rate.rate, mtu); in htb_class_get_opts()
298 /* if not set, configured rate is used as ceil, which implies no borrowing */ in htb_class_get_opts()
302 memcpy(&opts.ceil, &opts.rate, sizeof(struct tc_ratespec)); in htb_class_get_opts()
305 opts.ceil.cell_log = compute_cell(opts.ceil.rate, mtu); in htb_class_get_opts()
310 buffer = opts.rate.rate / nl_get_hz() + mtu; in htb_class_get_opts()
312 opts.buffer = rtnl_tc_calc_txtime(buffer, opts.rate.rate); in htb_class_get_opts()
317 cbuffer = opts.ceil.rate / nl_get_hz() + mtu; in htb_class_get_opts()
319 opts.cbuffer = rtnl_tc_calc_txtime(cbuffer, opts.ceil.rate); in htb_class_get_opts()
330 opts.rate.mpu = mpu | (overhead << 8); in htb_class_get_opts()
336 1 << opts.rate.cell_log, in htb_class_get_opts()
337 opts.rate.rate); in htb_class_get_opts()
342 opts.ceil.rate); in htb_class_get_opts()
407 * Set rate of HTB class.
409 * @arg rate New rate in bytes per second.
411 void rtnl_htb_set_rate(struct rtnl_class *class, uint32_t rate) in rtnl_htb_set_rate() argument
418 d->ch_rate.rs_rate = rate; in rtnl_htb_set_rate()
439 * Set size of the rate bucket of HTB class.
484 * Set per-packet size overhead used in rate computations of HTB class.
499 * Set the minimum packet size used in rate computations of HTB class.