Lines Matching full: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 */ member
120 if (sch->q.qlen == 0 && q->credits > 0) { in cbs_enqueue_soft()
121 /* We need to stop accumulating credits when there's in cbs_enqueue_soft()
122 * no enqueued packets and q->credits is positive. in cbs_enqueue_soft()
124 q->credits = 0; in cbs_enqueue_soft()
145 static s64 delay_from_credits(s64 credits, s64 slope) in delay_from_credits() argument
150 return div64_s64(-credits * NSEC_PER_SEC, slope); in delay_from_credits()
182 s64 credits; in cbs_dequeue_soft() local
190 if (q->credits < 0) { in cbs_dequeue_soft()
191 credits = timediff_to_credits(now - q->last, q->idleslope); in cbs_dequeue_soft()
193 credits = q->credits + credits; in cbs_dequeue_soft()
194 q->credits = min_t(s64, credits, q->hicredit); in cbs_dequeue_soft()
196 if (q->credits < 0) { in cbs_dequeue_soft()
199 delay = delay_from_credits(q->credits, q->idleslope); in cbs_dequeue_soft()
214 * amount of q->credits. in cbs_dequeue_soft()
216 credits = credits_from_len(len, q->sendslope, in cbs_dequeue_soft()
218 credits += q->credits; in cbs_dequeue_soft()
220 q->credits = max_t(s64, credits, q->locredit); in cbs_dequeue_soft()