Lines Matching refs:allow_prog

65 	int drop_prog, allow_prog, foo = 0, bar = 0, rc = 0;  in test_foo_bar()  local
67 allow_prog = prog_load(1); in test_foo_bar()
68 if (!allow_prog) in test_foo_bar()
106 if (bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, in test_foo_bar()
124 if (bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, in test_foo_bar()
139 if (bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, in test_foo_bar()
145 if (!bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, 0)) { in test_foo_bar()
162 if (bpf_prog_attach(allow_prog, foo, BPF_CGROUP_INET_EGRESS, 0)) { in test_foo_bar()
167 if (!bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, 0)) { in test_foo_bar()
173 if (!bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, in test_foo_bar()
180 if (!bpf_prog_attach(allow_prog, foo, BPF_CGROUP_INET_EGRESS, in test_foo_bar()
267 int drop_prog, allow_prog[6] = {}, rc = 0; in test_multiprog() local
272 allow_prog[i] = prog_load_cnt(1, 1 << i); in test_multiprog()
273 if (!allow_prog[i]) in test_multiprog()
302 if (bpf_prog_attach(allow_prog[0], cg1, BPF_CGROUP_INET_EGRESS, in test_multiprog()
307 if (!bpf_prog_attach(allow_prog[0], cg1, BPF_CGROUP_INET_EGRESS, in test_multiprog()
312 if (bpf_prog_attach(allow_prog[1], cg1, BPF_CGROUP_INET_EGRESS, in test_multiprog()
317 if (bpf_prog_attach(allow_prog[2], cg2, BPF_CGROUP_INET_EGRESS, in test_multiprog()
322 if (bpf_prog_attach(allow_prog[3], cg3, BPF_CGROUP_INET_EGRESS, in test_multiprog()
327 if (bpf_prog_attach(allow_prog[4], cg4, BPF_CGROUP_INET_EGRESS, in test_multiprog()
332 if (bpf_prog_attach(allow_prog[5], cg5, BPF_CGROUP_INET_EGRESS, 0)) { in test_multiprog()
383 if (bpf_prog_detach2(allow_prog[3], cg3, BPF_CGROUP_INET_EGRESS)) { in test_multiprog()
418 if (allow_prog[i] > 0) in test_multiprog()
419 close(allow_prog[i]); in test_multiprog()