Home
last modified time | relevance | path

Searched refs:classid (Results 1 – 25 of 62) sorted by relevance

123

/kernel/linux/linux-5.10/include/net/
Dcls_cgroup.h20 u32 classid; member
27 u32 classid; in task_cls_classid() local
33 classid = container_of(task_css(p, net_cls_cgrp_id), in task_cls_classid()
34 struct cgroup_cls_state, css)->classid; in task_cls_classid()
37 return classid; in task_cls_classid()
42 u32 classid; in sock_update_classid() local
44 classid = task_cls_classid(current); in sock_update_classid()
45 sock_cgroup_set_classid(skcd, classid); in sock_update_classid()
50 return task_cls_state(task)->classid; in __task_get_classid()
55 u32 classid = __task_get_classid(current); in task_get_classid() local
[all …]
/kernel/linux/linux-5.10/tools/usb/usbip/libsrc/
Dnames.c39 u_int8_t classid; member
45 u_int8_t classid, subclassid; member
51 u_int8_t classid, subclassid, protocolid; member
105 const char *names_class(u_int8_t classid) in names_class() argument
109 c = classes[hashnum(classid)]; in names_class()
111 if (c->classid == classid) in names_class()
116 const char *names_subclass(u_int8_t classid, u_int8_t subclassid) in names_subclass() argument
120 s = subclasses[hashnum((classid << 8) | subclassid)]; in names_subclass()
122 if (s->classid == classid && s->subclassid == subclassid) in names_subclass()
127 const char *names_protocol(u_int8_t classid, u_int8_t subclassid, in names_protocol() argument
[all …]
Dnames.h19 extern const char *names_class(u_int8_t classid);
20 extern const char *names_subclass(u_int8_t classid, u_int8_t subclassid);
21 extern const char *names_protocol(u_int8_t classid, u_int8_t subclassid,
/kernel/linux/linux-5.10/net/core/
Dnetclassid_cgroup.c46 cs->classid = parent->classid; in cgrp_css_online()
63 u32 classid; member
76 sock_cgroup_set_classid(&sock->sk->sk_cgrp_data, ctx->classid); in update_classid_sock()
84 static void update_classid_task(struct task_struct *p, u32 classid) in update_classid_task() argument
87 .classid = classid, in update_classid_task()
106 update_classid_task(p, css_cls_state(css)->classid); in cgrp_attach()
112 return css_cls_state(css)->classid; in read_classid()
122 cs->classid = (u32)value; in write_classid()
126 update_classid_task(p, cs->classid); in write_classid()
/kernel/linux/linux-5.10/Documentation/admin-guide/cgroup-v1/
Dnet_cls.rst6 tag network packets with a class identifier (classid).
13 Creating a net_cls cgroups instance creates a net_cls.classid file.
14 This net_cls.classid value is initialized to 0.
16 You can write hexadecimal values to net_cls.classid; the format for these
19 Reading net_cls.classid yields a decimal result.
26 echo 0x100001 > /sys/fs/cgroup/net_cls/0/net_cls.classid
30 cat /sys/fs/cgroup/net_cls/0/net_cls.classid
36 tc class add dev eth0 parent 10: classid 10:1 htb rate 40mbit
/kernel/linux/linux-5.10/net/sched/
Dsch_atm.c73 static inline struct atm_flow_data *lookup_flow(struct Qdisc *sch, u32 classid) in lookup_flow() argument
79 if (flow->common.classid == classid) in lookup_flow()
113 static unsigned long atm_tc_find(struct Qdisc *sch, u32 classid) in atm_tc_find() argument
118 pr_debug("%s(sch %p,[qdisc %p],classid %x)\n", __func__, sch, p, classid); in atm_tc_find()
119 flow = lookup_flow(sch, classid); in atm_tc_find()
125 unsigned long parent, u32 classid) in atm_tc_bind_filter() argument
130 pr_debug("%s(sch %p,[qdisc %p],classid %x)\n", __func__, sch, p, classid); in atm_tc_bind_filter()
131 flow = lookup_flow(sch, classid); in atm_tc_bind_filter()
195 static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent, in atm_tc_change() argument
209 "flow %p,opt %p)\n", sch, p, classid, parent, flow, opt); in atm_tc_change()
[all …]
Dsch_ingress.c28 static unsigned long ingress_find(struct Qdisc *sch, u32 classid) in ingress_find() argument
30 return TC_H_MIN(classid) + 1; in ingress_find()
34 unsigned long parent, u32 classid) in ingress_bind_filter() argument
36 return ingress_find(sch, classid); in ingress_bind_filter()
155 static unsigned long clsact_find(struct Qdisc *sch, u32 classid) in clsact_find() argument
157 switch (TC_H_MIN(classid)) { in clsact_find()
160 return TC_H_MIN(classid); in clsact_find()
167 unsigned long parent, u32 classid) in clsact_bind_filter() argument
169 return clsact_find(sch, classid); in clsact_bind_filter()
Dsch_drr.c39 static struct drr_class *drr_find_class(struct Qdisc *sch, u32 classid) in drr_find_class() argument
44 clc = qdisc_class_find(&q->clhash, classid); in drr_find_class()
54 static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid, in drr_change_class() argument
109 cl->common.classid = classid; in drr_change_class()
112 &pfifo_qdisc_ops, classid, in drr_change_class()
168 static unsigned long drr_search_class(struct Qdisc *sch, u32 classid) in drr_search_class() argument
170 return (unsigned long)drr_find_class(sch, classid); in drr_search_class()
187 u32 classid) in drr_bind_tcf() argument
189 struct drr_class *cl = drr_find_class(sch, classid); in drr_bind_tcf()
212 cl->common.classid, NULL); in drr_graft_class()
[all …]
Dsch_cbq.c166 cbq_class_lookup(struct cbq_sched_data *q, u32 classid) in cbq_class_lookup() argument
170 clc = qdisc_class_find(&q->clhash, classid); in cbq_class_lookup()
239 if (TC_H_MAJ(res.classid)) in cbq_classify()
240 cl = cbq_class_lookup(q, res.classid); in cbq_classify()
241 else if ((cl = defmap[res.classid & TC_PRIO_MAX]) == NULL) in cbq_classify()
904 cl->common.classid, cl->quantum); in cbq_normalize_quanta()
955 splitid = split->common.classid; in cbq_change_defmap()
958 if (split == NULL || split->common.classid != splitid) { in cbq_change_defmap()
960 if (split->common.classid == splitid) in cbq_change_defmap()
1192 q->link.common.classid = sch->handle; in cbq_init()
[all …]
Dsch_dsmark.c90 static unsigned long dsmark_find(struct Qdisc *sch, u32 classid) in dsmark_find() argument
92 return TC_H_MIN(classid) + 1; in dsmark_find()
96 unsigned long parent, u32 classid) in dsmark_bind_filter() argument
99 __func__, sch, qdisc_priv(sch), classid); in dsmark_bind_filter()
101 return dsmark_find(sch, classid); in dsmark_bind_filter()
116 static int dsmark_change(struct Qdisc *sch, u32 classid, u32 parent, in dsmark_change() argument
126 __func__, sch, p, classid, parent, *arg); in dsmark_change()
246 pr_debug("result %d class 0x%04x\n", result, res.classid); in dsmark_enqueue()
260 skb->tc_index = TC_H_MIN(res.classid); in dsmark_enqueue()
Dcls_fw.c80 res->classid = id; in fw_classify()
230 f->res.classid = nla_get_u32(tb[TCA_FW_CLASSID]); in fw_set_parms()
386 if (!f->res.classid && !tcf_exts_has_actions(&f->exts)) in fw_dump()
393 if (f->res.classid && in fw_dump()
394 nla_put_u32(skb, TCA_FW_CLASSID, f->res.classid)) in fw_dump()
421 static void fw_bind_class(void *fh, u32 classid, unsigned long cl, void *q, in fw_bind_class() argument
426 if (f && f->res.classid == classid) { in fw_bind_class()
Dcls_rsvp.h201 tunnelid = f->res.classid; in rsvp_classify()
438 data->tgenerator = f->res.classid; in tunnel_recycle()
529 n->res.classid = nla_get_u32(tb[TCA_RSVP_CLASSID]); in rsvp_change()
564 f->res.classid = nla_get_u32(tb[TCA_RSVP_CLASSID]); in rsvp_change()
575 if (f->res.classid > 255) in rsvp_change()
579 if (f->res.classid == 0 && in rsvp_change()
580 (f->res.classid = gen_tunnel(data)) == 0) in rsvp_change()
718 if (f->res.classid && in rsvp_dump()
719 nla_put_u32(skb, TCA_RSVP_CLASSID, f->res.classid)) in rsvp_dump()
739 static void rsvp_bind_class(void *fh, u32 classid, unsigned long cl, void *q, in rsvp_bind_class() argument
[all …]
Dsch_htb.c249 if (res.classid == sch->handle) in htb_classify()
251 cl = htb_find(res.classid, sch); in htb_classify()
284 if (cl->common.classid > c->common.classid) in htb_add_to_id_tree()
452 p->inner.clprio[prio].last_ptr_id = cl->common.classid; in htb_deactivate_prios()
749 if (id > cl->common.classid) { in htb_id_find_next_upper()
751 } else if (id < cl->common.classid) { in htb_id_find_next_upper()
1082 tcm->tcm_parent = cl->parent ? cl->parent->common.classid : TC_H_ROOT; in htb_dump_class()
1083 tcm->tcm_handle = cl->common.classid; in htb_dump_class()
1154 cl->common.classid, extack)) == NULL) in htb_graft()
1263 cl->parent->common.classid, in htb_delete()
[all …]
Dcls_basic.c162 f->res.classid = nla_get_u32(tb[TCA_BASIC_CLASSID]); in basic_set_parms()
266 static void basic_bind_class(void *fh, u32 classid, unsigned long cl, void *q, in basic_bind_class() argument
271 if (f && f->res.classid == classid) { in basic_bind_class()
296 if (f->res.classid && in basic_dump()
297 nla_put_u32(skb, TCA_BASIC_CLASSID, f->res.classid)) in basic_dump()
Dcls_flow.c301 u32 classid; in flow_classify() local
323 classid = jhash2(keys, f->nkeys, f->hashrnd); in flow_classify()
325 classid = keys[0]; in flow_classify()
326 classid = (classid & f->mask) ^ f->xor; in flow_classify()
327 classid = (classid >> f->rshift) + f->addend; in flow_classify()
331 classid %= f->divisor; in flow_classify()
334 res->classid = TC_H_MAKE(f->baseclass, f->baseclass + classid); in flow_classify()
Dcls_cgroup.c29 u32 classid = task_get_classid(skb); in cls_cgroup_classify() local
33 if (!classid) in cls_cgroup_classify()
38 res->classid = classid; in cls_cgroup_classify()
Dsch_hfsc.c864 hfsc_find_class(u32 classid, struct Qdisc *sch) in hfsc_find_class() argument
869 clc = qdisc_class_find(&q->clhash, classid); in hfsc_find_class()
913 hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, in hfsc_change_class() argument
957 cl->cl_parent->cl_common.classid != parentid) in hfsc_change_class()
1020 if (classid == 0 || TC_H_MAJ(classid ^ sch->handle) != 0) in hfsc_change_class()
1022 if (hfsc_find_class(classid, sch)) in hfsc_change_class()
1057 cl->cl_common.classid = classid; in hfsc_change_class()
1061 classid, NULL); in hfsc_change_class()
1150 cl = hfsc_find_class(res.classid, sch); in hfsc_classify()
1183 cl->cl_common.classid, NULL); in hfsc_graft_class()
[all …]
Dcls_bpf.c93 qdisc_skb_cb(skb)->tc_classid = prog->res.classid; in cls_bpf_classify()
110 res->classid = TC_H_MAJ(prog->res.classid) | in cls_bpf_classify()
123 res->classid = filter_res; in cls_bpf_classify()
451 prog->res.classid = nla_get_u32(tb[TCA_BPF_CLASSID]); in cls_bpf_set_parms()
600 if (prog->res.classid && in cls_bpf_dump()
601 nla_put_u32(skb, TCA_BPF_CLASSID, prog->res.classid)) in cls_bpf_dump()
634 static void cls_bpf_bind_class(void *fh, u32 classid, unsigned long cl, in cls_bpf_bind_class() argument
639 if (prog && prog->res.classid == classid) { in cls_bpf_bind_class()
Dcls_matchall.c177 head->res.classid = nla_get_u32(tb[TCA_MATCHALL_CLASSID]); in mall_set_parms()
367 if (head->res.classid && in mall_dump()
368 nla_put_u32(skb, TCA_MATCHALL_CLASSID, head->res.classid)) in mall_dump()
400 static void mall_bind_class(void *fh, u32 classid, unsigned long cl, void *q, in mall_bind_class() argument
405 if (head && head->res.classid == classid) { in mall_bind_class()
Dcls_tcindex.c63 return tcf_exts_has_actions(&r->exts) || r->res.classid; in tcindex_filter_is_set()
119 res->classid = TC_H_MAKE(TC_H_MAJ(q->handle), key); in tcindex_classify()
121 pr_debug("alg 0x%x\n", res->classid); in tcindex_classify()
125 pr_debug("map 0x%x\n", res->classid); in tcindex_classify()
482 cr.classid = nla_get_u32(tb[TCA_TCINDEX_CLASSID]); in tcindex_set_parms()
699 nla_put_u32(skb, TCA_TCINDEX_CLASSID, r->res.classid)) in tcindex_dump()
717 static void tcindex_bind_class(void *fh, u32 classid, unsigned long cl, in tcindex_bind_class() argument
722 if (r && r->res.classid == classid) { in tcindex_bind_class()
/kernel/linux/linux-5.10/tools/testing/selftests/net/forwarding/
Dskbedit_priority.sh117 local classid=$1; shift
124 local pkt0=$(qdisc_parent_stats_get $swp2 $classid .packets)
131 qdisc_parent_stats_get $swp2 $classid .packets)
132 check_err $? "Expected to get 10 packets on class $classid, but got $((pkt1 - pkt0))."
138 log_test "$locus skbedit priority $prio -> classid $classid"
/kernel/linux/linux-5.10/include/uapi/linux/netfilter/
Dxt_cgroup.h19 __u32 classid; member
34 __u32 classid; member
/kernel/linux/patches/linux-5.10/prebuilts/usr/include/linux/netfilter/
Dxt_cgroup.h33 __u32 classid; member
44 __u32 classid; member
/kernel/linux/patches/linux-4.19/prebuilts/usr/include/linux/netfilter/
Dxt_cgroup.h20 __u32 classid; member
32 __u32 classid; member
/kernel/linux/linux-5.10/include/linux/
Dcgroup-defs.h779 u32 classid; /* v1 */ member
798 return READ_ONCE(skcd->classid); in sock_cgroup_classid()
813 u32 classid) in sock_cgroup_set_classid() argument
816 WRITE_ONCE(skcd->classid, classid); in sock_cgroup_set_classid()

123