Home
last modified time | relevance | path

Searched refs:cgfd (Results 1 - 11 of 11) sorted by relevance

/kernel/linux/linux-5.10/tools/testing/selftests/bpf/
H A Dtest_sock.c349 static int attach_sock_prog(int cgfd, int progfd, in attach_sock_prog() argument
352 return bpf_prog_attach(progfd, cgfd, attach_type, BPF_F_ALLOW_OVERRIDE); in attach_sock_prog()
399 static int run_test_case(int cgfd, const struct sock_test *test) in run_test_case() argument
413 if (attach_sock_prog(cgfd, progfd, test->attach_type) == -1) { in run_test_case()
440 bpf_prog_detach(cgfd, test->attach_type); in run_test_case()
446 static int run_tests(int cgfd) in run_tests() argument
453 if (run_test_case(cgfd, &tests[i])) in run_tests()
464 int cgfd = -1; in main() local
467 cgfd = cgroup_setup_and_join(CG_PATH); in main()
468 if (cgfd < in main()
[all...]
H A Dtest_socket_cookie.c130 static int run_test(int cgfd) in run_test() argument
159 err = bpf_prog_attach(bpf_program__fd(prog), cgfd, attach_type, in run_test()
191 int cgfd = -1; in main() local
194 cgfd = cgroup_setup_and_join(CG_PATH); in main()
195 if (cgfd < 0) in main()
198 if (run_test(cgfd)) in main()
205 close(cgfd); in main()
H A Dtest_skb_cgroup_id_user.c155 int cgfd = -1; in main() local
163 cgfd = cgroup_setup_and_join(CGROUP_PATH); in main()
164 if (cgfd < 0) in main()
177 close(cgfd); in main()
H A Dtest_sock_addr.c1542 static int run_test_case(int cgfd, const struct sock_addr_test *test) in run_test_case() argument
1555 err = bpf_prog_attach(progfd, cgfd, test->attach_type, in run_test_case()
1607 bpf_prog_detach(cgfd, test->attach_type); in run_test_case()
1613 static int run_tests(int cgfd) in run_tests() argument
1620 if (run_test_case(cgfd, &tests[i])) in run_tests()
1631 int cgfd = -1; in main() local
1641 cgfd = cgroup_setup_and_join(CG_PATH); in main()
1642 if (cgfd < 0) in main()
1645 if (run_tests(cgfd)) in main()
1652 close(cgfd); in main()
[all...]
H A Dtest_sysctl.c1549 static int run_test_case(int cgfd, struct sysctl_test *test) in run_test_case() argument
1569 if (bpf_prog_attach(progfd, cgfd, atype, BPF_F_ALLOW_OVERRIDE) == -1) { in run_test_case()
1595 bpf_prog_detach(cgfd, atype); in run_test_case()
1601 static int run_tests(int cgfd) in run_tests() argument
1608 if (run_test_case(cgfd, &tests[i])) in run_tests()
1619 int cgfd = -1; in main() local
1622 cgfd = cgroup_setup_and_join(CG_PATH); in main()
1623 if (cgfd < 0) in main()
1626 if (run_tests(cgfd)) in main()
1633 close(cgfd); in main()
[all...]
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-6.6/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()
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/
H A Dtest_sock.c407 static int attach_sock_prog(int cgfd, int progfd, in attach_sock_prog() argument
410 return bpf_prog_attach(progfd, cgfd, attach_type, BPF_F_ALLOW_OVERRIDE); in attach_sock_prog()
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 < 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()
[all...]
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()
[all...]

Completed in 8 milliseconds