• Home
  • Raw
  • Download

Lines Matching refs:sch

144 	struct Qdisc	*sch;  member
163 static unsigned int sfq_classify(struct sk_buff *skb, struct Qdisc *sch, in sfq_classify() argument
166 struct sfq_sched_data *q = qdisc_priv(sch); in sfq_classify()
171 if (TC_H_MAJ(skb->priority) == sch->handle && in sfq_classify()
293 static unsigned int sfq_drop(struct Qdisc *sch, struct sk_buff **to_free) in sfq_drop() argument
295 struct sfq_sched_data *q = qdisc_priv(sch); in sfq_drop()
310 sch->q.qlen--; in sfq_drop()
311 qdisc_qstats_backlog_dec(sch, skb); in sfq_drop()
312 qdisc_drop(skb, sch, to_free); in sfq_drop()
346 sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) in sfq_enqueue() argument
348 struct sfq_sched_data *q = qdisc_priv(sch); in sfq_enqueue()
356 hash = sfq_classify(skb, sch, &ret); in sfq_enqueue()
359 qdisc_qstats_drop(sch); in sfq_enqueue()
370 return qdisc_drop(skb, sch, to_free); in sfq_enqueue()
389 qdisc_qstats_overlimit(sch); in sfq_enqueue()
406 qdisc_qstats_overlimit(sch); in sfq_enqueue()
427 return qdisc_drop(skb, sch, to_free); in sfq_enqueue()
432 sch->qstats.backlog -= delta; in sfq_enqueue()
434 qdisc_drop(head, sch, to_free); in sfq_enqueue()
437 qdisc_tree_reduce_backlog(sch, 0, delta); in sfq_enqueue()
442 qdisc_qstats_backlog_inc(sch, skb); in sfq_enqueue()
461 if (++sch->q.qlen <= q->limit) in sfq_enqueue()
465 dropped = sfq_drop(sch, to_free); in sfq_enqueue()
470 qdisc_tree_reduce_backlog(sch, 0, dropped - qdisc_pkt_len(skb)); in sfq_enqueue()
475 qdisc_tree_reduce_backlog(sch, 1, dropped); in sfq_enqueue()
480 sfq_dequeue(struct Qdisc *sch) in sfq_dequeue() argument
482 struct sfq_sched_data *q = qdisc_priv(sch); in sfq_dequeue()
501 qdisc_bstats_update(sch, skb); in sfq_dequeue()
502 sch->q.qlen--; in sfq_dequeue()
503 qdisc_qstats_backlog_dec(sch, skb); in sfq_dequeue()
521 sfq_reset(struct Qdisc *sch) in sfq_reset() argument
525 while ((skb = sfq_dequeue(sch)) != NULL) in sfq_reset()
535 static void sfq_rehash(struct Qdisc *sch) in sfq_rehash() argument
537 struct sfq_sched_data *q = qdisc_priv(sch); in sfq_rehash()
571 qdisc_qstats_backlog_dec(sch, skb); in sfq_rehash()
601 sch->q.qlen -= dropped; in sfq_rehash()
602 qdisc_tree_reduce_backlog(sch, dropped, drop_len); in sfq_rehash()
608 struct Qdisc *sch = q->sch; in sfq_perturbation() local
609 spinlock_t *root_lock = qdisc_lock(qdisc_root_sleeping(sch)); in sfq_perturbation()
616 sfq_rehash(sch); in sfq_perturbation()
623 static int sfq_change(struct Qdisc *sch, struct nlattr *opt) in sfq_change() argument
625 struct sfq_sched_data *q = qdisc_priv(sch); in sfq_change()
657 sch_tree_lock(sch); in sfq_change()
689 qlen = sch->q.qlen; in sfq_change()
690 while (sch->q.qlen > q->limit) { in sfq_change()
691 dropped += sfq_drop(sch, &to_free); in sfq_change()
697 qdisc_tree_reduce_backlog(sch, qlen - sch->q.qlen, dropped); in sfq_change()
704 sch_tree_unlock(sch); in sfq_change()
719 static void sfq_destroy(struct Qdisc *sch) in sfq_destroy() argument
721 struct sfq_sched_data *q = qdisc_priv(sch); in sfq_destroy()
731 static int sfq_init(struct Qdisc *sch, struct nlattr *opt, in sfq_init() argument
734 struct sfq_sched_data *q = qdisc_priv(sch); in sfq_init()
738 q->sch = sch; in sfq_init()
741 err = tcf_block_get(&q->block, &q->filter_list, sch, extack); in sfq_init()
756 q->quantum = psched_mtu(qdisc_dev(sch)); in sfq_init()
762 int err = sfq_change(sch, opt); in sfq_init()
782 sch->flags |= TCQ_F_CAN_BYPASS; in sfq_init()
784 sch->flags &= ~TCQ_F_CAN_BYPASS; in sfq_init()
788 static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb) in sfq_dump() argument
790 struct sfq_sched_data *q = qdisc_priv(sch); in sfq_dump()
825 static struct Qdisc *sfq_leaf(struct Qdisc *sch, unsigned long arg) in sfq_leaf() argument
830 static unsigned long sfq_find(struct Qdisc *sch, u32 classid) in sfq_find() argument
835 static unsigned long sfq_bind(struct Qdisc *sch, unsigned long parent, in sfq_bind() argument
845 static struct tcf_block *sfq_tcf_block(struct Qdisc *sch, unsigned long cl, in sfq_tcf_block() argument
848 struct sfq_sched_data *q = qdisc_priv(sch); in sfq_tcf_block()
855 static int sfq_dump_class(struct Qdisc *sch, unsigned long cl, in sfq_dump_class() argument
862 static int sfq_dump_class_stats(struct Qdisc *sch, unsigned long cl, in sfq_dump_class_stats() argument
865 struct sfq_sched_data *q = qdisc_priv(sch); in sfq_dump_class_stats()
882 static void sfq_walk(struct Qdisc *sch, struct qdisc_walker *arg) in sfq_walk() argument
884 struct sfq_sched_data *q = qdisc_priv(sch); in sfq_walk()
896 if (arg->fn(sch, i + 1, arg) < 0) { in sfq_walk()