Home
last modified time | relevance | path

Searched refs:toks (Results 1 – 3 of 3) sorted by relevance

/linux-4.1.27/net/sched/
Dact_police.c260 s64 toks; in tcf_act_police() local
283 toks = min_t(s64, now - police->tcfp_t_c, in tcf_act_police()
286 ptoks = toks + police->tcfp_ptoks; in tcf_act_police()
292 toks += police->tcfp_toks; in tcf_act_police()
293 if (toks > police->tcfp_burst) in tcf_act_police()
294 toks = police->tcfp_burst; in tcf_act_police()
295 toks -= (s64) psched_l2t_ns(&police->rate, qdisc_pkt_len(skb)); in tcf_act_police()
296 if ((toks|ptoks) >= 0) { in tcf_act_police()
298 police->tcfp_toks = toks; in tcf_act_police()
Dsch_tbf.c238 s64 toks; in tbf_dequeue() local
243 toks = min_t(s64, now - q->t_c, q->buffer); in tbf_dequeue()
246 ptoks = toks + q->ptokens; in tbf_dequeue()
251 toks += q->tokens; in tbf_dequeue()
252 if (toks > q->buffer) in tbf_dequeue()
253 toks = q->buffer; in tbf_dequeue()
254 toks -= (s64) psched_l2t_ns(&q->rate, len); in tbf_dequeue()
256 if ((toks|ptoks) >= 0) { in tbf_dequeue()
262 q->tokens = toks; in tbf_dequeue()
271 now + max_t(long, -toks, -ptoks), in tbf_dequeue()
Dsch_htb.c497 s64 toks; in htb_class_mode() local
499 if ((toks = (cl->ctokens + *diff)) < htb_lowater(cl)) { in htb_class_mode()
500 *diff = -toks; in htb_class_mode()
504 if ((toks = (cl->tokens + *diff)) >= htb_hiwater(cl)) in htb_class_mode()
507 *diff = -toks; in htb_class_mode()
609 s64 toks = diff + cl->tokens; in htb_accnt_tokens() local
611 if (toks > cl->buffer) in htb_accnt_tokens()
612 toks = cl->buffer; in htb_accnt_tokens()
613 toks -= (s64) psched_l2t_ns(&cl->rate, bytes); in htb_accnt_tokens()
614 if (toks <= -cl->mbuffer) in htb_accnt_tokens()
[all …]