Lines Matching refs:sch

81 	int (*enqueue)(struct sk_buff *skb, struct Qdisc *sch,
83 struct sk_buff *(*dequeue)(struct Qdisc *sch);
88 static int cbs_child_enqueue(struct sk_buff *skb, struct Qdisc *sch, in cbs_child_enqueue() argument
99 sch->qstats.backlog += len; in cbs_child_enqueue()
100 sch->q.qlen++; in cbs_child_enqueue()
105 static int cbs_enqueue_offload(struct sk_buff *skb, struct Qdisc *sch, in cbs_enqueue_offload() argument
108 struct cbs_sched_data *q = qdisc_priv(sch); in cbs_enqueue_offload()
111 return cbs_child_enqueue(skb, sch, qdisc, to_free); in cbs_enqueue_offload()
114 static int cbs_enqueue_soft(struct sk_buff *skb, struct Qdisc *sch, in cbs_enqueue_soft() argument
117 struct cbs_sched_data *q = qdisc_priv(sch); in cbs_enqueue_soft()
120 if (sch->q.qlen == 0 && q->credits > 0) { in cbs_enqueue_soft()
128 return cbs_child_enqueue(skb, sch, qdisc, to_free); in cbs_enqueue_soft()
131 static int cbs_enqueue(struct sk_buff *skb, struct Qdisc *sch, in cbs_enqueue() argument
134 struct cbs_sched_data *q = qdisc_priv(sch); in cbs_enqueue()
136 return q->enqueue(skb, sch, to_free); in cbs_enqueue()
161 static struct sk_buff *cbs_child_dequeue(struct Qdisc *sch, struct Qdisc *child) in cbs_child_dequeue() argument
169 qdisc_qstats_backlog_dec(sch, skb); in cbs_child_dequeue()
170 qdisc_bstats_update(sch, skb); in cbs_child_dequeue()
171 sch->q.qlen--; in cbs_child_dequeue()
176 static struct sk_buff *cbs_dequeue_soft(struct Qdisc *sch) in cbs_dequeue_soft() argument
178 struct cbs_sched_data *q = qdisc_priv(sch); in cbs_dequeue_soft()
207 skb = cbs_child_dequeue(sch, qdisc); in cbs_dequeue_soft()
231 static struct sk_buff *cbs_dequeue_offload(struct Qdisc *sch) in cbs_dequeue_offload() argument
233 struct cbs_sched_data *q = qdisc_priv(sch); in cbs_dequeue_offload()
236 return cbs_child_dequeue(sch, qdisc); in cbs_dequeue_offload()
239 static struct sk_buff *cbs_dequeue(struct Qdisc *sch) in cbs_dequeue() argument
241 struct cbs_sched_data *q = qdisc_priv(sch); in cbs_dequeue()
243 return q->dequeue(sch); in cbs_dequeue()
361 static int cbs_change(struct Qdisc *sch, struct nlattr *opt, in cbs_change() argument
364 struct cbs_sched_data *q = qdisc_priv(sch); in cbs_change()
365 struct net_device *dev = qdisc_dev(sch); in cbs_change()
401 static int cbs_init(struct Qdisc *sch, struct nlattr *opt, in cbs_init() argument
404 struct cbs_sched_data *q = qdisc_priv(sch); in cbs_init()
405 struct net_device *dev = qdisc_dev(sch); in cbs_init()
412 q->qdisc = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, in cbs_init()
413 sch->handle, extack); in cbs_init()
423 q->queue = sch->dev_queue - netdev_get_tx_queue(dev, 0); in cbs_init()
428 qdisc_watchdog_init(&q->watchdog, sch); in cbs_init()
430 return cbs_change(sch, opt, extack); in cbs_init()
433 static void cbs_destroy(struct Qdisc *sch) in cbs_destroy() argument
435 struct cbs_sched_data *q = qdisc_priv(sch); in cbs_destroy()
436 struct net_device *dev = qdisc_dev(sch); in cbs_destroy()
452 static int cbs_dump(struct Qdisc *sch, struct sk_buff *skb) in cbs_dump() argument
454 struct cbs_sched_data *q = qdisc_priv(sch); in cbs_dump()
478 static int cbs_dump_class(struct Qdisc *sch, unsigned long cl, in cbs_dump_class() argument
481 struct cbs_sched_data *q = qdisc_priv(sch); in cbs_dump_class()
492 static int cbs_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, in cbs_graft() argument
495 struct cbs_sched_data *q = qdisc_priv(sch); in cbs_graft()
498 new = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, in cbs_graft()
499 sch->handle, NULL); in cbs_graft()
504 *old = qdisc_replace(sch, new, &q->qdisc); in cbs_graft()
508 static struct Qdisc *cbs_leaf(struct Qdisc *sch, unsigned long arg) in cbs_leaf() argument
510 struct cbs_sched_data *q = qdisc_priv(sch); in cbs_leaf()
515 static unsigned long cbs_find(struct Qdisc *sch, u32 classid) in cbs_find() argument
520 static void cbs_walk(struct Qdisc *sch, struct qdisc_walker *walker) in cbs_walk() argument
524 if (walker->fn(sch, 1, walker) < 0) { in cbs_walk()