• Home
  • Raw
  • Download

Lines Matching refs:sch

71 	struct Qdisc *sch = ctx;  in dequeue_func()  local
72 struct sk_buff *skb = __qdisc_dequeue_head(&sch->q); in dequeue_func()
75 sch->qstats.backlog -= qdisc_pkt_len(skb); in dequeue_func()
83 struct Qdisc *sch = ctx; in drop_func() local
86 qdisc_qstats_drop(sch); in drop_func()
89 static struct sk_buff *codel_qdisc_dequeue(struct Qdisc *sch) in codel_qdisc_dequeue() argument
91 struct codel_sched_data *q = qdisc_priv(sch); in codel_qdisc_dequeue()
94 skb = codel_dequeue(sch, &sch->qstats.backlog, &q->params, &q->vars, in codel_qdisc_dequeue()
101 if (q->stats.drop_count && sch->q.qlen) { in codel_qdisc_dequeue()
102 qdisc_tree_reduce_backlog(sch, q->stats.drop_count, q->stats.drop_len); in codel_qdisc_dequeue()
107 qdisc_bstats_update(sch, skb); in codel_qdisc_dequeue()
111 static int codel_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch, in codel_qdisc_enqueue() argument
116 if (likely(qdisc_qlen(sch) < sch->limit)) { in codel_qdisc_enqueue()
118 return qdisc_enqueue_tail(skb, sch); in codel_qdisc_enqueue()
120 q = qdisc_priv(sch); in codel_qdisc_enqueue()
122 return qdisc_drop(skb, sch, to_free); in codel_qdisc_enqueue()
133 static int codel_change(struct Qdisc *sch, struct nlattr *opt, in codel_change() argument
136 struct codel_sched_data *q = qdisc_priv(sch); in codel_change()
149 sch_tree_lock(sch); in codel_change()
170 sch->limit = nla_get_u32(tb[TCA_CODEL_LIMIT]); in codel_change()
175 qlen = sch->q.qlen; in codel_change()
176 while (sch->q.qlen > sch->limit) { in codel_change()
177 struct sk_buff *skb = __qdisc_dequeue_head(&sch->q); in codel_change()
180 qdisc_qstats_backlog_dec(sch, skb); in codel_change()
181 rtnl_qdisc_drop(skb, sch); in codel_change()
183 qdisc_tree_reduce_backlog(sch, qlen - sch->q.qlen, dropped); in codel_change()
185 sch_tree_unlock(sch); in codel_change()
189 static int codel_init(struct Qdisc *sch, struct nlattr *opt, in codel_init() argument
192 struct codel_sched_data *q = qdisc_priv(sch); in codel_init()
194 sch->limit = DEFAULT_CODEL_LIMIT; in codel_init()
199 q->params.mtu = psched_mtu(qdisc_dev(sch)); in codel_init()
202 int err = codel_change(sch, opt, extack); in codel_init()
208 if (sch->limit >= 1) in codel_init()
209 sch->flags |= TCQ_F_CAN_BYPASS; in codel_init()
211 sch->flags &= ~TCQ_F_CAN_BYPASS; in codel_init()
216 static int codel_dump(struct Qdisc *sch, struct sk_buff *skb) in codel_dump() argument
218 struct codel_sched_data *q = qdisc_priv(sch); in codel_dump()
228 sch->limit) || in codel_dump()
245 static int codel_dump_stats(struct Qdisc *sch, struct gnet_dump *d) in codel_dump_stats() argument
247 const struct codel_sched_data *q = qdisc_priv(sch); in codel_dump_stats()
271 static void codel_reset(struct Qdisc *sch) in codel_reset() argument
273 struct codel_sched_data *q = qdisc_priv(sch); in codel_reset()
275 qdisc_reset_queue(sch); in codel_reset()