Home
last modified time | relevance | path

Searched refs:cg_fd (Results 1 – 4 of 4) sorted by relevance

/external/linux-kselftest/tools/testing/selftests/bpf/
Dtest_tcpnotify_user.c78 int prog_fd, rv, cg_fd = -1; in main() local
92 cg_fd = create_and_get_cgroup(cg_path); in main()
93 if (cg_fd < 0) in main()
104 rv = bpf_prog_attach(prog_fd, cg_fd, BPF_CGROUP_SOCK_OPS, 0); in main()
162 bpf_prog_detach(cg_fd, BPF_CGROUP_SOCK_OPS); in main()
163 close(cg_fd); in main()
Dtest_tcpbpf_user.c100 int cg_fd = -1; in main() local
108 cg_fd = create_and_get_cgroup(cg_path); in main()
109 if (cg_fd < 0) in main()
120 rv = bpf_prog_attach(prog_fd, cg_fd, BPF_CGROUP_SOCK_OPS, 0); in main()
167 bpf_prog_detach(cg_fd, BPF_CGROUP_SOCK_OPS); in main()
168 close(cg_fd); in main()
Dtest_sockmap.c798 static int run_options(struct sockmap_options *options, int cg_fd, int test) in run_options() argument
825 err = bpf_prog_attach(prog_fd[2], cg_fd, BPF_CGROUP_SOCK_OPS, 0); in run_options()
1076 bpf_prog_detach2(prog_fd[2], cg_fd, BPF_CGROUP_SOCK_OPS); in run_options()
1670 static int __test_suite(int cg_fd, char *bpf_file) in __test_suite() argument
1672 int err, cleanup = cg_fd; in __test_suite()
1680 if (cg_fd < 0) { in __test_suite()
1686 cg_fd = create_and_get_cgroup(CG_PATH); in __test_suite()
1687 if (cg_fd < 0) { in __test_suite()
1690 cg_fd, optarg); in __test_suite()
1691 return cg_fd; in __test_suite()
[all …]
/external/iproute2/ip/
Dipvrf.c264 int rc = -1, cg_fd, prog_fd = -1; in vrf_configure_cgroup() local
266 cg_fd = open(path, O_DIRECTORY | O_RDONLY); in vrf_configure_cgroup()
267 if (cg_fd < 0) { in vrf_configure_cgroup()
290 if (bpf_prog_attach_fd(prog_fd, cg_fd, BPF_CGROUP_INET_SOCK_CREATE)) { in vrf_configure_cgroup()
298 close(cg_fd); in vrf_configure_cgroup()