Lines Matching full:links

40 	struct bpf_link *links[ARRAY_SIZE(cgs)] = {}, *tmp_link;  in test_cgroup_link()  local
66 links[i] = bpf_program__attach_cgroup(skel->progs.egress, in test_cgroup_link()
68 if (CHECK(IS_ERR(links[i]), "cg_attach", "i: %d, err: %ld\n", in test_cgroup_link()
69 i, PTR_ERR(links[i]))) in test_cgroup_link()
110 bpf_link__destroy(links[last_cg]); in test_cgroup_link()
111 links[last_cg] = NULL; in test_cgroup_link()
122 links[last_cg] = bpf_program__attach_cgroup(skel->progs.egress, in test_cgroup_link()
124 if (CHECK(IS_ERR(links[last_cg]), "cg_attach", "err: %ld\n", in test_cgroup_link()
125 PTR_ERR(links[last_cg]))) in test_cgroup_link()
131 bpf_link__destroy(links[last_cg]); in test_cgroup_link()
132 links[last_cg] = NULL; in test_cgroup_link()
166 links[last_cg] = bpf_program__attach_cgroup(skel->progs.egress, in test_cgroup_link()
168 if (CHECK(IS_ERR(links[last_cg]), "cg_attach", "err: %ld\n", in test_cgroup_link()
169 PTR_ERR(links[last_cg]))) in test_cgroup_link()
182 /* replace BPF programs inside their links for all but first link */ in test_cgroup_link()
184 err = bpf_link__update_program(links[i], skel->progs.egress_alt); in test_cgroup_link()
194 err = bpf_link_update(bpf_link__fd(links[0]), in test_cgroup_link()
204 err = bpf_link_update(bpf_link__fd(links[0]), in test_cgroup_link()
213 /* close cgroup FDs before detaching links */ in test_cgroup_link()
224 prog_id = link_info_prog_id(links[0], &info); in test_cgroup_link()
228 err = bpf_link__detach(links[0]); in test_cgroup_link()
233 prog_id = link_info_prog_id(links[0], &info); in test_cgroup_link()
252 if (!IS_ERR(links[i])) in test_cgroup_link()
253 bpf_link__destroy(links[i]); in test_cgroup_link()