• Home
  • Raw
  • Download

Lines Matching refs:prog

25 	struct bpf_prog *prog;  member
278 bpf_prog_put(iter_priv->prog); in iter_release()
334 struct bpf_prog *prog) in cache_btf_id() argument
336 tinfo->btf_id = prog->aux->attach_btf_id; in cache_btf_id()
339 bool bpf_iter_prog_supported(struct bpf_prog *prog) in bpf_iter_prog_supported() argument
341 const char *attach_fname = prog->aux->attach_func_name; in bpf_iter_prog_supported()
343 u32 prog_btf_id = prog->aux->attach_btf_id; in bpf_iter_prog_supported()
357 cache_btf_id(iter, prog); in bpf_iter_prog_supported()
365 prog->aux->ctx_arg_info_size = tinfo->reg_info->ctx_arg_info_size; in bpf_iter_prog_supported()
366 prog->aux->ctx_arg_info = tinfo->reg_info->ctx_arg_info; in bpf_iter_prog_supported()
373 bpf_iter_get_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in bpf_iter_get_func_proto() argument
380 if (tinfo->btf_id == prog->aux->attach_btf_id) { in bpf_iter_get_func_proto()
385 fn = reg_info->get_func_proto(func_id, prog); in bpf_iter_get_func_proto()
418 if (old_prog && link->prog != old_prog) { in bpf_iter_link_replace()
423 if (link->prog->type != new_prog->type || in bpf_iter_link_replace()
424 link->prog->expected_attach_type != new_prog->expected_attach_type || in bpf_iter_link_replace()
425 link->prog->aux->attach_btf_id != new_prog->aux->attach_btf_id) { in bpf_iter_link_replace()
430 old_prog = xchg(&link->prog, new_prog); in bpf_iter_link_replace()
508 struct bpf_prog *prog) in bpf_iter_link_attach() argument
538 prog_btf_id = prog->aux->attach_btf_id; in bpf_iter_link_attach()
551 if (prog->aux->sleepable && !bpf_iter_target_support_resched(tinfo)) in bpf_iter_link_attach()
558 bpf_link_init(&link->link, BPF_LINK_TYPE_ITER, &bpf_iter_link_lops, prog); in bpf_iter_link_attach()
568 err = tinfo->reg_info->attach_target(prog, &linfo, &link->aux); in bpf_iter_link_attach()
581 struct bpf_prog *prog) in init_seq_meta() argument
585 priv_data->prog = prog; in init_seq_meta()
596 struct bpf_prog *prog; in prepare_seq_file() local
602 prog = link->link.prog; in prepare_seq_file()
603 bpf_prog_inc(prog); in prepare_seq_file()
622 init_seq_meta(priv_data, tinfo, seq_info, prog); in prepare_seq_file()
632 bpf_prog_put(prog); in prepare_seq_file()
692 return iter_priv->prog; in bpf_iter_get_info()
695 int bpf_iter_run_prog(struct bpf_prog *prog, void *ctx) in bpf_iter_run_prog() argument
700 if (prog->aux->sleepable) { in bpf_iter_run_prog()
705 ret = bpf_prog_run(prog, ctx); in bpf_iter_run_prog()
713 ret = bpf_prog_run(prog, ctx); in bpf_iter_run_prog()