Lines Matching refs:cg_fd
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()
1391 err = test_start_end(cg_fd); in __test_suite()
1398 close(cg_fd); in __test_suite()
1418 int opt, longindex, err, cg_fd = 0; in main() local
1441 cg_fd = open(optarg, O_DIRECTORY, O_RDONLY); in main()
1442 if (cg_fd < 0) { in main()
1445 cg_fd, optarg); in main()
1446 return cg_fd; in main()
1489 if (!cg_fd) { in main()
1510 err = run_options(&options, cg_fd, test); in main()
1511 close(cg_fd); in main()