• Home
  • Raw
  • Download

Lines Matching refs:htb

53 	struct rtnl_htb_qdisc *htb = data;  in htb_qdisc_msg_parser()  local
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()
67 htb->qh_mask = (SCH_HTB_HAS_RATE2QUANTUM | SCH_HTB_HAS_DEFCLS); in htb_qdisc_msg_parser()
76 struct rtnl_htb_class *htb = data; in htb_class_msg_parser() local
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()
91 htb->ch_cbuffer = rtnl_tc_calc_bufsize(nl_ticks2us(opts.cbuffer), 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()
96 rtnl_tc_set_mpu(tc, htb->ch_rate.rs_mpu); in htb_class_msg_parser()
97 rtnl_tc_set_overhead(tc, htb->ch_rate.rs_overhead); in htb_class_msg_parser()
99 htb->ch_mask = (SCH_HTB_HAS_PRIO | SCH_HTB_HAS_RATE | in htb_class_msg_parser()
111 struct rtnl_htb_qdisc *htb = data; in htb_qdisc_dump_line() local
113 if (!htb) in htb_qdisc_dump_line()
116 if (htb->qh_mask & SCH_HTB_HAS_RATE2QUANTUM) in htb_qdisc_dump_line()
117 nl_dump(p, " r2q %u", htb->qh_rate2quantum); in htb_qdisc_dump_line()
119 if (htb->qh_mask & SCH_HTB_HAS_DEFCLS) { in htb_qdisc_dump_line()
122 rtnl_tc_handle2str(htb->qh_defcls, buf, sizeof(buf))); in htb_qdisc_dump_line()
129 struct rtnl_htb_class *htb = data; in htb_class_dump_line() local
131 if (!htb) in htb_class_dump_line()
134 if (htb->ch_mask & SCH_HTB_HAS_RATE) { in htb_class_dump_line()
138 r = nl_cancel_down_bytes(htb->ch_rate.rs_rate, &ru); in htb_class_dump_line()
139 rbit = nl_cancel_down_bits(htb->ch_rate.rs_rate*8, &rubit); in htb_class_dump_line()
142 r, ru, rbit, rubit, 1<<htb->ch_rate.rs_cell_log); in htb_class_dump_line()
149 struct rtnl_htb_class *htb = data; in htb_class_dump_details() local
151 if (!htb) in htb_class_dump_details()
155 if (htb->ch_mask & SCH_HTB_HAS_CEIL) { in htb_class_dump_details()
159 r = nl_cancel_down_bytes(htb->ch_ceil.rs_rate, &ru); in htb_class_dump_details()
160 rbit = nl_cancel_down_bits(htb->ch_ceil.rs_rate*8, &rubit); in htb_class_dump_details()
163 r, ru, rbit, rubit, 1<<htb->ch_ceil.rs_cell_log); in htb_class_dump_details()
166 if (htb->ch_mask & SCH_HTB_HAS_PRIO) in htb_class_dump_details()
167 nl_dump(p, " prio %u", htb->ch_prio); in htb_class_dump_details()
169 if (htb->ch_mask & SCH_HTB_HAS_RBUFFER) { in htb_class_dump_details()
173 b = nl_cancel_down_bytes(htb->ch_rbuffer, &bu); in htb_class_dump_details()
177 if (htb->ch_mask & SCH_HTB_HAS_CBUFFER) { in htb_class_dump_details()
181 b = nl_cancel_down_bytes(htb->ch_cbuffer, &bu); in htb_class_dump_details()
185 if (htb->ch_mask & SCH_HTB_HAS_QUANTUM) in htb_class_dump_details()
186 nl_dump(p, " quantum %u", htb->ch_quantum); in htb_class_dump_details()
192 struct rtnl_htb_qdisc *htb = data; in htb_qdisc_msg_fill() local
198 if (htb) { in htb_qdisc_msg_fill()
199 if (htb->qh_mask & SCH_HTB_HAS_RATE2QUANTUM) in htb_qdisc_msg_fill()
200 opts.rate2quantum = htb->qh_rate2quantum; in htb_qdisc_msg_fill()
202 if (htb->qh_mask & SCH_HTB_HAS_DEFCLS) in htb_qdisc_msg_fill()
203 opts.defcls = htb->qh_defcls; in htb_qdisc_msg_fill()
212 struct rtnl_htb_class *htb = data; in htb_class_msg_fill() local
217 if (!htb || !(htb->ch_mask & SCH_HTB_HAS_RATE)) in htb_class_msg_fill()
223 if (htb->ch_mask & SCH_HTB_HAS_PRIO) in htb_class_msg_fill()
224 opts.prio = htb->ch_prio; in htb_class_msg_fill()
228 rtnl_tc_build_rate_table(tc, &htb->ch_rate, rtable); in htb_class_msg_fill()
229 rtnl_rcopy_ratespec(&opts.rate, &htb->ch_rate); in htb_class_msg_fill()
231 if (htb->ch_mask & SCH_HTB_HAS_CEIL) { in htb_class_msg_fill()
232 rtnl_tc_build_rate_table(tc, &htb->ch_ceil, ctable); in htb_class_msg_fill()
233 rtnl_rcopy_ratespec(&opts.ceil, &htb->ch_ceil); in htb_class_msg_fill()
242 if (htb->ch_mask & SCH_HTB_HAS_RBUFFER) in htb_class_msg_fill()
243 buffer = htb->ch_rbuffer; in htb_class_msg_fill()
249 if (htb->ch_mask & SCH_HTB_HAS_CBUFFER) in htb_class_msg_fill()
250 cbuffer = htb->ch_cbuffer; in htb_class_msg_fill()
256 if (htb->ch_mask & SCH_HTB_HAS_QUANTUM) in htb_class_msg_fill()
257 opts.quantum = htb->ch_quantum; in htb_class_msg_fill()
295 struct rtnl_htb_qdisc *htb; in rtnl_htb_get_rate2quantum() local
297 if ((htb = htb_qdisc_data(qdisc)) && in rtnl_htb_get_rate2quantum()
298 htb->qh_mask & SCH_HTB_HAS_RATE2QUANTUM) in rtnl_htb_get_rate2quantum()
299 return htb->qh_rate2quantum; in rtnl_htb_get_rate2quantum()
306 struct rtnl_htb_qdisc *htb; in rtnl_htb_set_rate2quantum() local
308 if (!(htb = htb_qdisc_data(qdisc))) in rtnl_htb_set_rate2quantum()
311 htb->qh_rate2quantum = rate2quantum; in rtnl_htb_set_rate2quantum()
312 htb->qh_mask |= SCH_HTB_HAS_RATE2QUANTUM; in rtnl_htb_set_rate2quantum()
328 struct rtnl_htb_qdisc *htb; in rtnl_htb_get_defcls() local
330 if ((htb = htb_qdisc_data(qdisc)) && in rtnl_htb_get_defcls()
331 htb->qh_mask & SCH_HTB_HAS_DEFCLS) in rtnl_htb_get_defcls()
332 return htb->qh_defcls; in rtnl_htb_get_defcls()
344 struct rtnl_htb_qdisc *htb; in rtnl_htb_set_defcls() local
346 if (!(htb = htb_qdisc_data(qdisc))) in rtnl_htb_set_defcls()
349 htb->qh_defcls = defcls; in rtnl_htb_set_defcls()
350 htb->qh_mask |= SCH_HTB_HAS_DEFCLS; in rtnl_htb_set_defcls()
357 struct rtnl_htb_class *htb; in rtnl_htb_get_prio() local
359 if ((htb = htb_class_data(class)) && htb->ch_mask & SCH_HTB_HAS_PRIO) in rtnl_htb_get_prio()
360 return htb->ch_prio; in rtnl_htb_get_prio()
367 struct rtnl_htb_class *htb; in rtnl_htb_set_prio() local
369 if (!(htb = htb_class_data(class))) in rtnl_htb_set_prio()
372 htb->ch_prio = prio; in rtnl_htb_set_prio()
373 htb->ch_mask |= SCH_HTB_HAS_PRIO; in rtnl_htb_set_prio()
386 struct rtnl_htb_class *htb; in rtnl_htb_get_rate() local
388 if ((htb = htb_class_data(class)) && htb->ch_mask & SCH_HTB_HAS_RATE) in rtnl_htb_get_rate()
389 return htb->ch_rate.rs_rate; in rtnl_htb_get_rate()
403 struct rtnl_htb_class *htb; in rtnl_htb_set_rate() local
405 if (!(htb = htb_class_data(class))) in rtnl_htb_set_rate()
408 htb->ch_rate.rs_cell_log = UINT8_MAX; /* use default value */ in rtnl_htb_set_rate()
409 htb->ch_rate.rs_rate = rate; in rtnl_htb_set_rate()
410 htb->ch_mask |= SCH_HTB_HAS_RATE; in rtnl_htb_set_rate()
423 struct rtnl_htb_class *htb; in rtnl_htb_get_ceil() local
425 if ((htb = htb_class_data(class)) && htb->ch_mask & SCH_HTB_HAS_CEIL) in rtnl_htb_get_ceil()
426 return htb->ch_ceil.rs_rate; in rtnl_htb_get_ceil()
440 struct rtnl_htb_class *htb; in rtnl_htb_set_ceil() local
442 if (!(htb = htb_class_data(class))) in rtnl_htb_set_ceil()
445 htb->ch_ceil.rs_cell_log = UINT8_MAX; /* use default value */ in rtnl_htb_set_ceil()
446 htb->ch_ceil.rs_rate = ceil; in rtnl_htb_set_ceil()
447 htb->ch_mask |= SCH_HTB_HAS_CEIL; in rtnl_htb_set_ceil()
460 struct rtnl_htb_class *htb; in rtnl_htb_get_rbuffer() local
462 if ((htb = htb_class_data(class)) && in rtnl_htb_get_rbuffer()
463 htb->ch_mask & SCH_HTB_HAS_RBUFFER) in rtnl_htb_get_rbuffer()
464 return htb->ch_rbuffer; in rtnl_htb_get_rbuffer()
476 struct rtnl_htb_class *htb; in rtnl_htb_set_rbuffer() local
478 if (!(htb = htb_class_data(class))) in rtnl_htb_set_rbuffer()
481 htb->ch_rbuffer = rbuffer; in rtnl_htb_set_rbuffer()
482 htb->ch_mask |= SCH_HTB_HAS_RBUFFER; in rtnl_htb_set_rbuffer()
495 struct rtnl_htb_class *htb; in rtnl_htb_get_cbuffer() local
497 if ((htb = htb_class_data(class)) && in rtnl_htb_get_cbuffer()
498 htb->ch_mask & SCH_HTB_HAS_CBUFFER) in rtnl_htb_get_cbuffer()
499 return htb->ch_cbuffer; in rtnl_htb_get_cbuffer()
511 struct rtnl_htb_class *htb; in rtnl_htb_set_cbuffer() local
513 if (!(htb = htb_class_data(class))) in rtnl_htb_set_cbuffer()
516 htb->ch_cbuffer = cbuffer; in rtnl_htb_set_cbuffer()
517 htb->ch_mask |= SCH_HTB_HAS_CBUFFER; in rtnl_htb_set_cbuffer()
532 struct rtnl_htb_class *htb; in rtnl_htb_get_quantum() local
534 if ((htb = htb_class_data(class)) && in rtnl_htb_get_quantum()
535 htb->ch_mask & SCH_HTB_HAS_QUANTUM) in rtnl_htb_get_quantum()
536 return htb->ch_quantum; in rtnl_htb_get_quantum()
552 struct rtnl_htb_class *htb; in rtnl_htb_set_quantum() local
554 if (!(htb = htb_class_data(class))) in rtnl_htb_set_quantum()
557 htb->ch_quantum = quantum; in rtnl_htb_set_quantum()
558 htb->ch_mask |= SCH_HTB_HAS_QUANTUM; in rtnl_htb_set_quantum()
575 struct rtnl_htb_class *htb; in rtnl_htb_get_level() local
577 if ((htb = htb_class_data(class)) && htb->ch_mask & SCH_HTB_HAS_LEVEL) in rtnl_htb_get_level()
578 return htb->ch_level; in rtnl_htb_get_level()
597 struct rtnl_htb_class *htb; in rtnl_htb_set_level() local
599 if (!(htb = htb_class_data(class))) in rtnl_htb_set_level()
602 htb->ch_level = level; in rtnl_htb_set_level()
603 htb->ch_mask |= SCH_HTB_HAS_LEVEL; in rtnl_htb_set_level()