Lines Matching refs:tuple
7 static int bpf_mprog_link(struct bpf_tuple *tuple,
25 tuple->link = link;
26 tuple->prog = link->prog;
30 static int bpf_mprog_prog(struct bpf_tuple *tuple,
48 tuple->link = NULL;
49 tuple->prog = prog;
53 static int bpf_mprog_tuple_relative(struct bpf_tuple *tuple,
60 memset(tuple, 0, sizeof(*tuple));
62 return bpf_mprog_link(tuple, id_or_fd, flags, type);
64 * tuple link/prog is just NULLed. This is the case when before/
69 return bpf_mprog_prog(tuple, id_or_fd, flags, type);
72 static void bpf_mprog_tuple_put(struct bpf_tuple *tuple)
74 if (tuple->link)
75 bpf_link_put(tuple->link);
76 else if (tuple->prog)
77 bpf_prog_put(tuple->prog);
179 struct bpf_tuple *tuple)
187 if (tuple->prog == READ_ONCE(fp->prog))
188 return tuple->link == cp->link ? i : -EBUSY;
194 struct bpf_tuple *tuple)
202 if (tuple->prog == READ_ONCE(fp->prog) &&
203 (!tuple->link || tuple->link == cp->link))
206 return tuple->prog ? -ENOENT : -1;
210 struct bpf_tuple *tuple)
218 if (tuple->prog == READ_ONCE(fp->prog) &&
219 (!tuple->link || tuple->link == cp->link))
222 return tuple->prog ? -ENOENT : bpf_mprog_total(entry);
298 struct bpf_tuple *tuple, int idx)
313 /* The deletion request can either be without filled tuple in which
314 * case it gets populated here based on idx, or with filled tuple
319 if (link && !tuple->link)
321 WARN_ON_ONCE(tuple->prog && tuple->prog != prog);
322 WARN_ON_ONCE(tuple->link && tuple->link != link);
323 tuple->prog = prog;
324 tuple->link = link;