Lines Matching refs:opts

60 		struct tc_htb_glob opts;  in htb_qdisc_msg_parser()  local
62 nla_memcpy(&opts, tb[TCA_HTB_INIT], sizeof(opts)); in htb_qdisc_msg_parser()
63 htb->qh_rate2quantum = opts.rate2quantum; in htb_qdisc_msg_parser()
64 htb->qh_defcls = opts.defcls; in htb_qdisc_msg_parser()
65 htb->qh_direct_pkts = opts.direct_pkts; in htb_qdisc_msg_parser()
83 struct tc_htb_opt opts; in htb_class_msg_parser() local
85 nla_memcpy(&opts, tb[TCA_HTB_PARMS], sizeof(opts)); in htb_class_msg_parser()
86 htb->ch_prio = opts.prio; in htb_class_msg_parser()
87 rtnl_copy_ratespec(&htb->ch_rate, &opts.rate); in htb_class_msg_parser()
88 rtnl_copy_ratespec(&htb->ch_ceil, &opts.ceil); in htb_class_msg_parser()
89 htb->ch_rbuffer = rtnl_tc_calc_bufsize(nl_ticks2us(opts.buffer), in htb_class_msg_parser()
90 opts.rate.rate); in htb_class_msg_parser()
91 htb->ch_cbuffer = rtnl_tc_calc_bufsize(nl_ticks2us(opts.cbuffer), in htb_class_msg_parser()
92 opts.ceil.rate); in htb_class_msg_parser()
93 htb->ch_quantum = opts.quantum; in htb_class_msg_parser()
94 htb->ch_level = opts.level; in htb_class_msg_parser()
193 struct tc_htb_glob opts = { in htb_qdisc_msg_fill() local
200 opts.rate2quantum = htb->qh_rate2quantum; in htb_qdisc_msg_fill()
203 opts.defcls = htb->qh_defcls; in htb_qdisc_msg_fill()
206 return nla_put(msg, TCA_HTB_INIT, sizeof(opts), &opts); in htb_qdisc_msg_fill()
214 struct tc_htb_opt opts; in htb_class_msg_fill() local
220 memset(&opts, 0, sizeof(opts)); in htb_class_msg_fill()
224 opts.prio = htb->ch_prio; in htb_class_msg_fill()
229 rtnl_rcopy_ratespec(&opts.rate, &htb->ch_rate); in htb_class_msg_fill()
233 rtnl_rcopy_ratespec(&opts.ceil, &htb->ch_ceil); in htb_class_msg_fill()
239 memcpy(&opts.ceil, &opts.rate, sizeof(struct tc_ratespec)); in htb_class_msg_fill()
245 buffer = opts.rate.rate / nl_get_psched_hz() + mtu; /* XXX */ in htb_class_msg_fill()
247 opts.buffer = nl_us2ticks(rtnl_tc_calc_txtime(buffer, opts.rate.rate)); in htb_class_msg_fill()
252 cbuffer = opts.ceil.rate / nl_get_psched_hz() + mtu; /* XXX */ in htb_class_msg_fill()
254 opts.cbuffer = nl_us2ticks(rtnl_tc_calc_txtime(cbuffer, opts.ceil.rate)); in htb_class_msg_fill()
257 opts.quantum = htb->ch_quantum; in htb_class_msg_fill()
259 NLA_PUT(msg, TCA_HTB_PARMS, sizeof(opts), &opts); in htb_class_msg_fill()