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

/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dcgroup_skb_sk_lookup.c52 int cgfd = -1; local
58 cgfd = test__join_cgroup(cg_path);
59 if (CHECK(cgfd < 0, "cgroup_join", "cgroup setup failed\n"))
62 link = bpf_program__attach_cgroup(skel->progs.ingress_lookup, cgfd);
71 close(cgfd);
/linux-master/tools/testing/selftests/bpf/
H A Dtest_sock.c407 static int attach_sock_prog(int cgfd, int progfd, argument
410 return bpf_prog_attach(progfd, cgfd, attach_type, BPF_F_ALLOW_OVERRIDE);
480 static int run_test_case(int cgfd, const struct sock_test *test) argument
495 if (attach_sock_prog(cgfd, progfd, test->attach_type) < 0) {
512 bpf_prog_detach(cgfd, test->attach_type);
518 static int run_tests(int cgfd) argument
525 if (run_test_case(cgfd, &tests[i]))
536 int cgfd = -1; local
539 cgfd = cgroup_setup_and_join(CG_PATH);
540 if (cgfd <
[all...]
H A Dtest_skb_cgroup_id_user.c154 int cgfd = -1; local
165 cgfd = cgroup_setup_and_join(CGROUP_PATH);
166 if (cgfd < 0)
179 close(cgfd);
H A Dtest_sock_addr.c1318 static int run_test_case(int cgfd, const struct sock_addr_test *test) argument
1331 err = bpf_prog_attach(progfd, cgfd, test->attach_type,
1383 bpf_prog_detach(cgfd, test->attach_type);
1389 static int run_tests(int cgfd) argument
1396 if (run_test_case(cgfd, &tests[i]))
1407 int cgfd = -1; local
1417 cgfd = cgroup_setup_and_join(CG_PATH);
1418 if (cgfd < 0)
1424 if (run_tests(cgfd))
1431 close(cgfd);
[all...]
H A Dtest_sysctl.c1543 static int run_test_case(int cgfd, struct sysctl_test *test) argument
1563 if (bpf_prog_attach(progfd, cgfd, atype, BPF_F_ALLOW_OVERRIDE) < 0) {
1589 bpf_prog_detach(cgfd, atype);
1595 static int run_tests(int cgfd) argument
1602 if (run_test_case(cgfd, &tests[i]))
1613 int cgfd = -1; local
1616 cgfd = cgroup_setup_and_join(CG_PATH);
1617 if (cgfd < 0)
1623 if (run_tests(cgfd))
1630 close(cgfd);
[all...]

Completed in 177 milliseconds