Lines Matching refs:link

112 		if (tuple.link)  in tcx_uninstall()
113 tcx_link(tuple.link)->dev = NULL; in tcx_uninstall()
141 static int tcx_link_prog_attach(struct bpf_link *link, u32 flags, u32 id_or_fd, in tcx_link_prog_attach() argument
144 struct tcx_link *tcx = tcx_link(link); in tcx_link_prog_attach()
154 ret = bpf_mprog_attach(entry, &entry_new, link->prog, link, NULL, flags, in tcx_link_prog_attach()
169 static void tcx_link_release(struct bpf_link *link) in tcx_link_release() argument
171 struct tcx_link *tcx = tcx_link(link); in tcx_link_release()
186 ret = bpf_mprog_detach(entry, &entry_new, link->prog, link, 0, 0, 0); in tcx_link_release()
203 static int tcx_link_update(struct bpf_link *link, struct bpf_prog *nprog, in tcx_link_update() argument
206 struct tcx_link *tcx = tcx_link(link); in tcx_link_update()
218 if (oprog && link->prog != oprog) { in tcx_link_update()
222 oprog = link->prog; in tcx_link_update()
232 ret = bpf_mprog_attach(entry, &entry_new, nprog, link, oprog, in tcx_link_update()
234 link->prog->aux->id, 0); in tcx_link_update()
237 oprog = xchg(&link->prog, nprog); in tcx_link_update()
246 static void tcx_link_dealloc(struct bpf_link *link) in tcx_link_dealloc() argument
248 kfree(tcx_link(link)); in tcx_link_dealloc()
251 static void tcx_link_fdinfo(const struct bpf_link *link, struct seq_file *seq) in tcx_link_fdinfo() argument
253 const struct tcx_link *tcx = tcx_link_const(link); in tcx_link_fdinfo()
267 static int tcx_link_fill_info(const struct bpf_link *link, in tcx_link_fill_info() argument
270 const struct tcx_link *tcx = tcx_link_const(link); in tcx_link_fill_info()
283 static int tcx_link_detach(struct bpf_link *link) in tcx_link_detach() argument
285 tcx_link_release(link); in tcx_link_detach()
304 bpf_link_init(&tcx->link, BPF_LINK_TYPE_TCX, &tcx_link_lops, prog); in tcx_link_init()
307 return bpf_link_prime(&tcx->link, link_primer); in tcx_link_init()
334 ret = tcx_link_prog_attach(&tcx->link, attr->link_create.flags, in tcx_link_attach()