Lines Matching refs:toks
502 s64 toks; in htb_class_mode() local
504 if ((toks = (cl->ctokens + *diff)) < htb_lowater(cl)) { in htb_class_mode()
505 *diff = -toks; in htb_class_mode()
509 if ((toks = (cl->tokens + *diff)) >= htb_hiwater(cl)) in htb_class_mode()
512 *diff = -toks; in htb_class_mode()
620 s64 toks = diff + cl->tokens; in htb_accnt_tokens() local
622 if (toks > cl->buffer) in htb_accnt_tokens()
623 toks = cl->buffer; in htb_accnt_tokens()
624 toks -= (s64) psched_l2t_ns(&cl->rate, bytes); in htb_accnt_tokens()
625 if (toks <= -cl->mbuffer) in htb_accnt_tokens()
626 toks = 1 - cl->mbuffer; in htb_accnt_tokens()
628 cl->tokens = toks; in htb_accnt_tokens()
633 s64 toks = diff + cl->ctokens; in htb_accnt_ctokens() local
635 if (toks > cl->cbuffer) in htb_accnt_ctokens()
636 toks = cl->cbuffer; in htb_accnt_ctokens()
637 toks -= (s64) psched_l2t_ns(&cl->ceil, bytes); in htb_accnt_ctokens()
638 if (toks <= -cl->mbuffer) in htb_accnt_ctokens()
639 toks = 1 - cl->mbuffer; in htb_accnt_ctokens()
641 cl->ctokens = toks; in htb_accnt_ctokens()