Searched refs:cg_fd (Results 1 – 6 of 6) sorted by relevance
/Linux-v4.19/tools/testing/selftests/bpf/ |
D | test_tcpbpf_user.c | 78 int cg_fd = -1; in main() local 85 cg_fd = create_and_get_cgroup(cg_path); in main() 86 if (!cg_fd) in main() 97 rv = bpf_prog_attach(prog_fd, cg_fd, BPF_CGROUP_SOCK_OPS, 0); in main() 127 bpf_prog_detach(cg_fd, BPF_CGROUP_SOCK_OPS); in main() 128 close(cg_fd); in main()
|
D | test_sockmap.c | 620 static int run_options(struct sockmap_options *options, int cg_fd, int test) in run_options() argument 647 err = bpf_prog_attach(prog_fd[2], cg_fd, BPF_CGROUP_SOCK_OPS, 0); in run_options() 841 bpf_prog_detach2(prog_fd[2], cg_fd, BPF_CGROUP_SOCK_OPS); in run_options() 1353 int cg_fd, err; in __test_suite() local 1366 cg_fd = create_and_get_cgroup(CG_PATH); in __test_suite() 1367 if (cg_fd < 0) { in __test_suite() 1370 cg_fd, optarg); in __test_suite() 1371 return cg_fd; in __test_suite() 1381 err = test_txmsg(cg_fd); in __test_suite() 1386 err = test_mixed(cg_fd); in __test_suite() [all …]
|
/Linux-v4.19/samples/bpf/ |
D | test_cgrp2_attach.c | 87 static int attach_filter(int cg_fd, int type, int verdict) in attach_filter() argument 108 ret = bpf_prog_attach(prog_fd, cg_fd, type, 0); in attach_filter() 133 int opt, cg_fd, ret; in main() local 158 cg_fd = open(argv[optind], O_DIRECTORY | O_RDONLY); in main() 159 if (cg_fd < 0) { in main() 165 ret = bpf_prog_detach(cg_fd, type); in main() 169 ret = attach_filter(cg_fd, type, verdict); in main()
|
D | load_sock_ops.c | 42 int cg_fd; in main() local 49 cg_fd = open(cg_path, O_DIRECTORY, O_RDONLY); in main() 50 error = bpf_prog_detach(cg_fd, BPF_CGROUP_SOCK_OPS); in main() 71 cg_fd = open(cg_path, O_DIRECTORY, O_RDONLY); in main() 87 error = bpf_prog_attach(prog_fd[0], cg_fd, BPF_CGROUP_SOCK_OPS, 0); in main()
|
D | test_cgrp2_sock2.c | 35 int cg_fd, ret, filter_id = 0; in main() local 40 cg_fd = open(argv[1], O_DIRECTORY | O_RDONLY); in main() 41 if (cg_fd < 0) { in main() 59 ret = bpf_prog_attach(prog_fd[filter_id], cg_fd, in main()
|
D | test_cgrp2_sock.c | 208 int cg_fd, prog_fd, ret; in main() local 257 cg_fd = open(cgrp_path, O_DIRECTORY | O_RDONLY); in main() 258 if (cg_fd < 0) { in main() 272 ret = bpf_prog_attach(prog_fd, cg_fd, in main() 280 ret = bpf_prog_detach(cg_fd, BPF_CGROUP_INET_SOCK_CREATE); in main() 288 close(cg_fd); in main()
|