/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | sockopt_qos_to_cc.c | 7 static void run_setsockopt_test(int cg_fd, int sock_fd) in run_setsockopt_test() argument 33 int cg_fd = -1; in test_sockopt_qos_to_cc() local 37 cg_fd = test__join_cgroup("/sockopt_qos_to_cc"); in test_sockopt_qos_to_cc() 38 if (!ASSERT_GE(cg_fd, 0, "cg-join(sockopt_qos_to_cc)")) in test_sockopt_qos_to_cc() 58 cg_fd); in test_sockopt_qos_to_cc() 63 run_setsockopt_test(cg_fd, sock_fd); in test_sockopt_qos_to_cc() 68 if (cg_fd != -1) in test_sockopt_qos_to_cc() 69 close(cg_fd); in test_sockopt_qos_to_cc()
|
H A D | netcnt.c | 21 int cg_fd = -1; in serial_test_netcnt() local 33 cg_fd = test__join_cgroup(CG_NAME); in serial_test_netcnt() 34 if (!ASSERT_GE(cg_fd, 0, "test__join_cgroup")) in serial_test_netcnt() 37 skel->links.bpf_nextcnt = bpf_program__attach_cgroup(skel->progs.bpf_nextcnt, cg_fd); in serial_test_netcnt() 78 if (cg_fd != -1) in serial_test_netcnt() 79 close(cg_fd); in serial_test_netcnt()
|
H A D | tcpbpf_user.c | 117 int cg_fd = -1; in test_tcpbpf_user() local 123 cg_fd = test__join_cgroup(CG_NAME); in test_tcpbpf_user() 124 if (!ASSERT_GE(cg_fd, 0, "test__join_cgroup(" CG_NAME ")")) in test_tcpbpf_user() 127 skel->links.bpf_testcb = bpf_program__attach_cgroup(skel->progs.bpf_testcb, cg_fd); in test_tcpbpf_user() 134 if (cg_fd != -1) in test_tcpbpf_user() 135 close(cg_fd); in test_tcpbpf_user()
|
H A D | cgroup_iter.c | 24 static int cg_fd[] = {-1, -1, -1, -1}; variable 37 cg_fd[i] = fd; in setup_cgroups() 48 close(cg_fd[i]); in cleanup_cgroups() 120 linfo.cgroup.cgroup_fd = (__u32)cg_fd[PARENT]; in test_invalid_cgroup_spec() 137 read_from_cgroup_iter(skel->progs.cgroup_id_printer, cg_fd[PARENT], in test_walk_preorder() 148 read_from_cgroup_iter(skel->progs.cgroup_id_printer, cg_fd[PARENT], in test_walk_postorder() 162 read_from_cgroup_iter(skel->progs.cgroup_id_printer, cg_fd[PARENT], in test_walk_ancestors_up() 177 read_from_cgroup_iter(skel->progs.cgroup_id_printer, cg_fd[PARENT], in test_early_termination() 189 read_from_cgroup_iter(skel->progs.cgroup_id_printer, cg_fd[PARENT], in test_walk_self_only() 289 read_from_cgroup_iter(skel->progs.cgroup_id_printer, cg_fd[CHILD in test_walk_self_only_css_task() [all...] |
H A D | tcp_hdr_options.c | 33 static int cg_fd; variable 319 link = bpf_program__attach_cgroup(skel->progs.estab, cg_fd); in fastopen_estab() 363 link = bpf_program__attach_cgroup(skel->progs.estab, cg_fd); in syncookie_estab() 395 link = bpf_program__attach_cgroup(skel->progs.estab, cg_fd); in fin() 434 link = bpf_program__attach_cgroup(skel->progs.estab, cg_fd); in __simple_estab() 471 link = bpf_program__attach_cgroup(misc_skel->progs.misc_estab, cg_fd); in misc() 543 cg_fd = test__join_cgroup(CG_NAME); in test_tcp_hdr_options() 544 if (!ASSERT_GE(cg_fd, 0, "join_cgroup")) in test_tcp_hdr_options() 559 close(cg_fd); in test_tcp_hdr_options()
|
H A D | net_timestamping.c | 153 int cg_fd; in test_tcp() local 156 cg_fd = test__join_cgroup(CG_NAME); in test_tcp() 157 if (!ASSERT_OK_FD(cg_fd, "join cgroup")) in test_tcp() 172 bpf_program__attach_cgroup(skel->progs.skops_sockopt, cg_fd); in test_tcp() 226 close(cg_fd); in test_tcp()
|
H A D | iters.c | 210 int err, cg_fd, cg_id; in subtest_css_task_iters() local 216 cg_fd = create_and_get_cgroup(cgrp_path); in subtest_css_task_iters() 217 if (!ASSERT_GE(cg_fd, 0, "create_and_get_cgroup")) in subtest_css_task_iters()
|
/linux/tools/testing/selftests/bpf/ |
H A D | test_tcpnotify_user.c | 77 int prog_fd, rv, cg_fd = -1; in main() local 90 cg_fd = cgroup_setup_and_join(cg_path); in main() 91 if (cg_fd < 0) in main() 99 rv = bpf_prog_attach(prog_fd, cg_fd, BPF_CGROUP_SOCK_OPS, 0); in main() 163 bpf_prog_detach(cg_fd, BPF_CGROUP_SOCK_OPS); in main() 164 close(cg_fd); in main()
|
H A D | test_sockmap.c | 160 void (*tester)(int cg_fd, struct sockmap_options *opt); 1049 static int run_options(struct sockmap_options *options, int cg_fd, int test) in run_options() argument 1097 err = bpf_prog_attach(bpf_program__fd(progs[3]), cg_fd, BPF_CGROUP_SOCK_OPS, 0); in run_options() 1376 bpf_prog_detach2(bpf_program__fd(progs[3]), cg_fd, BPF_CGROUP_SOCK_OPS); in run_options() 2049 static int __test_selftests(int cg_fd, struct sockmap_options *opt) in __test_selftests() argument 2069 t.tester(cg_fd, opt); in __test_selftests() 2076 static void test_selftests_sockmap(int cg_fd, struct sockmap_options *opt) in test_selftests_sockmap() argument 2079 __test_selftests(cg_fd, opt); in test_selftests_sockmap() 2082 static void test_selftests_sockhash(int cg_fd, struct sockmap_options *opt) in test_selftests_sockhash() argument 2085 __test_selftests(cg_fd, op in test_selftests_sockhash() 2088 test_selftests_ktls(int cg_fd,struct sockmap_options * opt) test_selftests_ktls() argument 2097 test_selftest(int cg_fd,struct sockmap_options * opt) test_selftest() argument 2110 int opt, longindex, err, cg_fd = 0; main() local [all...] |
H A D | cgroup_helpers.c | 507 int cg_fd; in cgroup_setup_and_join() local 514 cg_fd = create_and_get_cgroup(path); in cgroup_setup_and_join() 515 if (cg_fd < 0) { in cgroup_setup_and_join() 518 return cg_fd; in cgroup_setup_and_join() 526 return cg_fd; in cgroup_setup_and_join()
|
/linux/tools/tracing/rtla/src/ |
H A D | utils.c | 787 int cg_fd; in set_pid_cgroup() local 811 cg_fd = open(cgroup_procs, O_RDWR); in set_pid_cgroup() 812 if (cg_fd < 0) in set_pid_cgroup() 817 retval = write(cg_fd, pid_str, strlen(pid_str)); in set_pid_cgroup() 824 close(cg_fd); in set_pid_cgroup() 846 int cg_fd; in set_comm_cgroup() local 876 cg_fd = open(cgroup_procs, O_RDWR); in set_comm_cgroup() 877 if (cg_fd < 0) in set_comm_cgroup() 892 retval = write(cg_fd, proc_entry->d_name, strlen(proc_entry->d_name)); in set_comm_cgroup() 903 close(cg_fd); in set_comm_cgroup() [all...] |