Lines Matching refs:sch

31 prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)  in prio_classify()  argument
33 struct prio_sched_data *q = qdisc_priv(sch); in prio_classify()
40 if (TC_H_MAJ(skb->priority) != sch->handle) { in prio_classify()
69 prio_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) in prio_enqueue() argument
75 qdisc = prio_classify(skb, sch, &ret); in prio_enqueue()
80 qdisc_qstats_drop(sch); in prio_enqueue()
88 sch->qstats.backlog += len; in prio_enqueue()
89 sch->q.qlen++; in prio_enqueue()
93 qdisc_qstats_drop(sch); in prio_enqueue()
97 static struct sk_buff *prio_peek(struct Qdisc *sch) in prio_peek() argument
99 struct prio_sched_data *q = qdisc_priv(sch); in prio_peek()
111 static struct sk_buff *prio_dequeue(struct Qdisc *sch) in prio_dequeue() argument
113 struct prio_sched_data *q = qdisc_priv(sch); in prio_dequeue()
120 qdisc_bstats_update(sch, skb); in prio_dequeue()
121 qdisc_qstats_backlog_dec(sch, skb); in prio_dequeue()
122 sch->q.qlen--; in prio_dequeue()
131 prio_reset(struct Qdisc *sch) in prio_reset() argument
134 struct prio_sched_data *q = qdisc_priv(sch); in prio_reset()
138 sch->qstats.backlog = 0; in prio_reset()
139 sch->q.qlen = 0; in prio_reset()
142 static int prio_offload(struct Qdisc *sch, struct tc_prio_qopt *qopt) in prio_offload() argument
144 struct net_device *dev = qdisc_dev(sch); in prio_offload()
146 .handle = sch->handle, in prio_offload()
147 .parent = sch->parent, in prio_offload()
158 opt.replace_params.qstats = &sch->qstats; in prio_offload()
167 prio_destroy(struct Qdisc *sch) in prio_destroy() argument
170 struct prio_sched_data *q = qdisc_priv(sch); in prio_destroy()
173 prio_offload(sch, NULL); in prio_destroy()
178 static int prio_tune(struct Qdisc *sch, struct nlattr *opt, in prio_tune() argument
181 struct prio_sched_data *q = qdisc_priv(sch); in prio_tune()
200 queues[i] = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, in prio_tune()
201 TC_H_MAKE(sch->handle, i + 1), in prio_tune()
210 prio_offload(sch, qopt); in prio_tune()
211 sch_tree_lock(sch); in prio_tune()
224 sch_tree_unlock(sch); in prio_tune()
231 static int prio_init(struct Qdisc *sch, struct nlattr *opt, in prio_init() argument
234 struct prio_sched_data *q = qdisc_priv(sch); in prio_init()
240 err = tcf_block_get(&q->block, &q->filter_list, sch, extack); in prio_init()
244 return prio_tune(sch, opt, extack); in prio_init()
247 static int prio_dump_offload(struct Qdisc *sch) in prio_dump_offload() argument
251 .handle = sch->handle, in prio_dump_offload()
252 .parent = sch->parent, in prio_dump_offload()
255 .bstats = &sch->bstats, in prio_dump_offload()
256 .qstats = &sch->qstats, in prio_dump_offload()
261 return qdisc_offload_dump_helper(sch, TC_SETUP_QDISC_PRIO, &hw_stats); in prio_dump_offload()
264 static int prio_dump(struct Qdisc *sch, struct sk_buff *skb) in prio_dump() argument
266 struct prio_sched_data *q = qdisc_priv(sch); in prio_dump()
274 err = prio_dump_offload(sch); in prio_dump()
288 static int prio_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, in prio_graft() argument
291 struct prio_sched_data *q = qdisc_priv(sch); in prio_graft()
296 new = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, in prio_graft()
297 TC_H_MAKE(sch->handle, arg), extack); in prio_graft()
304 *old = qdisc_replace(sch, new, &q->queues[band]); in prio_graft()
306 graft_offload.handle = sch->handle; in prio_graft()
307 graft_offload.parent = sch->parent; in prio_graft()
312 qdisc_offload_graft_helper(qdisc_dev(sch), sch, new, *old, in prio_graft()
319 prio_leaf(struct Qdisc *sch, unsigned long arg) in prio_leaf() argument
321 struct prio_sched_data *q = qdisc_priv(sch); in prio_leaf()
327 static unsigned long prio_find(struct Qdisc *sch, u32 classid) in prio_find() argument
329 struct prio_sched_data *q = qdisc_priv(sch); in prio_find()
337 static unsigned long prio_bind(struct Qdisc *sch, unsigned long parent, u32 classid) in prio_bind() argument
339 return prio_find(sch, classid); in prio_bind()
347 static int prio_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, in prio_dump_class() argument
350 struct prio_sched_data *q = qdisc_priv(sch); in prio_dump_class()
357 static int prio_dump_class_stats(struct Qdisc *sch, unsigned long cl, in prio_dump_class_stats() argument
360 struct prio_sched_data *q = qdisc_priv(sch); in prio_dump_class_stats()
372 static void prio_walk(struct Qdisc *sch, struct qdisc_walker *arg) in prio_walk() argument
374 struct prio_sched_data *q = qdisc_priv(sch); in prio_walk()
385 if (arg->fn(sch, prio + 1, arg) < 0) { in prio_walk()
393 static struct tcf_block *prio_tcf_block(struct Qdisc *sch, unsigned long cl, in prio_tcf_block() argument
396 struct prio_sched_data *q = qdisc_priv(sch); in prio_tcf_block()