Lines Matching refs:opts
75 struct tc_htb_glob opts; in htb_qdisc_msg_parser() local
77 nla_memcpy(&opts, tb[TCA_HTB_INIT], sizeof(opts)); in htb_qdisc_msg_parser()
78 d->qh_rate2quantum = opts.rate2quantum; in htb_qdisc_msg_parser()
79 d->qh_defcls = opts.defcls; in htb_qdisc_msg_parser()
113 struct tc_htb_opt opts; in htb_class_msg_parser() local
115 nla_memcpy(&opts, tb[TCA_HTB_PARMS], sizeof(opts)); in htb_class_msg_parser()
116 d->ch_prio = opts.prio; in htb_class_msg_parser()
117 rtnl_copy_ratespec(&d->ch_rate, &opts.rate); in htb_class_msg_parser()
118 rtnl_copy_ratespec(&d->ch_ceil, &opts.ceil); 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()
121 d->ch_quantum = opts.quantum; 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()
232 struct tc_htb_glob opts; in htb_qdisc_get_opts() local
242 memset(&opts, 0, sizeof(opts)); in htb_qdisc_get_opts()
243 opts.version = TC_HTB_PROTOVER; in htb_qdisc_get_opts()
246 opts.rate2quantum = d->qh_rate2quantum; in htb_qdisc_get_opts()
248 opts.defcls = d->qh_defcls; in htb_qdisc_get_opts()
250 nla_put(msg, TCA_HTB_INIT, sizeof(opts), &opts); in htb_qdisc_get_opts()
270 struct tc_htb_opt opts; in htb_class_get_opts() local
279 memset(&opts, 0, sizeof(opts)); in htb_class_get_opts()
283 opts.prio = d->ch_prio; in htb_class_get_opts()
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()
300 rtnl_rcopy_ratespec(&opts.ceil, &d->ch_ceil); in htb_class_get_opts()
302 memcpy(&opts.ceil, &opts.rate, sizeof(struct tc_ratespec)); in htb_class_get_opts()
304 if (opts.ceil.cell_log == UINT8_MAX) 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()
322 opts.quantum = d->ch_quantum; in htb_class_get_opts()
330 opts.rate.mpu = mpu | (overhead << 8); in htb_class_get_opts()
331 opts.ceil.mpu = mpu | (overhead << 8); in htb_class_get_opts()
333 nla_put(msg, TCA_HTB_PARMS, sizeof(opts), &opts); 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()
341 1 << opts.ceil.cell_log, in htb_class_get_opts()
342 opts.ceil.rate); in htb_class_get_opts()