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()
140 static int prio_offload(struct Qdisc *sch, struct tc_prio_qopt *qopt) in prio_offload() argument
142 struct net_device *dev = qdisc_dev(sch); in prio_offload()
144 .handle = sch->handle, in prio_offload()
145 .parent = sch->parent, in prio_offload()
156 opt.replace_params.qstats = &sch->qstats; in prio_offload()
165 prio_destroy(struct Qdisc *sch) in prio_destroy() argument
168 struct prio_sched_data *q = qdisc_priv(sch); in prio_destroy()
171 prio_offload(sch, NULL); in prio_destroy()
176 static int prio_tune(struct Qdisc *sch, struct nlattr *opt, in prio_tune() argument
179 struct prio_sched_data *q = qdisc_priv(sch); in prio_tune()
198 queues[i] = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, in prio_tune()
199 TC_H_MAKE(sch->handle, i + 1), in prio_tune()
208 prio_offload(sch, qopt); in prio_tune()
209 sch_tree_lock(sch); in prio_tune()
222 sch_tree_unlock(sch); in prio_tune()
229 static int prio_init(struct Qdisc *sch, struct nlattr *opt, in prio_init() argument
232 struct prio_sched_data *q = qdisc_priv(sch); in prio_init()
238 err = tcf_block_get(&q->block, &q->filter_list, sch, extack); in prio_init()
242 return prio_tune(sch, opt, extack); in prio_init()
245 static int prio_dump_offload(struct Qdisc *sch) in prio_dump_offload() argument
249 .handle = sch->handle, in prio_dump_offload()
250 .parent = sch->parent, in prio_dump_offload()
253 .bstats = &sch->bstats, in prio_dump_offload()
254 .qstats = &sch->qstats, in prio_dump_offload()
259 return qdisc_offload_dump_helper(sch, TC_SETUP_QDISC_PRIO, &hw_stats); in prio_dump_offload()
262 static int prio_dump(struct Qdisc *sch, struct sk_buff *skb) in prio_dump() argument
264 struct prio_sched_data *q = qdisc_priv(sch); in prio_dump()
272 err = prio_dump_offload(sch); in prio_dump()
286 static int prio_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, in prio_graft() argument
289 struct prio_sched_data *q = qdisc_priv(sch); in prio_graft()
294 new = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, in prio_graft()
295 TC_H_MAKE(sch->handle, arg), extack); in prio_graft()
302 *old = qdisc_replace(sch, new, &q->queues[band]); in prio_graft()
304 graft_offload.handle = sch->handle; in prio_graft()
305 graft_offload.parent = sch->parent; in prio_graft()
310 qdisc_offload_graft_helper(qdisc_dev(sch), sch, new, *old, in prio_graft()
317 prio_leaf(struct Qdisc *sch, unsigned long arg) in prio_leaf() argument
319 struct prio_sched_data *q = qdisc_priv(sch); in prio_leaf()
325 static unsigned long prio_find(struct Qdisc *sch, u32 classid) in prio_find() argument
327 struct prio_sched_data *q = qdisc_priv(sch); in prio_find()
335 static unsigned long prio_bind(struct Qdisc *sch, unsigned long parent, u32 classid) in prio_bind() argument
337 return prio_find(sch, classid); in prio_bind()
345 static int prio_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, in prio_dump_class() argument
348 struct prio_sched_data *q = qdisc_priv(sch); in prio_dump_class()
355 static int prio_dump_class_stats(struct Qdisc *sch, unsigned long cl, in prio_dump_class_stats() argument
358 struct prio_sched_data *q = qdisc_priv(sch); in prio_dump_class_stats()
362 if (gnet_stats_copy_basic(qdisc_root_sleeping_running(sch), in prio_dump_class_stats()
370 static void prio_walk(struct Qdisc *sch, struct qdisc_walker *arg) in prio_walk() argument
372 struct prio_sched_data *q = qdisc_priv(sch); in prio_walk()
383 if (arg->fn(sch, prio + 1, arg) < 0) { in prio_walk()
391 static struct tcf_block *prio_tcf_block(struct Qdisc *sch, unsigned long cl, in prio_tcf_block() argument
394 struct prio_sched_data *q = qdisc_priv(sch); in prio_tcf_block()