Home
last modified time | relevance | path

Searched refs:cgrp (Results 1 – 25 of 59) sorted by relevance

123

/tools/testing/selftests/bpf/progs/
A Dcgroup_read_xattr.c29 struct cgroup *cgrp; in BPF_PROG() local
32 if (!cgrp) in BPF_PROG()
35 read_xattr(cgrp); in BPF_PROG()
48 if (!cgrp) in BPF_PROG()
51 read_xattr(cgrp); in BPF_PROG()
65 if (!cgrp) in BPF_PROG()
84 if (!cgrp) in BPF_PROG()
104 if (!cgrp) in BPF_PROG()
124 if (!cgrp) in BPF_PROG()
131 read_xattr(cgrp); in BPF_PROG()
[all …]
A Dcgrp_kfunc_failure.c24 status = cgrps_kfunc_map_insert(cgrp); in insert_lookup_cgrp()
38 v = insert_lookup_cgrp(cgrp); in BPF_PROG()
56 acquired = bpf_cgroup_acquire(cgrp); in BPF_PROG()
87 acquired = bpf_cgroup_acquire(cgrp); in BPF_PROG()
143 v = insert_lookup_cgrp(cgrp); in BPF_PROG()
163 v = insert_lookup_cgrp(cgrp); in BPF_PROG()
168 kptr = v->cgrp; in BPF_PROG()
183 v = insert_lookup_cgrp(cgrp); in BPF_PROG()
188 bpf_cgroup_release(v->cgrp); in BPF_PROG()
218 local.cgrp = NULL; in BPF_PROG()
[all …]
A Dcgrp_ls_sleepable.c33 if (cgrp == NULL) in cgroup_iter()
39 cgroup_id = cgrp->kn->id; in cgroup_iter()
53 cgroup_id = cgrp->kn->id; in __no_rcu_lock()
60 struct cgroup *cgrp; in cgrp1_no_rcu_lock() local
68 if (!cgrp) in cgrp1_no_rcu_lock()
71 __no_rcu_lock(cgrp); in cgrp1_no_rcu_lock()
72 bpf_cgroup_release(cgrp); in cgrp1_no_rcu_lock()
94 struct cgroup *cgrp; in yes_rcu_lock() local
104 if (!cgrp) { in yes_rcu_lock()
112 bpf_cgroup_release(cgrp); in yes_rcu_lock()
[all …]
A Dcgrp_kfunc_success.c40 acquired = bpf_cgroup_acquire(cgrp); in BPF_PROG()
57 status = cgrps_kfunc_map_insert(cgrp); in BPF_PROG()
74 status = cgrps_kfunc_map_insert(cgrp); in BPF_PROG()
86 kptr = v->cgrp; in BPF_PROG()
96 kptr = bpf_kptr_xchg(&v->cgrp, NULL); in BPF_PROG()
117 status = cgrps_kfunc_map_insert(cgrp); in BPF_PROG()
130 kptr = v->cgrp; in BPF_PROG()
146 self = bpf_cgroup_ancestor(cgrp, cgrp->level); in BPF_PROG()
152 if (self->self.id != cgrp->self.id) { in BPF_PROG()
159 ancestor1 = bpf_cgroup_ancestor(cgrp, cgrp->level - 1); in BPF_PROG()
[all …]
A Dcgrp_ls_recursion.c30 static void __on_update(struct cgroup *cgrp) in __on_update() argument
47 struct cgroup *cgrp; in BPF_PROG() local
50 cgrp = bpf_task_get_cgroup1(task, target_hid); in BPF_PROG()
51 if (!cgrp) in BPF_PROG()
54 __on_update(cgrp); in BPF_PROG()
55 bpf_cgroup_release(cgrp); in BPF_PROG()
80 struct cgroup *cgrp; in BPF_PROG() local
83 cgrp = bpf_task_get_cgroup1(task, target_hid); in BPF_PROG()
84 if (!cgrp) in BPF_PROG()
87 __on_enter(regs, id, cgrp); in BPF_PROG()
[all …]
A Dcgrp_ls_tp_btf.c42 ptr = bpf_cgrp_storage_get(&map_a, cgrp, 0, in __on_enter()
48 err = bpf_cgrp_storage_delete(&map_a, cgrp); in __on_enter()
58 ptr = bpf_cgrp_storage_get(&map_a, cgrp, 0, in __on_enter()
70 struct cgroup *cgrp; in BPF_PROG() local
78 if (!cgrp) in BPF_PROG()
81 __on_enter(regs, id, cgrp); in BPF_PROG()
82 bpf_cgroup_release(cgrp); in BPF_PROG()
108 struct cgroup *cgrp; in BPF_PROG() local
116 if (!cgrp) in BPF_PROG()
119 __on_exit(regs, id, cgrp); in BPF_PROG()
[all …]
A Diters_css_task.c28 struct cgroup *cgrp; in BPF_PROG() local
33 cgrp = bpf_cgroup_from_id(cg_id); in BPF_PROG()
35 if (!cgrp) in BPF_PROG()
38 css = &cgrp->self; in BPF_PROG()
45 bpf_cgroup_release(cgrp); in BPF_PROG()
52 return cgrp->kn->id; in cgroup_id()
64 if (cgrp == NULL) { in cgroup_id_printer()
75 css = &cgrp->self; in cgroup_id_printer()
93 if (cgrp == NULL) in BPF_PROG()
95 css = &cgrp->self; in BPF_PROG()
[all …]
A Dtest_task_under_cgroup.c23 struct cgroup *cgrp = NULL; in BPF_PROG() local
36 cgrp = bpf_cgroup_from_id(cgid); in BPF_PROG()
37 if (!cgrp) in BPF_PROG()
40 if (bpf_task_under_cgroup(acquired, cgrp)) in BPF_PROG()
44 if (cgrp) in BPF_PROG()
45 bpf_cgroup_release(cgrp); in BPF_PROG()
54 struct cgroup *cgrp = NULL; in BPF_PROG() local
66 cgrp = bpf_cgroup_from_id(1); in BPF_PROG()
67 if (!cgrp) in BPF_PROG()
69 if (!bpf_task_under_cgroup(task, cgrp)) in BPF_PROG()
[all …]
A Diters_task_failure.c34 struct cgroup *cgrp = bpf_cgroup_from_id(cg_id); in BPF_PROG() local
37 if (!cgrp) in BPF_PROG()
39 root_css = &cgrp->self; in BPF_PROG()
44 bpf_cgroup_release(cgrp); in BPF_PROG()
69 struct cgroup *cgrp = bpf_cgroup_from_id(cg_id); in BPF_PROG() local
72 if (!cgrp) in BPF_PROG()
74 root_css = &cgrp->self; in BPF_PROG()
83 bpf_cgroup_release(cgrp); in BPF_PROG()
96 if (cgrp == NULL) in BPF_PROG()
98 css = &cgrp->self; in BPF_PROG()
[all …]
A Dcgrp_kfunc_common.h13 struct cgroup __kptr * cgrp; member
25 struct cgroup *bpf_cgroup_ancestor(struct cgroup *cgrp, int level) __ksym;
30 static inline struct __cgrps_kfunc_map_value *cgrps_kfunc_map_value_lookup(struct cgroup *cgrp) in cgrps_kfunc_map_value_lookup() argument
35 status = bpf_probe_read_kernel(&id, sizeof(id), &cgrp->self.id); in cgrps_kfunc_map_value_lookup()
42 static inline int cgrps_kfunc_map_insert(struct cgroup *cgrp) in cgrps_kfunc_map_insert() argument
49 status = bpf_probe_read_kernel(&id, sizeof(id), &cgrp->self.id); in cgrps_kfunc_map_insert()
53 local.cgrp = NULL; in cgrps_kfunc_map_insert()
64 acquired = bpf_cgroup_acquire(cgrp); in cgrps_kfunc_map_insert()
70 old = bpf_kptr_xchg(&v->cgrp, acquired); in cgrps_kfunc_map_insert()
A Dtest_cgroup1_hierarchy.c14 struct cgroup *bpf_cgroup_ancestor(struct cgroup *cgrp, int level) __ksym;
15 void bpf_cgroup_release(struct cgroup *cgrp) __ksym;
19 struct cgroup *cgrp, *ancestor; in bpf_link_create_verify() local
32 cgrp = bpf_task_get_cgroup1(task, target_hid); in bpf_link_create_verify()
33 if (!cgrp) in bpf_link_create_verify()
37 if (cgrp->kn->id == target_ancestor_cgid) in bpf_link_create_verify()
40 ancestor = bpf_cgroup_ancestor(cgrp, target_ancestor_level); in bpf_link_create_verify()
49 bpf_cgroup_release(cgrp); in bpf_link_create_verify()
A Dcgroup_iter.c11 static inline u64 cgroup_id(struct cgroup *cgrp) in cgroup_id() argument
13 return cgrp->kn->id; in cgroup_id()
20 struct cgroup *cgrp = ctx->cgroup; in cgroup_id_printer() local
23 if (cgrp == NULL) { in cgroup_id_printer()
32 BPF_SEQ_PRINTF(seq, "%8llu\n", cgroup_id(cgrp)); in cgroup_id_printer()
34 if (terminal_cgroup == cgroup_id(cgrp)) in cgroup_id_printer()
A Dtask_ls_uptr.c10 void bpf_cgroup_release(struct cgroup *cgrp) __ksym;
28 struct cgroup *cgrp; in on_enter() local
43 cgrp = bpf_kptr_xchg(&ptr->cgrp, NULL); in on_enter()
44 if (cgrp) { in on_enter()
45 int lvl = cgrp->level; in on_enter()
47 bpf_cgroup_release(cgrp); in on_enter()
A Dread_cgroupfs_xattr.c26 struct cgroup *cgrp; in BPF_PROG() local
32 cgrp = bpf_cgroup_from_id(cgrp_id); in BPF_PROG()
33 if (!cgrp) { in BPF_PROG()
38 css = &cgrp->self; in BPF_PROG()
57 bpf_cgroup_release(cgrp); in BPF_PROG()
A Dverifier_kfunc_prog_types.c72 struct cgroup *cgrp, *ref; in cgrp_kfunc_load_test() local
74 cgrp = bpf_cgroup_from_id(0); in cgrp_kfunc_load_test()
75 if (!cgrp) in cgrp_kfunc_load_test()
78 ref = bpf_cgroup_acquire(cgrp); in cgrp_kfunc_load_test()
80 bpf_cgroup_release(cgrp); in cgrp_kfunc_load_test()
85 bpf_cgroup_release(cgrp); in cgrp_kfunc_load_test()
A Dcgroup_hierarchical_stats.c44 static uint64_t cgroup_id(struct cgroup *cgrp) in cgroup_id() argument
46 return cgrp->kn->id; in cgroup_id()
84 int BPF_PROG(flusher, struct cgroup *cgrp, struct cgroup *parent, int cpu) in BPF_PROG() argument
88 __u64 cg_id = cgroup_id(cgrp); in BPF_PROG()
134 int BPF_PROG(dumper, struct bpf_iter_meta *meta, struct cgroup *cgrp) in BPF_PROG() argument
138 __u64 cg_id = cgrp ? cgroup_id(cgrp) : 0; in BPF_PROG()
145 css_rstat_flush(&cgrp->self); in BPF_PROG()
A Dbtf_type_tag_percpu.c51 int BPF_PROG(test_percpu_load, struct cgroup *cgrp, const char *path) in BPF_PROG() argument
53 g = (__u64)cgrp->self.rstat_cpu->updated_children; in BPF_PROG()
58 int BPF_PROG(test_percpu_helper, struct cgroup *cgrp, const char *path) in BPF_PROG() argument
65 cgrp->self.rstat_cpu, cpu); in BPF_PROG()
A Dpercpu_alloc_cgrp_local_storage.c17 } cgrp SEC(".maps");
30 e = bpf_cgrp_storage_get(&cgrp, task->cgroups->dfl_cgrp, 0, in BPF_PROG()
56 e = bpf_cgrp_storage_get(&cgrp, task->cgroups->dfl_cgrp, 0, 0); in BPF_PROG()
89 e = bpf_cgrp_storage_get(&cgrp, task->cgroups->dfl_cgrp, 0, 0); in BPF_PROG()
A Dstruct_ops_kptr_return_fail__wrong_type.c17 struct task_struct *task, struct cgroup *cgrp) in BPF_PROG() argument
21 ret = (struct task_struct *)bpf_cgroup_acquire(cgrp); in BPF_PROG()
/tools/sched_ext/
A Dscx_flatcg.bpf.c179 cgrp = bpf_cgroup_ancestor(cgrp, level); in find_ancestor_cgrp_ctx()
180 if (!cgrp) { in find_ancestor_cgrp_ctx()
348 struct cgroup *cgrp; in BPF_STRUCT_OPS() local
509 struct cgroup *cgrp; in BPF_STRUCT_OPS() local
518 struct cgroup *cgrp; in BPF_STRUCT_OPS() local
542 struct cgroup *cgrp; in BPF_STRUCT_OPS() local
579 struct cgroup *cgrp; in BPF_STRUCT_OPS() local
594 if (cgrp->level) { in BPF_STRUCT_OPS()
595 pcgc = find_ancestor_cgrp_ctx(cgrp, cgrp->level - 1); in BPF_STRUCT_OPS()
651 if (!cgrp) { in try_pick_next_cgroup()
[all …]
/tools/perf/util/
A Dcgroup.c159 if (!cgrp) in add_cgroup()
175 counter->cgrp = cgrp; in add_cgroup()
189 if (cgrp && refcount_dec_and_test(&cgrp->refcnt)) { in cgroup__put()
400 cgrp = counter->cgrp; in parse_cgroups()
402 counter->cgrp = cgrp; in parse_cgroups()
476 evsel->cgrp = cgroup__get(cgrp); in evlist__expand_cgroup()
537 cgrp = malloc(sizeof(*cgrp)); in __cgroup__findnew()
543 free(cgrp); in __cgroup__findnew()
554 return cgrp; in __cgroup__findnew()
565 return cgrp; in cgroup__findnew()
[all …]
A Dbpf_counter_cgroup.c48 struct cgroup *cgrp, *leader_cgrp; in bperf_load_program() local
109 cgrp = NULL; in bperf_load_program()
113 if (cgrp == NULL || evsel->cgrp == leader_cgrp) { in bperf_load_program()
114 leader_cgrp = evsel->cgrp; in bperf_load_program()
115 evsel->cgrp = NULL; in bperf_load_program()
130 evsel->cgrp = leader_cgrp; in bperf_load_program()
133 if (evsel->cgrp == cgrp) in bperf_load_program()
136 cgrp = evsel->cgrp; in bperf_load_program()
138 if (read_cgroup_id(cgrp) < 0) { in bperf_load_program()
140 cgrp->id = 0; in bperf_load_program()
[all …]
A Dbpf-filter.y93 struct cgroup *cgrp;
101 cgrp = cgroup__new($3, /*do_open=*/false);
102 if (cgrp && read_cgroup_id(cgrp) == 0)
103 cgroup_id = cgrp->id;
106 cgroup__put(cgrp);
/tools/perf/util/bpf_skel/
A Dbperf_cgroup.bpf.c65 static inline __u64 get_cgroup_v1_ancestor_id(struct cgroup *cgrp, int level) in get_cgroup_v1_ancestor_id() argument
68 struct cgroup___new *cgrp_new = (void *)cgrp; in get_cgroup_v1_ancestor_id()
74 struct cgroup___old *cgrp_old = (void *)cgrp; in get_cgroup_v1_ancestor_id()
83 struct cgroup *cgrp; in get_cgroup_v1_idx() local
97 cgrp = BPF_CORE_READ(p, cgroups, subsys[perf_subsys_id], cgroup); in get_cgroup_v1_idx()
98 level = BPF_CORE_READ(cgrp, level); in get_cgroup_v1_idx()
107 cgrp_id = get_cgroup_v1_ancestor_id(cgrp, i); in get_cgroup_v1_idx()
153 __u32 key, cgrp; in bperf_cgroup_count() local
193 cgrp = cgrp_idx[c]; in bperf_cgroup_count()
196 key = cgrp * num_events + idx; in bperf_cgroup_count()
/tools/testing/selftests/bpf/
A Dtest_sockmap.c1524 test_exec(cgrp, opt); in test_send_one()
1529 test_exec(cgrp, opt); in test_send_one()
1534 test_exec(cgrp, opt); in test_send_one()
1543 test_exec(cgrp, opt); in test_send_many()
1548 test_exec(cgrp, opt); in test_send_many()
1556 test_exec(cgrp, opt); in test_send_large()
1571 test_send(opt, cgrp); in test_txmsg_pass()
1577 test_send(opt, cgrp); in test_txmsg_redir()
1595 test_send(opt, cgrp); in test_txmsg_drop()
1602 test_send(opt, cgrp); in test_txmsg_ingress_redir()
[all …]

Completed in 34 milliseconds

123