Lines Matching refs:htb
19 HierarchyTokenBucket *htb; in hierarchy_token_bucket_fill_message() local
26 assert_se(htb = HTB(qdisc)); in hierarchy_token_bucket_fill_message()
30 .rate2quantum = htb->rate_to_quantum, in hierarchy_token_bucket_fill_message()
31 .defcls = htb->default_class, in hierarchy_token_bucket_fill_message()
61 HierarchyTokenBucket *htb; in config_parse_hierarchy_token_bucket_default_class() local
79 htb = HTB(qdisc); in config_parse_hierarchy_token_bucket_default_class()
82 htb->default_class = 0; in config_parse_hierarchy_token_bucket_default_class()
88 r = safe_atou32_full(rvalue, 16, &htb->default_class); in config_parse_hierarchy_token_bucket_default_class()
114 HierarchyTokenBucket *htb; in config_parse_hierarchy_token_bucket_u32() local
132 htb = HTB(qdisc); in config_parse_hierarchy_token_bucket_u32()
135 htb->rate_to_quantum = HTB_DEFAULT_RATE_TO_QUANTUM; in config_parse_hierarchy_token_bucket_u32()
141 r = safe_atou32(rvalue, &htb->rate_to_quantum); in config_parse_hierarchy_token_bucket_u32()
155 HierarchyTokenBucket *htb; in hierarchy_token_bucket_init() local
159 htb = HTB(qdisc); in hierarchy_token_bucket_init()
161 htb->rate_to_quantum = HTB_DEFAULT_RATE_TO_QUANTUM; in hierarchy_token_bucket_init()
174 HierarchyTokenBucketClass *htb; in hierarchy_token_bucket_class_fill_message() local
182 assert_se(htb = TCLASS_TO_HTB(tclass)); in hierarchy_token_bucket_class_fill_message()
185 .prio = htb->priority, in hierarchy_token_bucket_class_fill_message()
186 .quantum = htb->quantum, in hierarchy_token_bucket_class_fill_message()
187 .rate.rate = (htb->rate >= (1ULL << 32)) ? ~0U : htb->rate, in hierarchy_token_bucket_class_fill_message()
188 .ceil.rate = (htb->ceil_rate >= (1ULL << 32)) ? ~0U : htb->ceil_rate, in hierarchy_token_bucket_class_fill_message()
189 .rate.overhead = htb->overhead, in hierarchy_token_bucket_class_fill_message()
190 .ceil.overhead = htb->overhead, in hierarchy_token_bucket_class_fill_message()
193 r = tc_transmit_time(htb->rate, htb->buffer, &opt.buffer); in hierarchy_token_bucket_class_fill_message()
197 r = tc_transmit_time(htb->ceil_rate, htb->ceil_buffer, &opt.cbuffer); in hierarchy_token_bucket_class_fill_message()
201 r = tc_fill_ratespec_and_table(&opt.rate, rtab, htb->mtu); in hierarchy_token_bucket_class_fill_message()
205 r = tc_fill_ratespec_and_table(&opt.ceil, ctab, htb->mtu); in hierarchy_token_bucket_class_fill_message()
217 if (htb->rate >= (1ULL << 32)) { in hierarchy_token_bucket_class_fill_message()
218 r = sd_netlink_message_append_u64(req, TCA_HTB_RATE64, htb->rate); in hierarchy_token_bucket_class_fill_message()
223 if (htb->ceil_rate >= (1ULL << 32)) { in hierarchy_token_bucket_class_fill_message()
224 r = sd_netlink_message_append_u64(req, TCA_HTB_CEIL64, htb->ceil_rate); in hierarchy_token_bucket_class_fill_message()
257 HierarchyTokenBucketClass *htb; in config_parse_hierarchy_token_bucket_class_u32() local
276 htb = TCLASS_TO_HTB(tclass); in config_parse_hierarchy_token_bucket_class_u32()
279 htb->priority = 0; in config_parse_hierarchy_token_bucket_class_u32()
292 htb->priority = v; in config_parse_hierarchy_token_bucket_class_u32()
311 HierarchyTokenBucketClass *htb; in config_parse_hierarchy_token_bucket_class_size() local
330 htb = TCLASS_TO_HTB(tclass); in config_parse_hierarchy_token_bucket_class_size()
334 htb->quantum = 0; in config_parse_hierarchy_token_bucket_class_size()
336 htb->mtu = HTB_DEFAULT_MTU; in config_parse_hierarchy_token_bucket_class_size()
338 htb->overhead = 0; in config_parse_hierarchy_token_bucket_class_size()
340 htb->buffer = 0; in config_parse_hierarchy_token_bucket_class_size()
342 htb->ceil_buffer = 0; in config_parse_hierarchy_token_bucket_class_size()
365 htb->quantum = v; in config_parse_hierarchy_token_bucket_class_size()
367 htb->overhead = v; in config_parse_hierarchy_token_bucket_class_size()
369 htb->mtu = v; in config_parse_hierarchy_token_bucket_class_size()
371 htb->buffer = v; in config_parse_hierarchy_token_bucket_class_size()
373 htb->ceil_buffer = v; in config_parse_hierarchy_token_bucket_class_size()
395 HierarchyTokenBucketClass *htb; in config_parse_hierarchy_token_bucket_class_rate() local
414 htb = TCLASS_TO_HTB(tclass); in config_parse_hierarchy_token_bucket_class_rate()
416 v = &htb->rate; in config_parse_hierarchy_token_bucket_class_rate()
418 v = &htb->ceil_rate; in config_parse_hierarchy_token_bucket_class_rate()
444 HierarchyTokenBucketClass *htb; in hierarchy_token_bucket_class_init() local
448 htb = TCLASS_TO_HTB(tclass); in hierarchy_token_bucket_class_init()
450 htb->mtu = HTB_DEFAULT_MTU; in hierarchy_token_bucket_class_init()
456 HierarchyTokenBucketClass *htb; in hierarchy_token_bucket_class_verify() local
462 htb = TCLASS_TO_HTB(tclass); in hierarchy_token_bucket_class_verify()
464 if (htb->rate == 0) in hierarchy_token_bucket_class_verify()
471 if (htb->ceil_rate == 0) in hierarchy_token_bucket_class_verify()
472 htb->ceil_rate = htb->rate; in hierarchy_token_bucket_class_verify()
478 if (htb->buffer == 0) in hierarchy_token_bucket_class_verify()
479 htb->buffer = htb->rate / hz + htb->mtu; in hierarchy_token_bucket_class_verify()
480 if (htb->ceil_buffer == 0) in hierarchy_token_bucket_class_verify()
481 htb->ceil_buffer = htb->ceil_rate / hz + htb->mtu; in hierarchy_token_bucket_class_verify()