Lines Matching refs: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
74 s64 credits; /* in bytes */
119 if (sch->q.qlen == 0 && q->credits > 0) {
120 /* We need to stop accumulating credits when there's
121 * no enqueued packets and q->credits is positive.
123 q->credits = 0;
144 static s64 delay_from_credits(s64 credits, s64 slope)
149 return div64_s64(-credits * NSEC_PER_SEC, slope);
181 s64 credits;
189 if (q->credits < 0) {
190 credits = timediff_to_credits(now - q->last, q->idleslope);
192 credits = q->credits + credits;
193 q->credits = min_t(s64, credits, q->hicredit);
195 if (q->credits < 0) {
198 delay = delay_from_credits(q->credits, q->idleslope);
213 * amount of q->credits.
215 credits = credits_from_len(len, q->sendslope,
217 credits += q->credits;
219 q->credits = max_t(s64, credits, q->locredit);