Lines Matching defs:tokens
52 * tokens equal to committed burst & peak burst respectively initially.
53 * When a packet arrives, tokens in Tc or Tp are updated at the committed
55 * If there are enough tokens in Tc, the packet is Green, else if there are
56 * enough tokens in Tp, the packet is Yellow, else the packet is Red. In case
62 /* Updating tokens */
238 uint64_t tokens;
242 tokens = (cfg_parms->committed_rate * diff) /
246 * Add tokens at the committed rate to
251 if ((tokenmt_data->committed_tokens + tokens) >
253 tokens = tokenmt_data->committed_tokens
254 + tokens -
261 tokens);
264 tokens;
269 tokens = (diff * cfg_parms->committed_rate) /
273 tokenmt_data->committed_tokens + tokens);
276 tokens = (diff * cfg_parms->peak_rate) /
280 tokenmt_data->peak_tokens + tokens);