Lines Matching refs:link
16 struct bpf_link *link; in test_xdp_link() local
53 link = bpf_program__attach_xdp(skel1->progs.xdp_handler, IFINDEX_LO); in test_xdp_link()
54 if (CHECK(!IS_ERR(link), "link_attach_fail", "unexpected success\n")) { in test_xdp_link()
55 bpf_link__destroy(link); in test_xdp_link()
69 link = bpf_program__attach_xdp(skel1->progs.xdp_handler, IFINDEX_LO); in test_xdp_link()
70 if (CHECK(IS_ERR(link), "link_attach", "failed: %ld\n", PTR_ERR(link))) in test_xdp_link()
72 skel1->links.xdp_handler = link; in test_xdp_link()
97 link = bpf_program__attach_xdp(skel2->progs.xdp_handler, IFINDEX_LO); in test_xdp_link()
98 if (CHECK(!IS_ERR(link), "link_attach_fail", "unexpected success\n")) { in test_xdp_link()
99 bpf_link__destroy(link); in test_xdp_link()
107 link = bpf_program__attach_xdp(skel2->progs.xdp_handler, IFINDEX_LO); in test_xdp_link()
108 if (CHECK(IS_ERR(link), "link_attach", "failed: %ld\n", PTR_ERR(link))) in test_xdp_link()
110 skel2->links.xdp_handler = link; in test_xdp_link()
118 err = bpf_link__update_program(link, skel1->progs.xdp_handler); in test_xdp_link()
123 err = bpf_obj_get_info_by_fd(bpf_link__fd(link), &link_info, &link_info_len); in test_xdp_link()
134 err = bpf_link__detach(link); in test_xdp_link()
139 err = bpf_obj_get_info_by_fd(bpf_link__fd(link), &link_info, &link_info_len); in test_xdp_link()