Home
last modified time | relevance | path

Searched refs:cgfd (Results 1 – 5 of 5) sorted by relevance

/openbmc/linux/tools/testing/selftests/bpf/prog_tests/
H A Dcgroup_skb_sk_lookup.c52 int cgfd = -1; in run_cgroup_bpf_test() local
58 cgfd = test__join_cgroup(cg_path); in run_cgroup_bpf_test()
59 if (CHECK(cgfd < 0, "cgroup_join", "cgroup setup failed\n")) in run_cgroup_bpf_test()
62 link = bpf_program__attach_cgroup(skel->progs.ingress_lookup, cgfd); in run_cgroup_bpf_test()
71 close(cgfd); in run_cgroup_bpf_test()
/openbmc/linux/tools/testing/selftests/bpf/
H A Dtest_sock.c407 static int attach_sock_prog(int cgfd, int progfd, in attach_sock_prog() argument
480 static int run_test_case(int cgfd, const struct sock_test *test) in run_test_case() argument
495 if (attach_sock_prog(cgfd, progfd, test->attach_type) < 0) { in run_test_case()
512 bpf_prog_detach(cgfd, test->attach_type); in run_test_case()
518 static int run_tests(int cgfd) in run_tests() argument
525 if (run_test_case(cgfd, &tests[i])) in run_tests()
536 int cgfd = -1; in main() local
539 cgfd = cgroup_setup_and_join(CG_PATH); in main()
540 if (cgfd < 0) in main()
546 if (run_tests(cgfd)) in main()
[all …]
H A Dtest_skb_cgroup_id_user.c154 int cgfd = -1; in main() local
165 cgfd = cgroup_setup_and_join(CGROUP_PATH); in main()
166 if (cgfd < 0) in main()
179 close(cgfd); in main()
H A Dtest_sock_addr.c1317 static int run_test_case(int cgfd, const struct sock_addr_test *test) in run_test_case() argument
1330 err = bpf_prog_attach(progfd, cgfd, test->attach_type, in run_test_case()
1382 bpf_prog_detach(cgfd, test->attach_type); in run_test_case()
1388 static int run_tests(int cgfd) in run_tests() argument
1395 if (run_test_case(cgfd, &tests[i])) in run_tests()
1406 int cgfd = -1; in main() local
1416 cgfd = cgroup_setup_and_join(CG_PATH); in main()
1417 if (cgfd < 0) in main()
1423 if (run_tests(cgfd)) in main()
1430 close(cgfd); in main()
H A Dtest_sysctl.c1543 static int run_test_case(int cgfd, struct sysctl_test *test) in run_test_case() argument
1563 if (bpf_prog_attach(progfd, cgfd, atype, BPF_F_ALLOW_OVERRIDE) < 0) { in run_test_case()
1589 bpf_prog_detach(cgfd, atype); in run_test_case()
1595 static int run_tests(int cgfd) in run_tests() argument
1602 if (run_test_case(cgfd, &tests[i])) in run_tests()
1613 int cgfd = -1; in main() local
1616 cgfd = cgroup_setup_and_join(CG_PATH); in main()
1617 if (cgfd < 0) in main()
1623 if (run_tests(cgfd)) in main()
1630 close(cgfd); in main()