Home
last modified time | relevance | path

Searched refs:new_prog (Results 1 – 14 of 14) sorted by relevance

/linux/tools/perf/util/
H A Dbpf-prologue.h18 struct bpf_insn *new_prog, size_t *new_cnt,
27 struct bpf_insn *new_prog __maybe_unused, in bpf__gen_prologue()
/linux/kernel/bpf/
H A Dverifier.c19194 struct bpf_prog *new_prog, u32 off, u32 cnt) in adjust_insn_aux_data() argument
19197 struct bpf_insn *insn = new_prog->insnsi; in adjust_insn_aux_data()
19210 prog_len = new_prog->len; in adjust_insn_aux_data()
19255 struct bpf_prog *new_prog; in bpf_patch_insn_data() local
19265 new_prog = bpf_patch_insn_single(env->prog, off, patch, len); in bpf_patch_insn_data()
19266 if (IS_ERR(new_prog)) { in bpf_patch_insn_data()
19267 if (PTR_ERR(new_prog) == -ERANGE) in bpf_patch_insn_data()
19274 adjust_insn_aux_data(env, new_data, new_prog, off, len); in bpf_patch_insn_data()
19276 adjust_poke_descs(new_prog, off, len); in bpf_patch_insn_data()
19277 return new_prog; in bpf_patch_insn_data()
[all …]
H A Dnet_namespace.c165 struct bpf_prog *new_prog, in bpf_netns_link_update_prog() argument
177 if (new_prog->type != link->prog->type) in bpf_netns_link_update_prog()
192 ret = bpf_prog_array_update_at(run_array, idx, new_prog); in bpf_netns_link_update_prog()
196 old_prog = xchg(&link->prog, new_prog); in bpf_netns_link_update_prog()
H A Dbpf_iter.c411 struct bpf_prog *new_prog, in bpf_iter_link_replace()
422 if (link->prog->type != new_prog->type || in bpf_iter_link_replace()
423 link->prog->expected_attach_type != new_prog->expected_attach_type || in bpf_iter_link_replace()
424 link->prog->aux->attach_btf_id != new_prog->aux->attach_btf_id) { in bpf_iter_link_replace()
429 old_prog = xchg(&link->prog, new_prog); in bpf_iter_link_replace()
412 bpf_iter_link_replace(struct bpf_link * link,struct bpf_prog * new_prog,struct bpf_prog * old_prog) bpf_iter_link_replace() argument
H A Doffload.c270 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog) in bpf_prog_dev_bound_inherit() argument
280 new_prog->aux->dev_bound = old_prog->aux->dev_bound; in bpf_prog_dev_bound_inherit()
281 new_prog->aux->offload_requested = old_prog->aux->offload_requested; in bpf_prog_dev_bound_inherit()
289 err = __bpf_prog_dev_bound_init(new_prog, old_prog->aux->offload->netdev); in bpf_prog_dev_bound_inherit()
H A Dcgroup.c633 struct bpf_prog *new_prog = prog ? : link->link.prog; in __cgroup_bpf_attach() local
650 atype = bpf_cgroup_atype_find(type, new_prog->aux->attach_btf_id); in __cgroup_bpf_attach()
705 err = bpf_trampoline_link_cgroup_shim(new_prog, atype); in __cgroup_bpf_attach()
726 bpf_trampoline_unlink_cgroup_shim(new_prog); in __cgroup_bpf_attach()
812 struct bpf_prog *new_prog) in __cgroup_bpf_replace() argument
820 atype = bpf_cgroup_atype_find(link->type, new_prog->aux->attach_btf_id); in __cgroup_bpf_replace()
826 if (link->link.prog->type != new_prog->type) in __cgroup_bpf_replace()
838 old_prog = xchg(&link->link.prog, new_prog); in __cgroup_bpf_replace()
844 static int cgroup_bpf_replace(struct bpf_link *link, struct bpf_prog *new_prog, in cgroup_bpf_replace() argument
862 ret = __cgroup_bpf_replace(cg_link->cgroup, cg_link, new_prog); in cgroup_bpf_replace()
H A Dsyscall.c5307 struct bpf_prog *old_prog = NULL, *new_prog; in link_update() local
5328 new_prog = bpf_prog_get(attr->link_update.new_prog_fd); in link_update()
5329 if (IS_ERR(new_prog)) { in link_update()
5330 ret = PTR_ERR(new_prog); in link_update()
5347 ret = link->ops->update_prog(link, new_prog, old_prog); in link_update()
5355 bpf_prog_put(new_prog); in link_update()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dxdp_metadata.c370 struct bpf_program *new_prog, *prog; in test_xdp_metadata() local
504 new_prog = bpf_object__find_program_by_name(bpf_obj2->obj, "freplace_rx"); in test_xdp_metadata()
505 bpf_program__set_attach_target(new_prog, bpf_program__fd(prog), "rx"); in test_xdp_metadata()
/linux/net/core/
H A Ddev.c9485 struct bpf_xdp_link *link, struct bpf_prog *new_prog, in dev_xdp_attach() argument
9499 if (link && (new_prog || old_prog)) in dev_xdp_attach()
9551 new_prog = link->link.prog; in dev_xdp_attach()
9553 if (new_prog) { in dev_xdp_attach()
9566 if (!offload && bpf_prog_is_offloaded(new_prog->aux)) { in dev_xdp_attach()
9570 if (bpf_prog_is_dev_bound(new_prog->aux) && !bpf_offload_dev_match(new_prog, dev)) { in dev_xdp_attach()
9574 if (new_prog->expected_attach_type == BPF_XDP_DEVMAP) { in dev_xdp_attach()
9578 if (new_prog->expected_attach_type == BPF_XDP_CPUMAP) { in dev_xdp_attach()
9585 if (new_prog != cur_prog) { in dev_xdp_attach()
9592 err = dev_xdp_install(dev, mode, bpf_op, extack, flags, new_prog); in dev_xdp_attach()
[all …]
H A Dfilter.c569 struct bpf_prog *new_prog, int *new_len, in bpf_convert_filter() argument
584 if (new_prog) { in bpf_convert_filter()
585 first_insn = new_prog->insnsi; in bpf_convert_filter()
597 if (new_prog) { in bpf_convert_filter()
833 if (new_prog && new_prog->aux->stack_depth < stack_off) in bpf_convert_filter()
834 new_prog->aux->stack_depth = stack_off; in bpf_convert_filter()
883 if (new_prog) in bpf_convert_filter()
889 if (!new_prog) { in bpf_convert_filter()
/linux/net/netfilter/
H A Dnf_bpf_link.c165 static int bpf_nf_link_update(struct bpf_link *link, struct bpf_prog *new_prog, in bpf_nf_link_update() argument
/linux/drivers/net/ethernet/qlogic/qede/
H A Dqede.h521 struct bpf_prog *new_prog; member
H A Dqede_filter.c1025 old = xchg(&edev->xdp_prog, args->u.new_prog); in qede_xdp_reload_func()
1036 args.u.new_prog = prog; in qede_xdp_set()
/linux/include/linux/
H A Dbpf.h1630 int (*update_prog)(struct bpf_link *link, struct bpf_prog *new_prog,
3020 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog);
3076 static inline int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, in bpf_prog_dev_bound_inherit() argument