Lines Matching defs:sch

27 static void mqprio_destroy(struct Qdisc *sch)
29 struct net_device *dev = qdisc_dev(sch);
30 struct mqprio_sched *priv = qdisc_priv(sch);
92 static int mqprio_init(struct Qdisc *sch, struct nlattr *opt)
94 struct net_device *dev = qdisc_dev(sch);
95 struct mqprio_sched *priv = qdisc_priv(sch);
104 if (sch->parent != TC_H_ROOT)
128 TC_H_MAKE(TC_H_MAJ(sch->handle),
158 sch->flags |= TCQ_F_MQROOT;
162 mqprio_destroy(sch);
166 static void mqprio_attach(struct Qdisc *sch)
168 struct net_device *dev = qdisc_dev(sch);
169 struct mqprio_sched *priv = qdisc_priv(sch);
186 static struct netdev_queue *mqprio_queue_get(struct Qdisc *sch,
189 struct net_device *dev = qdisc_dev(sch);
197 static int mqprio_graft(struct Qdisc *sch, unsigned long cl, struct Qdisc *new,
200 struct net_device *dev = qdisc_dev(sch);
201 struct netdev_queue *dev_queue = mqprio_queue_get(sch, cl);
220 static int mqprio_dump(struct Qdisc *sch, struct sk_buff *skb)
222 struct net_device *dev = qdisc_dev(sch);
223 struct mqprio_sched *priv = qdisc_priv(sch);
229 sch->q.qlen = 0;
230 memset(&sch->bstats, 0, sizeof(sch->bstats));
231 memset(&sch->qstats, 0, sizeof(sch->qstats));
236 sch->q.qlen += qdisc->q.qlen;
237 sch->bstats.bytes += qdisc->bstats.bytes;
238 sch->bstats.packets += qdisc->bstats.packets;
239 sch->qstats.backlog += qdisc->qstats.backlog;
240 sch->qstats.drops += qdisc->qstats.drops;
241 sch->qstats.requeues += qdisc->qstats.requeues;
242 sch->qstats.overlimits += qdisc->qstats.overlimits;
264 static struct Qdisc *mqprio_leaf(struct Qdisc *sch, unsigned long cl)
266 struct netdev_queue *dev_queue = mqprio_queue_get(sch, cl);
274 static unsigned long mqprio_get(struct Qdisc *sch, u32 classid)
276 struct net_device *dev = qdisc_dev(sch);
284 static void mqprio_put(struct Qdisc *sch, unsigned long cl)
288 static int mqprio_dump_class(struct Qdisc *sch, unsigned long cl,
291 struct net_device *dev = qdisc_dev(sch);
300 dev_queue = mqprio_queue_get(sch, cl);
309 TC_H_MAKE(TC_H_MAJ(sch->handle),
320 static int mqprio_dump_class_stats(struct Qdisc *sch, unsigned long cl,
325 struct net_device *dev = qdisc_dev(sch);
362 struct netdev_queue *dev_queue = mqprio_queue_get(sch, cl);
364 sch = dev_queue->qdisc_sleeping;
365 if (gnet_stats_copy_basic(d, NULL, &sch->bstats) < 0 ||
367 &sch->qstats, sch->q.qlen) < 0)
373 static void mqprio_walk(struct Qdisc *sch, struct qdisc_walker *arg)
375 struct net_device *dev = qdisc_dev(sch);
386 if (arg->fn(sch, ntx + 1, arg) < 0) {