/net/sched/ |
D | sch_fifo.c | 19 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 …]
|
D | sch_mq.c | 24 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 …]
|
D | sch_prio.c | 31 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 …]
|
D | sch_ingress.c | 23 static struct Qdisc *ingress_leaf(struct Qdisc *sch, unsigned long arg) in ingress_leaf() argument 28 static unsigned long ingress_find(struct Qdisc *sch, u32 classid) in ingress_find() argument 33 static unsigned long ingress_bind_filter(struct Qdisc *sch, in ingress_bind_filter() argument 36 return ingress_find(sch, classid); in ingress_bind_filter() 39 static void ingress_unbind_filter(struct Qdisc *sch, unsigned long cl) in ingress_unbind_filter() argument 43 static void ingress_walk(struct Qdisc *sch, struct qdisc_walker *walker) in ingress_walk() argument 47 static struct tcf_block *ingress_tcf_block(struct Qdisc *sch, unsigned long cl, in ingress_tcf_block() argument 50 struct ingress_sched_data *q = qdisc_priv(sch); in ingress_tcf_block() 62 static void ingress_ingress_block_set(struct Qdisc *sch, u32 block_index) in ingress_ingress_block_set() argument 64 struct ingress_sched_data *q = qdisc_priv(sch); in ingress_ingress_block_set() [all …]
|
D | sch_red.c | 44 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 …]
|
D | sch_ets.c | 77 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 …]
|
D | sch_codel.c | 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() [all …]
|
D | sch_multiq.c | 30 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 …]
|
D | sch_drr.c | 39 static struct drr_class *drr_find_class(struct Qdisc *sch, u32 classid) in drr_find_class() argument 41 struct drr_sched *q = qdisc_priv(sch); in drr_find_class() 54 static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid, in drr_change_class() argument 58 struct drr_sched *q = qdisc_priv(sch); in drr_change_class() 82 quantum = psched_mtu(qdisc_dev(sch)); in drr_change_class() 89 qdisc_root_sleeping_running(sch), in drr_change_class() 97 sch_tree_lock(sch); in drr_change_class() 100 sch_tree_unlock(sch); in drr_change_class() 111 cl->qdisc = qdisc_create_dflt(sch->dev_queue, in drr_change_class() 122 qdisc_root_sleeping_running(sch), in drr_change_class() [all …]
|
D | sch_tbf.c | 141 static void tbf_offload_change(struct Qdisc *sch) in tbf_offload_change() argument 143 struct tbf_sched_data *q = qdisc_priv(sch); in tbf_offload_change() 144 struct net_device *dev = qdisc_dev(sch); in tbf_offload_change() 151 qopt.handle = sch->handle; in tbf_offload_change() 152 qopt.parent = sch->parent; in tbf_offload_change() 155 qopt.replace_params.qstats = &sch->qstats; in tbf_offload_change() 160 static void tbf_offload_destroy(struct Qdisc *sch) in tbf_offload_destroy() argument 162 struct net_device *dev = qdisc_dev(sch); in tbf_offload_destroy() 169 qopt.handle = sch->handle; in tbf_offload_destroy() 170 qopt.parent = sch->parent; in tbf_offload_destroy() [all …]
|
D | sch_fq_codel.c | 76 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 …]
|
D | sch_cbs.c | 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() [all …]
|
D | sch_etf.c | 75 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 …]
|
D | sch_skbprio.c | 68 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 …]
|
D | sch_pie.c | 30 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 …]
|
D | sch_mqprio.c | 30 static void mqprio_destroy(struct Qdisc *sch) in mqprio_destroy() argument 32 struct net_device *dev = qdisc_dev(sch); in mqprio_destroy() 33 struct mqprio_sched *priv = qdisc_priv(sch); in mqprio_destroy() 133 static int mqprio_parse_nlattr(struct Qdisc *sch, struct tc_mqprio_qopt *qopt, in mqprio_parse_nlattr() argument 137 struct mqprio_sched *priv = qdisc_priv(sch); in mqprio_parse_nlattr() 224 static int mqprio_init(struct Qdisc *sch, struct nlattr *opt, in mqprio_init() argument 227 struct net_device *dev = qdisc_dev(sch); in mqprio_init() 228 struct mqprio_sched *priv = qdisc_priv(sch); in mqprio_init() 238 if (sch->parent != TC_H_ROOT) in mqprio_init() 257 err = mqprio_parse_nlattr(sch, qopt, opt, extack); in mqprio_init() [all …]
|
D | sch_choke.c | 114 static void choke_drop_by_idx(struct Qdisc *sch, unsigned int idx, in choke_drop_by_idx() argument 117 struct choke_sched_data *q = qdisc_priv(sch); in choke_drop_by_idx() 127 qdisc_qstats_backlog_dec(sch, skb); in choke_drop_by_idx() 128 qdisc_tree_reduce_backlog(sch, 1, qdisc_pkt_len(skb)); in choke_drop_by_idx() 129 qdisc_drop(skb, sch, to_free); in choke_drop_by_idx() 130 --sch->q.qlen; in choke_drop_by_idx() 213 static int choke_enqueue(struct sk_buff *skb, struct Qdisc *sch, in choke_enqueue() argument 216 struct choke_sched_data *q = qdisc_priv(sch); in choke_enqueue() 221 q->vars.qavg = red_calc_qavg(p, &q->vars, sch->q.qlen); in choke_enqueue() 234 choke_drop_by_idx(sch, idx, to_free); in choke_enqueue() [all …]
|
D | sch_fq_pie.c | 58 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 …]
|
D | sch_gred.c | 91 static inline int gred_wred_mode_check(struct Qdisc *sch) in gred_wred_mode_check() argument 93 struct gred_sched *table = qdisc_priv(sch); in gred_wred_mode_check() 114 struct Qdisc *sch) in gred_backlog() argument 117 return sch->qstats.backlog; in gred_backlog() 164 static int gred_enqueue(struct sk_buff *skb, struct Qdisc *sch, in gred_enqueue() argument 168 struct gred_sched *t = qdisc_priv(sch); in gred_enqueue() 181 if (likely(sch->qstats.backlog + qdisc_pkt_len(skb) <= in gred_enqueue() 182 sch->limit)) in gred_enqueue() 183 return qdisc_enqueue_tail(skb, sch); in gred_enqueue() 213 gred_backlog(t, q, sch)); in gred_enqueue() [all …]
|
D | sch_sfq.c | 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 [all …]
|
D | sch_hhf.c | 247 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 …]
|
D | sch_sfb.c | 279 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 …]
|
D | sch_taprio.c | 81 struct sk_buff *(*dequeue)(struct Qdisc *sch); 82 struct sk_buff *(*peek)(struct Qdisc *sch); 188 struct Qdisc *sch, in find_entry_to_transmit() argument 199 struct taprio_sched *q = qdisc_priv(sch); in find_entry_to_transmit() 200 struct net_device *dev = qdisc_dev(sch); in find_entry_to_transmit() 264 static bool is_valid_interval(struct sk_buff *skb, struct Qdisc *sch) in is_valid_interval() argument 266 struct taprio_sched *q = qdisc_priv(sch); in is_valid_interval() 275 entry = find_entry_to_transmit(skb, sch, sched, admin, skb->tstamp, in is_valid_interval() 345 static long get_packet_txtime(struct sk_buff *skb, struct Qdisc *sch) in get_packet_txtime() argument 348 struct taprio_sched *q = qdisc_priv(sch); in get_packet_txtime() [all …]
|
D | sch_htb.c | 187 static inline struct htb_class *htb_find(u32 handle, struct Qdisc *sch) in htb_find() argument 189 struct htb_sched *q = qdisc_priv(sch); in htb_find() 198 static unsigned long htb_search(struct Qdisc *sch, u32 handle) in htb_search() argument 200 return (unsigned long)htb_find(handle, sch); in htb_search() 216 static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch, in htb_classify() argument 219 struct htb_sched *q = qdisc_priv(sch); in htb_classify() 229 if (skb->priority == sch->handle) in htb_classify() 231 cl = htb_find(skb->priority, sch); in htb_classify() 256 if (res.classid == sch->handle) in htb_classify() 258 cl = htb_find(res.classid, sch); in htb_classify() [all …]
|
D | sch_hfsc.c | 832 qdisc_peek_len(struct Qdisc *sch) in qdisc_peek_len() argument 837 skb = sch->ops->peek(sch); in qdisc_peek_len() 839 qdisc_warn_nonwc("qdisc_peek_len", sch); in qdisc_peek_len() 864 hfsc_find_class(u32 classid, struct Qdisc *sch) in hfsc_find_class() argument 866 struct hfsc_sched *q = qdisc_priv(sch); in hfsc_find_class() 921 hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, in hfsc_change_class() argument 925 struct hfsc_sched *q = qdisc_priv(sch); in hfsc_change_class() 976 qdisc_root_sleeping_running(sch), in hfsc_change_class() 982 sch_tree_lock(sch); in hfsc_change_class() 1009 sch_tree_unlock(sch); in hfsc_change_class() [all …]
|