Lines Matching defs:credits
20 * 'idleslope': Idleslope is the rate of credits that is
23 * when the current value of credits is equal or greater than
25 * credits is set to zero. This is the main tunable of the CBS
29 * Sendslope is the rate of credits that is depleted (it should be a
36 * 'hicredit': Hicredit defines the maximum amount of credits (in
46 * 'locredit': Locredit is the minimum amount of credits that can
75 s64 credits; /* in bytes */
120 if (sch->q.qlen == 0 && q->credits > 0) {
121 /* We need to stop accumulating credits when there's
122 * no enqueued packets and q->credits is positive.
124 q->credits = 0;
145 static s64 delay_from_credits(s64 credits, s64 slope)
150 return div64_s64(-credits * NSEC_PER_SEC, slope);
182 s64 credits;
190 if (q->credits < 0) {
191 credits = timediff_to_credits(now - q->last, q->idleslope);
193 credits = q->credits + credits;
194 q->credits = min_t(s64, credits, q->hicredit);
196 if (q->credits < 0) {
199 delay = delay_from_credits(q->credits, q->idleslope);
214 * amount of q->credits.
216 credits = credits_from_len(len, q->sendslope,
218 credits += q->credits;
220 q->credits = max_t(s64, credits, q->locredit);