Lines Matching refs:link_fd
77 int link_fd; member
495 int link_fd; in xsk_create_bpf_link() local
514 link_fd = bpf_link_create(ctx->prog_fd, ctx->ifindex, BPF_XDP, &opts); in xsk_create_bpf_link()
515 if (link_fd < 0) { in xsk_create_bpf_link()
517 return link_fd; in xsk_create_bpf_link()
520 ctx->link_fd = link_fd; in xsk_create_bpf_link()
673 static int xsk_link_lookup(int ifindex, __u32 *prog_id, int *link_fd) in xsk_link_lookup() argument
711 *link_fd = fd; in xsk_link_lookup()
730 int prog_fd, link_fd = -1, insn_cnt = ARRAY_SIZE(insns); in xsk_probe_bpf_link() local
735 err = xsk_link_lookup(ifindex_lo, NULL, &link_fd); in xsk_probe_bpf_link()
739 if (link_fd >= 0) in xsk_probe_bpf_link()
746 link_fd = bpf_link_create(prog_fd, ifindex_lo, BPF_XDP, &opts); in xsk_probe_bpf_link()
749 if (link_fd >= 0) { in xsk_probe_bpf_link()
751 close(link_fd); in xsk_probe_bpf_link()
816 close(ctx->link_fd); in xsk_init_xdp_res()
855 close(ctx->link_fd); in xsk_lookup_xdp_res()
867 err = xsk_link_lookup(ctx->ifindex, &prog_id, &ctx->link_fd); in __xsk_setup_xdp_prog()
1244 close(ctx->link_fd); in xsk_socket__delete()