Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
net/sched/sch_generic.c
void psched_ppscfg_precompute(struct psched_pktrate *r, u64 pktrate64) { r->rate_pkts_ps = pktrate64; psched_ratecfg_precompute__(r->rate_pkts_ps, &r->mult, &r->shift); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_generic.c
void mini_qdisc_pair_swap(struct mini_Qdisc_pair *miniqp, struct tcf_proto *tp_head) { struct mini_Qdisc *miniq_old = rcu_dereference_protected(*miniqp->p_miniq, 1); struct mini_Qdisc *miniq; if (!tp_head) { RCU_INIT_POINTER(*miniqp->p_miniq, NULL); } else { miniq = miniq_old...
[ 0, 0 ]
Linux Kernel
net/sched/sch_gred.c
static inline void gred_enable_rio_mode(struct gred_sched *table) { __set_bit(GRED_RIO_MODE, &table->flags); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_gred.c
static inline unsigned int gred_backlog(struct gred_sched *table, struct gred_sched_data *q, struct Qdisc *sch) { if (gred_wred_mode(table)) return sch->qstats.backlog; else return q->backlog; }
[ 0, 0 ]
Linux Kernel
net/sched/sch_gred.c
static inline void gred_load_wred_set(const struct gred_sched *table, struct gred_sched_data *q) { q->vars.qavg = table->wred_set.qavg; q->vars.qidlestart = table->wred_set.qidlestart; }
[ 0, 0 ]
Linux Kernel
net/sched/sch_gred.c
static int gred_vqs_validate(struct gred_sched *table, u32 cdp, struct nlattr *vqs, struct netlink_ext_ack *extack) { const struct nlattr *attr; int rem, err; err = nla_validate_nested_deprecated(vqs, TCA_GRED_VQ_ENTRY_MAX, ...
[ 0, 0 ]
Linux Kernel
net/sched/sch_gred.c
static int gred_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) { struct gred_sched *table = qdisc_priv(sch); struct nlattr *tb[TCA_GRED_MAX + 1]; int err; if (!opt) return -EINVAL; err = nla_parse_nested_deprecated(tb, TCA_GRED_MAX, opt, gred_policy, ex...
[ 0, 0 ]
Linux Kernel
net/sched/sch_gred.c
static int __init gred_module_init(void) { return register_qdisc(&gred_qdisc_ops); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_gred.c
static void __exit gred_module_exit(void) { unregister_qdisc(&gred_qdisc_ops); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static inline void eltree_update(struct hfsc_class *cl) { eltree_remove(cl); eltree_insert(cl); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static u64 m2sm(u32 m) { u64 sm; sm = ((u64)m << SM_SHIFT); sm += PSCHED_TICKS_PER_SEC - 1; do_div(sm, PSCHED_TICKS_PER_SEC); return sm; }
[ 0, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static u32 dx2d(u64 dx) { u64 d; d = dx * USEC_PER_SEC; do_div(d, PSCHED_TICKS_PER_SEC); return (u32)d; }
[ 0, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static void sc2isc(struct tc_service_curve *sc, struct internal_sc *isc) { isc->sm1 = m2sm(sc->m1); isc->ism1 = m2ism(sc->m1); isc->dx = d2dx(sc->d); isc->dy = seg_x2y(isc->dx, isc->sm1); isc->sm2 = m2sm(sc->m2); isc->ism2 = m2ism(sc->m2); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static void rtsc_init(struct runtime_sc *rtsc, struct internal_sc *isc, u64 x, u64 y) { rtsc->x = x; rtsc->y = y; rtsc->sm1 = isc->sm1; rtsc->ism1 = isc->ism1; rtsc->dx = isc->dx; rtsc->dy = isc->dy; rtsc->sm2 = isc->sm2; rtsc->ism2 = isc->ism2; }
[ 0, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static u64 rtsc_y2x(struct runtime_sc *rtsc, u64 y) { u64 x; if (y < rtsc->y) x = rtsc->x; else if (y <= rtsc->y + rtsc->dy) { if (rtsc->dy == 0) x = rtsc->x + rtsc->dx; else x = rtsc->x + seg_y2x(y - rtsc->y, rtsc->ism1); } else { /* x belongs to the 2nd segment */ x = rtsc->x...
[ 1, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static void rtsc_min(struct runtime_sc *rtsc, struct internal_sc *isc, u64 x, u64 y) { u64 y1, y2, dx, dy; u32 dsm; if (isc->sm1 <= isc->sm2) { y1 = rtsc_x2y(rtsc, x); if (y1 < y) /* the current rtsc is smaller */ return; rtsc->x = x; rtsc->y = y; return; }...
[ 0, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static inline void update_d(struct hfsc_class *cl, unsigned int next_len) { cl->cl_d = rtsc_y2x(&cl->cl_deadline, cl->cl_cumul + next_len); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static inline struct hfsc_class *hfsc_find_class(u32 classid, struct Qdisc *sch) { struct hfsc_sched *q = qdisc_priv(sch); struct Qdisc_class_common *clc; clc = qdisc_class_find(&q->clhash, classid); if (clc == NULL) return NULL; return container_of(clc, ...
[ 0, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static unsigned long hfsc_search_class(struct Qdisc *sch, u32 classid) { return (unsigned long)hfsc_find_class(classid, sch); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static struct tcf_block *hfsc_tcf_block(struct Qdisc *sch, unsigned long arg, struct netlink_ext_ack *extack) { struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl = (struct hfsc_class *)arg; if (cl == NULL) cl = &q->root; return cl->block; }
[ 0, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static int hfsc_dump_class_stats(struct Qdisc *sch, unsigned long arg, struct gnet_dump *d) { struct hfsc_class *cl = (struct hfsc_class *)arg; struct tc_hfsc_stats xstats; __u32 qlen; qdisc_qstats_qlen_backlog(cl->qdisc, &qlen, &cl->qstats.backlog); xstats.level = cl->level...
[ 1, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static void hfsc_destroy_qdisc(struct Qdisc *sch) { struct hfsc_sched *q = qdisc_priv(sch); struct hlist_node *next; struct hfsc_class *cl; unsigned int i; for (i = 0; i < q->clhash.hashsize; i++) { hlist_for_each_entry(cl, &q->clhash.hash[i], cl_common.hnode) { tcf_block_put(cl->block); cl-...
[ 0, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static int hfsc_dump_qdisc(struct Qdisc *sch, struct sk_buff *skb) { struct hfsc_sched *q = qdisc_priv(sch); unsigned char *b = skb_tail_pointer(skb); struct tc_hfsc_qopt qopt; qopt.defcls = q->defcls; if (nla_put(skb, TCA_OPTIONS, sizeof(qopt), &qopt)) goto nla_put_failure; return skb->len; nla_put_...
[ 1, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static struct sk_buff *hfsc_dequeue(struct Qdisc *sch) { struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_class *cl; struct sk_buff *skb; u64 cur_time; unsigned int next_len; int realtime = 0; if (sch->q.qlen == 0) return NULL; cur_time = psched_get_time(); cl = eltree_get_mindl(q, cur_time)...
[ 1, 0 ]
Linux Kernel
net/sched/sch_hfsc.c
static void __exit hfsc_cleanup(void) { unregister_qdisc(&hfsc_qdisc_ops); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_hhf.c
static unsigned int hhf_drop(struct Qdisc *sch, struct sk_buff **to_free) { struct hhf_sched_data *q = qdisc_priv(sch); struct wdrr_bucket *bucket; bucket = &q->buckets[WDRR_BUCKET_FOR_HH]; if (!bucket->head) bucket = &q->buckets[WDRR_BUCKET_FOR_NON_HH]; if (bucket->head) { struct sk_buff *skb = deq...
[ 0, 0 ]
Linux Kernel
net/sched/sch_hhf.c
static int hhf_dump(struct Qdisc *sch, struct sk_buff *skb) { struct hhf_sched_data *q = qdisc_priv(sch); struct nlattr *opts; opts = nla_nest_start_noflag(skb, TCA_OPTIONS); if (opts == NULL) goto nla_put_failure; if (nla_put_u32(skb, TCA_HHF_BACKLOG_LIMIT, sch->limit) || nla_put_u32(skb, TCA_HH...
[ 0, 0 ]
Linux Kernel
net/sched/sch_hhf.c
static int hhf_dump_stats(struct Qdisc *sch, struct gnet_dump *d) { struct hhf_sched_data *q = qdisc_priv(sch); struct tc_hhf_xstats st = { .drop_overlimit = q->drop_overlimit, .hh_overlimit = q->hh_flows_overlimit, .hh_tot_count = q->hh_flows_total_cnt, .hh_cur_count = q->hh_flows_current_...
[ 1, 0 ]
Linux Kernel
net/sched/sch_hhf.c
static int __init hhf_module_init(void) { return register_qdisc(&hhf_qdisc_ops); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_htb.c
static unsigned long htb_search(struct Qdisc *sch, u32 handle) { return (unsigned long)htb_find(handle, sch); } #define HTB_DIRECT ((struct htb_class *)-1L)
[ 0, 0 ]
Linux Kernel
net/sched/sch_htb.c
static void htb_add_to_wait_tree(struct htb_sched *q, struct htb_class *cl, s64 delay) { struct rb_node **p = &q->hlevel[cl->level].wait_pq.rb_node, *parent = NULL; cl->pq_key = q->now + delay; if (cl->pq_key == q->now) cl->pq_key++; if (q->near_ev_cache[cl->level] > cl->p...
[ 1, 0 ]
Linux Kernel
net/sched/sch_htb.c
static inline void htb_add_class_to_row(struct htb_sched *q, struct htb_class *cl, int mask) { q->row_mask[cl->level] |= mask; while (mask) { int prio = ffz(~mask); mask &= ~(1 << prio); htb_add_to_id_tree(&q->hlevel[cl->level].hprio[prio].row, cl, prio); } }
[ 1, 0 ]
Linux Kernel
net/sched/sch_htb.c
static void htb_safe_rb_erase(struct rb_node *rb, struct rb_root *root) { if (RB_EMPTY_NODE(rb)) { WARN_ON(1); } else { rb_erase(rb, root); RB_CLEAR_NODE(rb); } }
[ 0, 0 ]
Linux Kernel
net/sched/sch_htb.c
static inline void htb_remove_class_from_row(struct htb_sched *q, struct htb_class *cl, int mask) { int m = 0; struct htb_level *hlevel = &q->hlevel[cl->level]; while (mask) { int prio = ffz(~mask); struct htb_prio *hprio = &hlevel->hprio[prio]; mask &= ~...
[ 0, 0 ]
Linux Kernel
net/sched/sch_htb.c
static inline s64 htb_hiwater(const struct htb_class *cl) { if (htb_hysteresis) return cl->cmode == HTB_CAN_SEND ? -cl->buffer : 0; else return 0; }
[ 0, 0 ]
Linux Kernel
net/sched/sch_htb.c
static s64 htb_do_events(struct htb_sched *q, const int level, unsigned long start) { unsigned long stop_at = start + 2; struct rb_root *wait_pq = &q->hlevel[level].wait_pq; while (time_before(jiffies, stop_at)) { struct htb_class *cl; s64 diff; struct rb_node *p = rb_first(...
[ 1, 0 ]
Linux Kernel
net/sched/sch_htb.c
static int htb_dump(struct Qdisc *sch, struct sk_buff *skb) { struct htb_sched *q = qdisc_priv(sch); struct nlattr *nest; struct tc_htb_glob gopt; if (q->offload) sch->flags |= TCQ_F_OFFLOADED; else sch->flags &= ~TCQ_F_OFFLOADED; sch->qstats.overlimits = q->overlimits; gopt.direct_pkts = q->di...
[ 1, 0 ]
Linux Kernel
net/sched/sch_htb.c
static int htb_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, struct tcmsg *tcm) { struct htb_class *cl = (struct htb_class *)arg; struct htb_sched *q = qdisc_priv(sch); struct nlattr *nest; struct tc_htb_opt opt; tcm->tcm_parent = cl->parent ? cl->parent->com...
[ 1, 0 ]
Linux Kernel
net/sched/sch_htb.c
static void htb_qlen_notify(struct Qdisc *sch, unsigned long arg) { struct htb_class *cl = (struct htb_class *)arg; htb_deactivate(qdisc_priv(sch), cl); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_htb.c
static void htb_parent_to_leaf_offload(struct Qdisc *sch, struct netdev_queue *dev_queue, struct Qdisc *new_q) { struct Qdisc *old_q; if (new_q) qdisc_refcount_inc(new_q); old_q = htb_graft_helper(dev_queue, new_q); WARN_ON(!(old...
[ 0, 0 ]
Linux Kernel
net/sched/sch_htb.c
static struct tcf_block *htb_tcf_block(struct Qdisc *sch, unsigned long arg, struct netlink_ext_ack *extack) { struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class *)arg; return cl ? cl->block : q->block; }
[ 0, 0 ]
Linux Kernel
net/sched/sch_htb.c
static int __init htb_module_init(void) { return register_qdisc(&htb_qdisc_ops); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_ingress.c
static unsigned long ingress_bind_filter(struct Qdisc *sch, unsigned long parent, u32 classid) { return ingress_find(sch, classid); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_ingress.c
static void ingress_unbind_filter(struct Qdisc *sch, unsigned long cl) {}
[ 0, 0 ]
Linux Kernel
net/sched/sch_ingress.c
static void ingress_ingress_block_set(struct Qdisc *sch, u32 block_index) { struct ingress_sched_data *q = qdisc_priv(sch); q->block_info.block_index = block_index; }
[ 0, 0 ]
Linux Kernel
net/sched/sch_ingress.c
static u32 ingress_ingress_block_get(struct Qdisc *sch) { struct ingress_sched_data *q = qdisc_priv(sch); return q->block_info.block_index; }
[ 0, 0 ]
Linux Kernel
net/sched/sch_ingress.c
static void ingress_destroy(struct Qdisc *sch) { struct ingress_sched_data *q = qdisc_priv(sch); tcf_block_put_ext(q->block, sch, &q->block_info); net_dec_ingress_queue(); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_ingress.c
static int ingress_dump(struct Qdisc *sch, struct sk_buff *skb) { struct nlattr *nest; nest = nla_nest_start_noflag(skb, TCA_OPTIONS); if (nest == NULL) goto nla_put_failure; return nla_nest_end(skb, nest); nla_put_failure: nla_nest_cancel(skb, nest); return -1; }
[ 0, 0 ]
Linux Kernel
net/sched/sch_ingress.c
static void clsact_destroy(struct Qdisc *sch) { struct clsact_sched_data *q = qdisc_priv(sch); tcf_block_put_ext(q->egress_block, sch, &q->egress_block_info); tcf_block_put_ext(q->ingress_block, sch, &q->ingress_block_info); net_dec_ingress_queue(); net_dec_egress_queue(); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_mq.c
static int mq_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) { struct net_device *dev = qdisc_dev(sch); struct mq_sched *priv = qdisc_priv(sch); struct netdev_queue *dev_queue; struct Qdisc *qdisc; unsigned int ntx; if (sch->parent != TC_H_ROOT) return -E...
[ 1, 0 ]
Linux Kernel
net/sched/sch_mq.c
static unsigned long mq_find(struct Qdisc *sch, u32 classid) { unsigned int ntx = TC_H_MIN(classid); if (!mq_queue_get(sch, ntx)) return 0; return ntx; }
[ 1, 0 ]
Linux Kernel
net/sched/sch_mqprio.c
static void mqprio_destroy(struct Qdisc *sch) { struct net_device *dev = qdisc_dev(sch); struct mqprio_sched *priv = qdisc_priv(sch); unsigned int ntx; if (priv->qdiscs) { for (ntx = 0; ntx < dev->num_tx_queues && priv->qdiscs[ntx]; ntx++) qdisc_put(priv->qdiscs[ntx]); kfree(priv->qdiscs); } ...
[ 1, 0 ]
Linux Kernel
net/sched/sch_mqprio.c
static int dump_rates(struct mqprio_sched *priv, struct tc_mqprio_qopt *opt, struct sk_buff *skb) { struct nlattr *nest; int i; if (priv->flags & TC_MQPRIO_F_MIN_RATE) { nest = nla_nest_start_noflag(skb, TCA_MQPRIO_MIN_RATE64); if (!nest) goto nla_put_failure; for (i = 0...
[ 1, 0 ]
Linux Kernel
net/sched/sch_mqprio.c
static struct Qdisc *mqprio_leaf(struct Qdisc *sch, unsigned long cl) { struct netdev_queue *dev_queue = mqprio_queue_get(sch, cl); if (!dev_queue) return NULL; return dev_queue->qdisc_sleeping; }
[ 0, 0 ]
Linux Kernel
net/sched/sch_mqprio.c
static int mqprio_dump_class_stats(struct Qdisc *sch, unsigned long cl, struct gnet_dump *d) __releases(d->lock) __acquires(d->lock) { if (cl >= TC_H_MIN_PRIORITY) { int i; __u32 qlen; struct gnet_stats_queue qstats = {0}; struct gnet_stats_basic_sync bstats; ...
[ 1, 0 ]
Linux Kernel
net/sched/sch_mqprio.c
static void mqprio_walk(struct Qdisc *sch, struct qdisc_walker *arg) { struct net_device *dev = qdisc_dev(sch); unsigned long ntx; if (arg->stop) return; arg->count = arg->skip; for (ntx = arg->skip; ntx < netdev_get_num_tc(dev); ntx++) { if (!tc_qdisc_stats_dump(sch, ntx + TC_H_MIN_PRIORITY, arg)) ...
[ 1, 0 ]
Linux Kernel
net/sched/sch_mqprio.c
static struct netdev_queue *mqprio_select_queue(struct Qdisc *sch, struct tcmsg *tcm) { return mqprio_queue_get(sch, TC_H_MIN(tcm->tcm_parent)); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_mqprio.c
static int __init mqprio_module_init(void) { return register_qdisc(&mqprio_qdisc_ops); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_multiq.c
static struct Qdisc *multiq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) { struct multiq_sched_data *q = qdisc_priv(sch); u32 band; struct tcf_result res; struct tcf_proto *fl = rcu_dereference_bh(q->filter_list); int err; *qerr = NET_XMIT_SUCCESS | __N...
[ 1, 0 ]
Linux Kernel
net/sched/sch_multiq.c
static int multiq_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, struct tcmsg *tcm) { struct multiq_sched_data *q = qdisc_priv(sch); tcm->tcm_handle |= TC_H_MIN(cl); tcm->tcm_info = q->queues[cl - 1]->handle; return 0; }
[ 1, 0 ]
Linux Kernel
net/sched/sch_multiq.c
static void multiq_walk(struct Qdisc *sch, struct qdisc_walker *arg) { struct multiq_sched_data *q = qdisc_priv(sch); int band; if (arg->stop) return; for (band = 0; band < q->bands; band++) { if (!tc_qdisc_stats_dump(sch, band + 1, arg)) break; } }
[ 0, 0 ]
Linux Kernel
net/sched/sch_multiq.c
static int __init multiq_module_init(void) { return register_qdisc(&multiq_qdisc_ops); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_netem.c
static inline struct netem_skb_cb *netem_skb_cb(struct sk_buff *skb) { qdisc_cb_private_validate(skb, sizeof(struct netem_skb_cb)); return (struct netem_skb_cb *)qdisc_skb_cb(skb)->data; }
[ 1, 0 ]
Linux Kernel
net/sched/sch_netem.c
static struct sk_buff *netem_segment(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) { struct sk_buff *segs; netdev_features_t features = netif_skb_features(skb); segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK); if (IS_ERR_OR_NULL(segs)) { q...
[ 0, 0 ]
Linux Kernel
net/sched/sch_netem.c
static int get_dist_table(struct Qdisc *sch, struct disttable **tbl, const struct nlattr *attr) { size_t n = nla_len(attr) / sizeof(__s16); const __s16 *data = nla_data(attr); spinlock_t *root_lock; struct disttable *d; int i; if (!n || n > NETEM_DIST_MAX) return -EINVAL; d...
[ 1, 0 ]
Linux Kernel
net/sched/sch_netem.c
static void get_slot(struct netem_sched_data *q, const struct nlattr *attr) { const struct tc_netem_slot *c = nla_data(attr); q->slot_config = *c; if (q->slot_config.max_packets == 0) q->slot_config.max_packets = INT_MAX; if (q->slot_config.max_bytes == 0) q->slot_config.max_bytes = INT_MAX; q->slot...
[ 0, 0 ]
Linux Kernel
net/sched/sch_netem.c
static int get_loss_clg(struct netem_sched_data *q, const struct nlattr *attr) { const struct nlattr *la; int rem; nla_for_each_nested(la, attr, rem) { u16 type = nla_type(la); switch (type) { case NETEM_LOSS_GI: { const struct tc_netem_gimodel *gi = nla_data(la); if (nla_len(la) < siz...
[ 1, 0 ]
Linux Kernel
net/sched/sch_netem.c
static int parse_attr(struct nlattr *tb[], int maxtype, struct nlattr *nla, const struct nla_policy *policy, int len) { int nested_len = nla_len(nla) - NLA_ALIGN(len); if (nested_len < 0) { pr_info("netem: invalid attributes len %d\n", nested_len); return -EINVAL; } if (nested_l...
[ 1, 0 ]
Linux Kernel
net/sched/sch_netem.c
static int netem_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) { struct netem_sched_data *q = qdisc_priv(sch); int ret; qdisc_watchdog_init(&q->watchdog, sch); if (!opt) return -EINVAL; q->loss_model = CLG_RANDOM; ret = netem_change(sch, opt, extac...
[ 0, 0 ]
Linux Kernel
net/sched/sch_netem.c
static void netem_destroy(struct Qdisc *sch) { struct netem_sched_data *q = qdisc_priv(sch); qdisc_watchdog_cancel(&q->watchdog); if (q->qdisc) qdisc_put(q->qdisc); dist_free(q->delay_dist); dist_free(q->slot_dist); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_netem.c
static int netem_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, struct tcmsg *tcm) { struct netem_sched_data *q = qdisc_priv(sch); if (cl != 1 || !q->qdisc) return -ENOENT; tcm->tcm_handle |= TC_H_MIN(1); tcm->tcm_info = q->qdisc->handle; return 0; }
[ 1, 0 ]
Linux Kernel
net/sched/sch_netem.c
static int __init netem_module_init(void) { pr_info("netem: version " VERSION "\n"); return register_qdisc(&netem_qdisc_ops); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_netem.c
static void __exit netem_module_exit(void) { unregister_qdisc(&netem_qdisc_ops); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_pie.c
static int pie_dump_stats(struct Qdisc *sch, struct gnet_dump *d) { struct pie_sched_data *q = qdisc_priv(sch); struct tc_pie_xstats st = { .prob = q->vars.prob << BITS_PER_BYTE, .delay = ((u32)PSCHED_TICKS2NS(q->vars.qdelay)) / NSEC_PER_USEC, .packets_in = q->stats.packets_in, .overlimit = ...
[ 1, 0 ]
Linux Kernel
net/sched/sch_pie.c
static void pie_reset(struct Qdisc *sch) { struct pie_sched_data *q = qdisc_priv(sch); qdisc_reset_queue(sch); pie_vars_init(&q->vars); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_pie.c
static int __init pie_module_init(void) { return register_qdisc(&pie_qdisc_ops); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_pie.c
static void __exit pie_module_exit(void) { unregister_qdisc(&pie_qdisc_ops); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_plug.c
static int plug_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) { struct plug_sched_data *q = qdisc_priv(sch); if (likely(sch->qstats.backlog + skb->len <= q->limit)) { if (!q->unplug_indefinite) q->pkts_current_epoch++; return qdisc_enqueue_tail(skb...
[ 0, 0 ]
Linux Kernel
net/sched/sch_plug.c
static struct sk_buff *plug_dequeue(struct Qdisc *sch) { struct plug_sched_data *q = qdisc_priv(sch); if (q->throttled) return NULL; if (!q->unplug_indefinite) { if (!q->pkts_to_release) { q->throttled = true; return NULL; } q->pkts_to_release--; } return qdisc_dequeue_head(sch...
[ 0, 0 ]
Linux Kernel
net/sched/sch_prio.c
static int prio_tune(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) { struct prio_sched_data *q = qdisc_priv(sch); struct Qdisc *queues[TCQ_PRIO_BANDS]; int oldbands = q->bands, i; struct tc_prio_qopt *qopt; if (nla_len(opt) < sizeof(*qopt)) return -EINVAL; ...
[ 1, 0 ]
Linux Kernel
net/sched/sch_prio.c
static int prio_dump_offload(struct Qdisc *sch) { struct tc_prio_qopt_offload hw_stats = { .command = TC_PRIO_STATS, .handle = sch->handle, .parent = sch->parent, { .stats = { .bstats = &sch->bstats, .qstats = &sch->qstats, ...
[ 0, 0 ]
Linux Kernel
net/sched/sch_prio.c
static unsigned long prio_bind(struct Qdisc *sch, unsigned long parent, u32 classid) { return prio_find(sch, classid); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_prio.c
static void prio_unbind(struct Qdisc *q, unsigned long cl) {}
[ 0, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static struct qfq_aggregate *qfq_find_agg(struct qfq_sched *q, u32 lmax, u32 weight) { struct qfq_aggregate *agg; hlist_for_each_entry(agg, &q->nonfull_aggs, nonfull_next) if (agg->lmax == lmax && agg->class_...
[ 1, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static void qfq_deactivate_class(struct qfq_sched *q, struct qfq_class *cl) { struct qfq_aggregate *agg = cl->agg; list_del(&cl->alist); if (list_empty(&agg->active)) /* agg is now inactive */ qfq_deactivate_agg(q, agg); }
[ 1, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static void qfq_deact_rm_from_agg(struct qfq_sched *q, struct qfq_class *cl) { if (cl->qdisc->q.qlen > 0) qfq_deactivate_class(q, cl); qfq_rm_from_agg(q, cl); }
[ 1, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static int qfq_change_agg(struct Qdisc *sch, struct qfq_class *cl, u32 weight, u32 lmax) { struct qfq_sched *q = qdisc_priv(sch); struct qfq_aggregate *new_agg = qfq_find_agg(q, lmax, weight); if (new_agg == NULL) { new_agg = kzalloc(sizeof(*new_agg), GFP_ATOMIC); if (new_agg ==...
[ 0, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static int qfq_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, struct tcmsg *tcm) { struct qfq_class *cl = (struct qfq_class *)arg; struct nlattr *nest; tcm->tcm_parent = TC_H_ROOT; tcm->tcm_handle = cl->common.classid; tcm->tcm_info = cl->qdisc->handle; ne...
[ 1, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static int qfq_dump_class_stats(struct Qdisc *sch, unsigned long arg, struct gnet_dump *d) { struct qfq_class *cl = (struct qfq_class *)arg; struct tc_qfq_stats xstats; memset(&xstats, 0, sizeof(xstats)); xstats.weight = cl->agg->class_weight; xstats.lmax = cl->agg->lmax; ...
[ 1, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static void qfq_slot_insert(struct qfq_group *grp, struct qfq_aggregate *agg, u64 roundedS) { u64 slot = (roundedS - grp->S) >> grp->slot_shift; unsigned int i; if (unlikely(slot > QFQ_MAX_SLOTS - 2)) { u64 deltaS = roundedS - grp->S - ((u64)(QFQ_MAX_SLOTS - 2) << grp->slo...
[ 1, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static struct qfq_aggregate *qfq_slot_head(struct qfq_group *grp) { return hlist_entry(grp->slots[grp->front].first, struct qfq_aggregate, next); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static void qfq_slot_rotate(struct qfq_group *grp, u64 roundedS) { unsigned int i = (grp->S - roundedS) >> grp->slot_shift; grp->full_slots <<= i; grp->front = (grp->front - i) % QFQ_MAX_SLOTS; }
[ 1, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static void qfq_update_eligible(struct qfq_sched *q) { struct qfq_group *grp; unsigned long ineligible; ineligible = q->bitmaps[IR] | q->bitmaps[IB]; if (ineligible) { if (!q->bitmaps[ER]) { grp = qfq_ffs(q, ineligible); if (qfq_gt(grp->S, q->V)) q->V = grp->S; } qfq_make_eligi...
[ 0, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static inline struct sk_buff *qfq_peek_skb(struct qfq_aggregate *agg, struct qfq_class **cl, unsigned int *len) { struct sk_buff *skb; *cl = list_first_entry(&agg->active, struct qfq_class, alist); skb = (*cl)->qdisc->ops->pee...
[ 0, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static inline void qfq_update_agg_ts(struct qfq_sched *q, struct qfq_aggregate *agg, enum update_reason reason) { if (reason != requeue) qfq_update_start(q, agg); else agg->S = agg->F; agg->F = agg->S + (u64)agg->budgetmax * agg->i...
[ 1, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static void qfq_activate_agg(struct qfq_sched *q, struct qfq_aggregate *agg, enum update_reason reason) { agg->initial_budget = agg->budget = agg->budgetmax; qfq_update_agg_ts(q, agg, reason); if (q->in_serv_agg == NULL) { /* no aggr. in service or scheduled */ q->in_serv_agg = a...
[ 0, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static void qfq_reset_qdisc(struct Qdisc *sch) { struct qfq_sched *q = qdisc_priv(sch); struct qfq_class *cl; unsigned int i; for (i = 0; i < q->clhash.hashsize; i++) { hlist_for_each_entry(cl, &q->clhash.hash[i], common.hnode) { if (cl->qdisc->q.qlen > 0) qfq_deactivate_class(q, cl); ...
[ 1, 0 ]
Linux Kernel
net/sched/sch_qfq.c
static int __init qfq_init(void) { return register_qdisc(&qfq_qdisc_ops); }
[ 0, 0 ]
Linux Kernel
net/sched/sch_red.c
static inline int red_use_ecn(struct red_sched_data *q) { return q->flags & TC_RED_ECN; }
[ 0, 0 ]
Linux Kernel
net/sched/sch_red.c
static int red_use_nodrop(struct red_sched_data *q) { return q->flags & TC_RED_NODROP; }
[ 0, 0 ]