• Home
  • Raw
  • Download

Lines Matching refs:q

121 	struct tbf_sched_data *q = qdisc_priv(sch);  in tbf_enqueue()  local
124 if (qdisc_pkt_len(skb) > q->max_size) in tbf_enqueue()
127 ret = qdisc_enqueue(skb, q->qdisc); in tbf_enqueue()
134 sch->q.qlen++; in tbf_enqueue()
140 struct tbf_sched_data *q = qdisc_priv(sch); in tbf_drop() local
143 if (q->qdisc->ops->drop && (len = q->qdisc->ops->drop(q->qdisc)) != 0) { in tbf_drop()
144 sch->q.qlen--; in tbf_drop()
152 struct tbf_sched_data *q = qdisc_priv(sch); in tbf_dequeue() local
155 skb = q->qdisc->ops->peek(q->qdisc); in tbf_dequeue()
164 toks = min_t(s64, now - q->t_c, q->buffer); in tbf_dequeue()
166 if (q->peak_present) { in tbf_dequeue()
167 ptoks = toks + q->ptokens; in tbf_dequeue()
168 if (ptoks > q->mtu) in tbf_dequeue()
169 ptoks = q->mtu; in tbf_dequeue()
170 ptoks -= (s64) psched_l2t_ns(&q->peak, len); in tbf_dequeue()
172 toks += q->tokens; in tbf_dequeue()
173 if (toks > q->buffer) in tbf_dequeue()
174 toks = q->buffer; in tbf_dequeue()
175 toks -= (s64) psched_l2t_ns(&q->rate, len); in tbf_dequeue()
178 skb = qdisc_dequeue_peeked(q->qdisc); in tbf_dequeue()
182 q->t_c = now; in tbf_dequeue()
183 q->tokens = toks; in tbf_dequeue()
184 q->ptokens = ptoks; in tbf_dequeue()
185 sch->q.qlen--; in tbf_dequeue()
191 qdisc_watchdog_schedule_ns(&q->watchdog, in tbf_dequeue()
212 struct tbf_sched_data *q = qdisc_priv(sch); in tbf_reset() local
214 qdisc_reset(q->qdisc); in tbf_reset()
215 sch->q.qlen = 0; in tbf_reset()
216 q->t_c = ktime_to_ns(ktime_get()); in tbf_reset()
217 q->tokens = q->buffer; in tbf_reset()
218 q->ptokens = q->mtu; in tbf_reset()
219 qdisc_watchdog_cancel(&q->watchdog); in tbf_reset()
231 struct tbf_sched_data *q = qdisc_priv(sch); in tbf_change() local
276 if (q->qdisc != &noop_qdisc) { in tbf_change()
277 err = fifo_set_limit(q->qdisc, qopt->limit); in tbf_change()
290 qdisc_tree_decrease_qlen(q->qdisc, q->qdisc->q.qlen); in tbf_change()
291 qdisc_destroy(q->qdisc); in tbf_change()
292 q->qdisc = child; in tbf_change()
294 q->limit = qopt->limit; in tbf_change()
295 q->mtu = PSCHED_TICKS2NS(qopt->mtu); in tbf_change()
296 q->max_size = max_size; in tbf_change()
297 q->buffer = PSCHED_TICKS2NS(qopt->buffer); in tbf_change()
298 q->tokens = q->buffer; in tbf_change()
299 q->ptokens = q->mtu; in tbf_change()
301 psched_ratecfg_precompute(&q->rate, &rtab->rate); in tbf_change()
303 psched_ratecfg_precompute(&q->peak, &ptab->rate); in tbf_change()
304 q->peak_present = true; in tbf_change()
306 q->peak_present = false; in tbf_change()
321 struct tbf_sched_data *q = qdisc_priv(sch); in tbf_init() local
326 q->t_c = ktime_to_ns(ktime_get()); in tbf_init()
327 qdisc_watchdog_init(&q->watchdog, sch); in tbf_init()
328 q->qdisc = &noop_qdisc; in tbf_init()
335 struct tbf_sched_data *q = qdisc_priv(sch); in tbf_destroy() local
337 qdisc_watchdog_cancel(&q->watchdog); in tbf_destroy()
338 qdisc_destroy(q->qdisc); in tbf_destroy()
343 struct tbf_sched_data *q = qdisc_priv(sch); in tbf_dump() local
347 sch->qstats.backlog = q->qdisc->qstats.backlog; in tbf_dump()
352 opt.limit = q->limit; in tbf_dump()
353 psched_ratecfg_getrate(&opt.rate, &q->rate); in tbf_dump()
354 if (q->peak_present) in tbf_dump()
355 psched_ratecfg_getrate(&opt.peakrate, &q->peak); in tbf_dump()
358 opt.mtu = PSCHED_NS2TICKS(q->mtu); in tbf_dump()
359 opt.buffer = PSCHED_NS2TICKS(q->buffer); in tbf_dump()
374 struct tbf_sched_data *q = qdisc_priv(sch); in tbf_dump_class() local
377 tcm->tcm_info = q->qdisc->handle; in tbf_dump_class()
385 struct tbf_sched_data *q = qdisc_priv(sch); in tbf_graft() local
391 *old = q->qdisc; in tbf_graft()
392 q->qdisc = new; in tbf_graft()
393 qdisc_tree_decrease_qlen(*old, (*old)->q.qlen); in tbf_graft()
402 struct tbf_sched_data *q = qdisc_priv(sch); in tbf_leaf() local
403 return q->qdisc; in tbf_leaf()