Searched refs:cg_fd (Results 1 – 7 of 7) sorted by relevance
/tools/testing/selftests/bpf/prog_tests/ |
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() 56 cg_fd); in test_sockopt_qos_to_cc() 61 run_setsockopt_test(cg_fd, sock_fd); in test_sockopt_qos_to_cc() 66 if (cg_fd != -1) in test_sockopt_qos_to_cc() 67 close(cg_fd); in test_sockopt_qos_to_cc()
|
D | netcnt.c | 21 int cg_fd = -1; in test_netcnt() local 33 cg_fd = test__join_cgroup(CG_NAME); in test_netcnt() 34 if (!ASSERT_GE(cg_fd, 0, "test__join_cgroup")) in test_netcnt() 37 skel->links.bpf_nextcnt = bpf_program__attach_cgroup(skel->progs.bpf_nextcnt, cg_fd); in test_netcnt() 78 if (cg_fd != -1) in test_netcnt() 79 close(cg_fd); in test_netcnt()
|
D | tcpbpf_user.c | 124 int cg_fd = -1; in test_tcpbpf_user() local 130 cg_fd = test__join_cgroup(CG_NAME); in test_tcpbpf_user() 131 if (CHECK(cg_fd < 0, "test__join_cgroup(" CG_NAME ")", in test_tcpbpf_user() 132 "cg_fd:%d errno:%d", cg_fd, errno)) in test_tcpbpf_user() 135 skel->links.bpf_testcb = bpf_program__attach_cgroup(skel->progs.bpf_testcb, cg_fd); in test_tcpbpf_user() 142 if (cg_fd != -1) in test_tcpbpf_user() 143 close(cg_fd); in test_tcpbpf_user()
|
D | tcp_hdr_options.c | 33 static int cg_fd; variable 355 link = bpf_program__attach_cgroup(skel->progs.estab, cg_fd); in fastopen_estab() 399 link = bpf_program__attach_cgroup(skel->progs.estab, cg_fd); in syncookie_estab() 431 link = bpf_program__attach_cgroup(skel->progs.estab, cg_fd); in fin() 470 link = bpf_program__attach_cgroup(skel->progs.estab, cg_fd); in __simple_estab() 507 link = bpf_program__attach_cgroup(misc_skel->progs.misc_estab, cg_fd); in misc() 585 cg_fd = test__join_cgroup(CG_NAME); in test_tcp_hdr_options() 586 if (CHECK_FAIL(cg_fd < 0)) in test_tcp_hdr_options() 601 close(cg_fd); in test_tcp_hdr_options()
|
/tools/testing/selftests/bpf/ |
D | test_tcpnotify_user.c | 78 int prog_fd, rv, cg_fd = -1; in main() local 91 cg_fd = cgroup_setup_and_join(cg_path); in main() 92 if (cg_fd < 0) in main() 100 rv = bpf_prog_attach(prog_fd, cg_fd, BPF_CGROUP_SOCK_OPS, 0); in main() 165 bpf_prog_detach(cg_fd, BPF_CGROUP_SOCK_OPS); in main() 166 close(cg_fd); in main()
|
D | cgroup_helpers.c | 303 int cg_fd; in cgroup_setup_and_join() local 310 cg_fd = create_and_get_cgroup(path); in cgroup_setup_and_join() 311 if (cg_fd < 0) { in cgroup_setup_and_join() 314 return cg_fd; in cgroup_setup_and_join() 322 return cg_fd; in cgroup_setup_and_join()
|
D | test_sockmap.c | 153 void (*tester)(int cg_fd, struct sockmap_options *opt); 909 static int run_options(struct sockmap_options *options, int cg_fd, int test) in run_options() argument 960 err = bpf_prog_attach(prog_fd[3], cg_fd, BPF_CGROUP_SOCK_OPS, 0); in run_options() 1238 bpf_prog_detach2(prog_fd[3], cg_fd, BPF_CGROUP_SOCK_OPS); in run_options() 1830 static int __test_selftests(int cg_fd, struct sockmap_options *opt) in __test_selftests() argument 1850 t.tester(cg_fd, opt); in __test_selftests() 1857 static void test_selftests_sockmap(int cg_fd, struct sockmap_options *opt) in test_selftests_sockmap() argument 1860 __test_selftests(cg_fd, opt); in test_selftests_sockmap() 1863 static void test_selftests_sockhash(int cg_fd, struct sockmap_options *opt) in test_selftests_sockhash() argument 1866 __test_selftests(cg_fd, opt); in test_selftests_sockhash() [all …]
|