Home
last modified time | relevance | path

Searched refs:sch (Results 1 – 25 of 42) sorted by relevance

12

/net/sched/
Dsch_fifo.c19 static int bfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch, in bfifo_enqueue() argument
22 if (likely(sch->qstats.backlog + qdisc_pkt_len(skb) <= sch->limit)) in bfifo_enqueue()
23 return qdisc_enqueue_tail(skb, sch); in bfifo_enqueue()
25 return qdisc_drop(skb, sch, to_free); in bfifo_enqueue()
28 static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch, in pfifo_enqueue() argument
31 if (likely(sch->q.qlen < sch->limit)) in pfifo_enqueue()
32 return qdisc_enqueue_tail(skb, sch); in pfifo_enqueue()
34 return qdisc_drop(skb, sch, to_free); in pfifo_enqueue()
37 static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch, in pfifo_tail_enqueue() argument
42 if (likely(sch->q.qlen < sch->limit)) in pfifo_tail_enqueue()
[all …]
Dsch_mq.c24 static int mq_offload(struct Qdisc *sch, enum tc_mq_command cmd) in mq_offload() argument
26 struct net_device *dev = qdisc_dev(sch); in mq_offload()
29 .handle = sch->handle, in mq_offload()
38 static int mq_offload_stats(struct Qdisc *sch) in mq_offload_stats() argument
42 .handle = sch->handle, in mq_offload_stats()
44 .bstats = &sch->bstats, in mq_offload_stats()
45 .qstats = &sch->qstats, in mq_offload_stats()
49 return qdisc_offload_dump_helper(sch, TC_SETUP_QDISC_MQ, &opt); in mq_offload_stats()
52 static void mq_destroy(struct Qdisc *sch) in mq_destroy() argument
54 struct net_device *dev = qdisc_dev(sch); in mq_destroy()
[all …]
Dsch_prio.c31 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
[all …]
Dsch_red.c44 struct Qdisc *sch; member
70 static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch, in red_enqueue() argument
73 struct red_sched_data *q = qdisc_priv(sch); in red_enqueue()
90 qdisc_qstats_overlimit(sch); in red_enqueue()
98 skb = tcf_qevent_handle(&q->qe_mark, sch, skb, to_free, &ret); in red_enqueue()
110 qdisc_qstats_overlimit(sch); in red_enqueue()
118 skb = tcf_qevent_handle(&q->qe_mark, sch, skb, to_free, &ret); in red_enqueue()
133 sch->qstats.backlog += len; in red_enqueue()
134 sch->q.qlen++; in red_enqueue()
137 qdisc_qstats_drop(sch); in red_enqueue()
[all …]
Dsch_ingress.c24 static struct Qdisc *ingress_leaf(struct Qdisc *sch, unsigned long arg) in ingress_leaf() argument
29 static unsigned long ingress_find(struct Qdisc *sch, u32 classid) in ingress_find() argument
34 static unsigned long ingress_bind_filter(struct Qdisc *sch, in ingress_bind_filter() argument
37 return ingress_find(sch, classid); in ingress_bind_filter()
40 static void ingress_unbind_filter(struct Qdisc *sch, unsigned long cl) in ingress_unbind_filter() argument
44 static void ingress_walk(struct Qdisc *sch, struct qdisc_walker *walker) in ingress_walk() argument
48 static struct tcf_block *ingress_tcf_block(struct Qdisc *sch, unsigned long cl, in ingress_tcf_block() argument
51 struct ingress_sched_data *q = qdisc_priv(sch); in ingress_tcf_block()
63 static void ingress_ingress_block_set(struct Qdisc *sch, u32 block_index) in ingress_ingress_block_set() argument
65 struct ingress_sched_data *q = qdisc_priv(sch); in ingress_ingress_block_set()
[all …]
Dsch_ets.c77 static int ets_quantum_parse(struct Qdisc *sch, const struct nlattr *attr, in ets_quantum_parse() argument
90 ets_class_from_arg(struct Qdisc *sch, unsigned long arg) in ets_class_from_arg() argument
92 struct ets_sched *q = qdisc_priv(sch); in ets_class_from_arg()
97 static u32 ets_class_id(struct Qdisc *sch, const struct ets_class *cl) in ets_class_id() argument
99 struct ets_sched *q = qdisc_priv(sch); in ets_class_id()
102 return TC_H_MAKE(sch->handle, band + 1); in ets_class_id()
105 static void ets_offload_change(struct Qdisc *sch) in ets_offload_change() argument
107 struct net_device *dev = qdisc_dev(sch); in ets_offload_change()
108 struct ets_sched *q = qdisc_priv(sch); in ets_offload_change()
122 qopt.handle = sch->handle; in ets_offload_change()
[all …]
Dsch_codel.c71 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()
[all …]
Dsch_tbf.c142 static void tbf_offload_change(struct Qdisc *sch) in tbf_offload_change() argument
144 struct tbf_sched_data *q = qdisc_priv(sch); in tbf_offload_change()
145 struct net_device *dev = qdisc_dev(sch); in tbf_offload_change()
152 qopt.handle = sch->handle; in tbf_offload_change()
153 qopt.parent = sch->parent; in tbf_offload_change()
156 qopt.replace_params.qstats = &sch->qstats; in tbf_offload_change()
161 static void tbf_offload_destroy(struct Qdisc *sch) in tbf_offload_destroy() argument
163 struct net_device *dev = qdisc_dev(sch); in tbf_offload_destroy()
170 qopt.handle = sch->handle; in tbf_offload_destroy()
171 qopt.parent = sch->parent; in tbf_offload_destroy()
[all …]
Dsch_multiq.c30 multiq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) in multiq_classify() argument
32 struct multiq_sched_data *q = qdisc_priv(sch); in multiq_classify()
60 multiq_enqueue(struct sk_buff *skb, struct Qdisc *sch, in multiq_enqueue() argument
66 qdisc = multiq_classify(skb, sch, &ret); in multiq_enqueue()
71 qdisc_qstats_drop(sch); in multiq_enqueue()
79 sch->q.qlen++; in multiq_enqueue()
83 qdisc_qstats_drop(sch); in multiq_enqueue()
87 static struct sk_buff *multiq_dequeue(struct Qdisc *sch) in multiq_dequeue() argument
89 struct multiq_sched_data *q = qdisc_priv(sch); in multiq_dequeue()
104 netdev_get_tx_queue(qdisc_dev(sch), q->curband))) { in multiq_dequeue()
[all …]
Dsch_drr.c38 static struct drr_class *drr_find_class(struct Qdisc *sch, u32 classid) in drr_find_class() argument
40 struct drr_sched *q = qdisc_priv(sch); in drr_find_class()
53 static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid, in drr_change_class() argument
57 struct drr_sched *q = qdisc_priv(sch); in drr_change_class()
81 quantum = psched_mtu(qdisc_dev(sch)); in drr_change_class()
95 sch_tree_lock(sch); in drr_change_class()
98 sch_tree_unlock(sch); in drr_change_class()
110 cl->qdisc = qdisc_create_dflt(sch->dev_queue, in drr_change_class()
129 sch_tree_lock(sch); in drr_change_class()
131 sch_tree_unlock(sch); in drr_change_class()
[all …]
Dsch_fq_codel.c76 static unsigned int fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch, in fq_codel_classify() argument
79 struct fq_codel_sched_data *q = qdisc_priv(sch); in fq_codel_classify()
84 if (TC_H_MAJ(skb->priority) == sch->handle && in fq_codel_classify()
137 static unsigned int fq_codel_drop(struct Qdisc *sch, unsigned int max_packets, in fq_codel_drop() argument
140 struct fq_codel_sched_data *q = qdisc_priv(sch); in fq_codel_drop()
178 sch->qstats.drops += i; in fq_codel_drop()
179 sch->qstats.backlog -= len; in fq_codel_drop()
180 sch->q.qlen -= i; in fq_codel_drop()
184 static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch, in fq_codel_enqueue() argument
187 struct fq_codel_sched_data *q = qdisc_priv(sch); in fq_codel_enqueue()
[all …]
Dsch_cbs.c81 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()
[all …]
Dsch_etf.c75 static bool is_packet_valid(struct Qdisc *sch, struct sk_buff *nskb) in is_packet_valid() argument
77 struct etf_sched_data *q = qdisc_priv(sch); in is_packet_valid()
108 static struct sk_buff *etf_peek_timesortedlist(struct Qdisc *sch) in etf_peek_timesortedlist() argument
110 struct etf_sched_data *q = qdisc_priv(sch); in etf_peek_timesortedlist()
120 static void reset_watchdog(struct Qdisc *sch) in reset_watchdog() argument
122 struct etf_sched_data *q = qdisc_priv(sch); in reset_watchdog()
123 struct sk_buff *skb = etf_peek_timesortedlist(sch); in reset_watchdog()
162 static int etf_enqueue_timesortedlist(struct sk_buff *nskb, struct Qdisc *sch, in etf_enqueue_timesortedlist() argument
165 struct etf_sched_data *q = qdisc_priv(sch); in etf_enqueue_timesortedlist()
170 if (!is_packet_valid(sch, nskb)) { in etf_enqueue_timesortedlist()
[all …]
Dsch_skbprio.c68 static int skbprio_enqueue(struct sk_buff *skb, struct Qdisc *sch, in skbprio_enqueue() argument
72 struct skbprio_sched_data *q = qdisc_priv(sch); in skbprio_enqueue()
82 if (sch->q.qlen < sch->limit) { in skbprio_enqueue()
84 qdisc_qstats_backlog_inc(sch, skb); in skbprio_enqueue()
94 sch->q.qlen++; in skbprio_enqueue()
103 return qdisc_drop(skb, sch, to_free); in skbprio_enqueue()
107 qdisc_qstats_backlog_inc(sch, skb); in skbprio_enqueue()
114 qdisc_qstats_backlog_dec(sch, to_drop); in skbprio_enqueue()
115 qdisc_drop(to_drop, sch, to_free); in skbprio_enqueue()
125 BUG_ON(sch->q.qlen != 1); in skbprio_enqueue()
[all …]
Dsch_pie.c30 struct Qdisc *sch; member
33 bool pie_drop_early(struct Qdisc *sch, struct pie_params *params, in pie_drop_early() argument
38 u32 mtu = psched_mtu(qdisc_dev(sch)); in pie_drop_early()
85 static int pie_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch, in pie_qdisc_enqueue() argument
88 struct pie_sched_data *q = qdisc_priv(sch); in pie_qdisc_enqueue()
91 if (unlikely(qdisc_qlen(sch) >= sch->limit)) { in pie_qdisc_enqueue()
96 if (!pie_drop_early(sch, &q->params, &q->vars, sch->qstats.backlog, in pie_qdisc_enqueue()
115 if (qdisc_qlen(sch) > q->stats.maxq) in pie_qdisc_enqueue()
116 q->stats.maxq = qdisc_qlen(sch); in pie_qdisc_enqueue()
118 return qdisc_enqueue_tail(skb, sch); in pie_qdisc_enqueue()
[all …]
Dsch_mqprio.c34 static int mqprio_enable_offload(struct Qdisc *sch, in mqprio_enable_offload() argument
38 struct mqprio_sched *priv = qdisc_priv(sch); in mqprio_enable_offload()
39 struct net_device *dev = qdisc_dev(sch); in mqprio_enable_offload()
80 static void mqprio_disable_offload(struct Qdisc *sch) in mqprio_disable_offload() argument
83 struct mqprio_sched *priv = qdisc_priv(sch); in mqprio_disable_offload()
84 struct net_device *dev = qdisc_dev(sch); in mqprio_disable_offload()
95 static void mqprio_destroy(struct Qdisc *sch) in mqprio_destroy() argument
97 struct net_device *dev = qdisc_dev(sch); in mqprio_destroy()
98 struct mqprio_sched *priv = qdisc_priv(sch); in mqprio_destroy()
110 mqprio_disable_offload(sch); in mqprio_destroy()
[all …]
Dsch_gred.c92 static inline int gred_wred_mode_check(struct Qdisc *sch) in gred_wred_mode_check() argument
94 struct gred_sched *table = qdisc_priv(sch); in gred_wred_mode_check()
115 struct Qdisc *sch) in gred_backlog() argument
118 return sch->qstats.backlog; in gred_backlog()
165 static int gred_enqueue(struct sk_buff *skb, struct Qdisc *sch, in gred_enqueue() argument
169 struct gred_sched *t = qdisc_priv(sch); in gred_enqueue()
182 if (likely(sch->qstats.backlog + qdisc_pkt_len(skb) <= in gred_enqueue()
183 sch->limit)) in gred_enqueue()
184 return qdisc_enqueue_tail(skb, sch); in gred_enqueue()
214 gred_backlog(t, q, sch)); in gred_enqueue()
[all …]
Dsch_choke.c113 static void choke_drop_by_idx(struct Qdisc *sch, unsigned int idx, in choke_drop_by_idx() argument
116 struct choke_sched_data *q = qdisc_priv(sch); in choke_drop_by_idx()
126 qdisc_qstats_backlog_dec(sch, skb); in choke_drop_by_idx()
127 qdisc_tree_reduce_backlog(sch, 1, qdisc_pkt_len(skb)); in choke_drop_by_idx()
128 qdisc_drop(skb, sch, to_free); in choke_drop_by_idx()
129 --sch->q.qlen; in choke_drop_by_idx()
212 static int choke_enqueue(struct sk_buff *skb, struct Qdisc *sch, in choke_enqueue() argument
215 struct choke_sched_data *q = qdisc_priv(sch); in choke_enqueue()
220 q->vars.qavg = red_calc_qavg(p, &q->vars, sch->q.qlen); in choke_enqueue()
233 choke_drop_by_idx(sch, idx, to_free); in choke_enqueue()
[all …]
Dsch_fq_pie.c58 struct Qdisc *sch; member
80 static unsigned int fq_pie_classify(struct sk_buff *skb, struct Qdisc *sch, in fq_pie_classify() argument
83 struct fq_pie_sched_data *q = qdisc_priv(sch); in fq_pie_classify()
88 if (TC_H_MAJ(skb->priority) == sch->handle && in fq_pie_classify()
129 static int fq_pie_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch, in fq_pie_qdisc_enqueue() argument
132 struct fq_pie_sched_data *q = qdisc_priv(sch); in fq_pie_qdisc_enqueue()
141 idx = fq_pie_classify(skb, sch, &ret); in fq_pie_qdisc_enqueue()
144 qdisc_qstats_drop(sch); in fq_pie_qdisc_enqueue()
156 if (unlikely(qdisc_qlen(sch) >= sch->limit)) { in fq_pie_qdisc_enqueue()
163 if (!pie_drop_early(sch, &q->p_params, &sel_flow->vars, in fq_pie_qdisc_enqueue()
[all …]
Dsch_sfq.c144 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
[all …]
Dsch_hhf.c247 static enum wdrr_bucket_idx hhf_classify(struct sk_buff *skb, struct Qdisc *sch) in hhf_classify() argument
249 struct hhf_sched_data *q = qdisc_priv(sch); in hhf_classify()
349 static unsigned int hhf_drop(struct Qdisc *sch, struct sk_buff **to_free) in hhf_drop() argument
351 struct hhf_sched_data *q = qdisc_priv(sch); in hhf_drop()
362 sch->q.qlen--; in hhf_drop()
363 qdisc_qstats_backlog_dec(sch, skb); in hhf_drop()
364 qdisc_drop(skb, sch, to_free); in hhf_drop()
371 static int hhf_enqueue(struct sk_buff *skb, struct Qdisc *sch, in hhf_enqueue() argument
374 struct hhf_sched_data *q = qdisc_priv(sch); in hhf_enqueue()
379 idx = hhf_classify(skb, sch); in hhf_enqueue()
[all …]
Dsch_sfb.c279 static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, in sfb_enqueue() argument
283 struct sfb_sched_data *q = qdisc_priv(sch); in sfb_enqueue()
295 if (unlikely(sch->q.qlen >= q->limit)) { in sfb_enqueue()
296 qdisc_qstats_overlimit(sch); in sfb_enqueue()
349 qdisc_qstats_overlimit(sch); in sfb_enqueue()
375 qdisc_qstats_overlimit(sch); in sfb_enqueue()
407 sch->qstats.backlog += len; in sfb_enqueue()
408 sch->q.qlen++; in sfb_enqueue()
412 qdisc_qstats_drop(sch); in sfb_enqueue()
417 qdisc_drop(skb, sch, to_free); in sfb_enqueue()
[all …]
Dsch_htb.c186 static inline struct htb_class *htb_find(u32 handle, struct Qdisc *sch) in htb_find() argument
188 struct htb_sched *q = qdisc_priv(sch); in htb_find()
197 static unsigned long htb_search(struct Qdisc *sch, u32 handle) in htb_search() argument
199 return (unsigned long)htb_find(handle, sch); in htb_search()
219 static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch, in htb_classify() argument
222 struct htb_sched *q = qdisc_priv(sch); in htb_classify()
232 if (skb->priority == sch->handle) in htb_classify()
234 cl = htb_find(skb->priority, sch); in htb_classify()
259 if (res.classid == sch->handle) in htb_classify()
261 cl = htb_find(res.classid, sch); in htb_classify()
[all …]
Dsch_plug.c87 static int plug_enqueue(struct sk_buff *skb, struct Qdisc *sch, in plug_enqueue() argument
90 struct plug_sched_data *q = qdisc_priv(sch); in plug_enqueue()
92 if (likely(sch->qstats.backlog + skb->len <= q->limit)) { in plug_enqueue()
95 return qdisc_enqueue_tail(skb, sch); in plug_enqueue()
98 return qdisc_drop(skb, sch, to_free); in plug_enqueue()
101 static struct sk_buff *plug_dequeue(struct Qdisc *sch) in plug_dequeue() argument
103 struct plug_sched_data *q = qdisc_priv(sch); in plug_dequeue()
119 return qdisc_dequeue_head(sch); in plug_dequeue()
122 static int plug_init(struct Qdisc *sch, struct nlattr *opt, in plug_init() argument
125 struct plug_sched_data *q = qdisc_priv(sch); in plug_init()
[all …]
Dsch_hfsc.c831 qdisc_peek_len(struct Qdisc *sch) in qdisc_peek_len() argument
836 skb = sch->ops->peek(sch); in qdisc_peek_len()
838 qdisc_warn_nonwc("qdisc_peek_len", sch); in qdisc_peek_len()
863 hfsc_find_class(u32 classid, struct Qdisc *sch) in hfsc_find_class() argument
865 struct hfsc_sched *q = qdisc_priv(sch); in hfsc_find_class()
920 hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, in hfsc_change_class() argument
924 struct hfsc_sched *q = qdisc_priv(sch); in hfsc_change_class()
981 sch_tree_lock(sch); in hfsc_change_class()
1008 sch_tree_unlock(sch); in hfsc_change_class()
1018 parent = hfsc_find_class(parentid, sch); in hfsc_change_class()
[all …]

12