Home
last modified time | relevance | path

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

/Linux-v4.19/net/sched/
Dact_police.c211 s64 toks; in tcf_police_act() local
239 toks = min_t(s64, now - police->tcfp_t_c, in tcf_police_act()
242 ptoks = toks + police->tcfp_ptoks; in tcf_police_act()
248 toks += police->tcfp_toks; in tcf_police_act()
249 if (toks > police->tcfp_burst) in tcf_police_act()
250 toks = police->tcfp_burst; in tcf_police_act()
251 toks -= (s64) psched_l2t_ns(&police->rate, qdisc_pkt_len(skb)); in tcf_police_act()
252 if ((toks|ptoks) >= 0) { in tcf_police_act()
254 police->tcfp_toks = toks; in tcf_police_act()
Dsch_tbf.c222 s64 toks; in tbf_dequeue() local
227 toks = min_t(s64, now - q->t_c, q->buffer); in tbf_dequeue()
230 ptoks = toks + q->ptokens; in tbf_dequeue()
235 toks += q->tokens; in tbf_dequeue()
236 if (toks > q->buffer) in tbf_dequeue()
237 toks = q->buffer; in tbf_dequeue()
238 toks -= (s64) psched_l2t_ns(&q->rate, len); in tbf_dequeue()
240 if ((toks|ptoks) >= 0) { in tbf_dequeue()
246 q->tokens = toks; in tbf_dequeue()
255 now + max_t(long, -toks, -ptoks)); in tbf_dequeue()
Dsch_htb.c505 s64 toks; in htb_class_mode() local
507 if ((toks = (cl->ctokens + *diff)) < htb_lowater(cl)) { in htb_class_mode()
508 *diff = -toks; in htb_class_mode()
512 if ((toks = (cl->tokens + *diff)) >= htb_hiwater(cl)) in htb_class_mode()
515 *diff = -toks; in htb_class_mode()
636 s64 toks = diff + cl->tokens; in htb_accnt_tokens() local
638 if (toks > cl->buffer) in htb_accnt_tokens()
639 toks = cl->buffer; in htb_accnt_tokens()
640 toks -= (s64) psched_l2t_ns(&cl->rate, bytes); in htb_accnt_tokens()
641 if (toks <= -cl->mbuffer) in htb_accnt_tokens()
[all …]
/Linux-v4.19/block/
Dsed-opal.c78 struct opal_resp_tok toks[MAX_TOKS]; member
696 tok = &resp->toks[n]; in response_get_token()
835 iter = resp->toks; in response_parse()
886 token = &resp->toks[n]; in response_get_string()
925 if (resp->toks[n].type != OPAL_DTA_TOKENID_UINT) { in response_get_u64()
927 resp->toks[n].type); in response_get_u64()
931 if (!(resp->toks[n].width == OPAL_WIDTH_TINY || in response_get_u64()
932 resp->toks[n].width == OPAL_WIDTH_SHORT)) { in response_get_u64()
934 resp->toks[n].width); in response_get_u64()
938 return resp->toks[n].stored.u; in response_get_u64()