Home
last modified time | relevance | path

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

/Linux-v6.6/tools/perf/util/
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-v6.6/kernel/bpf/
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()
Dbpf_iter.c412 struct bpf_prog *new_prog, in bpf_iter_link_replace() argument
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()
Dverifier.c17257 struct bpf_prog *new_prog, u32 off, u32 cnt) in adjust_insn_aux_data() argument
17260 struct bpf_insn *insn = new_prog->insnsi; in adjust_insn_aux_data()
17273 prog_len = new_prog->len; in adjust_insn_aux_data()
17318 struct bpf_prog *new_prog; in bpf_patch_insn_data() local
17328 new_prog = bpf_patch_insn_single(env->prog, off, patch, len); in bpf_patch_insn_data()
17329 if (IS_ERR(new_prog)) { in bpf_patch_insn_data()
17330 if (PTR_ERR(new_prog) == -ERANGE) in bpf_patch_insn_data()
17337 adjust_insn_aux_data(env, new_data, new_prog, off, len); in bpf_patch_insn_data()
17339 adjust_poke_descs(new_prog, off, len); in bpf_patch_insn_data()
17340 return new_prog; in bpf_patch_insn_data()
[all …]
Doffload.c263 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog) in bpf_prog_dev_bound_inherit() argument
273 new_prog->aux->dev_bound = old_prog->aux->dev_bound; in bpf_prog_dev_bound_inherit()
274 new_prog->aux->offload_requested = old_prog->aux->offload_requested; in bpf_prog_dev_bound_inherit()
282 err = __bpf_prog_dev_bound_init(new_prog, old_prog->aux->offload->netdev); in bpf_prog_dev_bound_inherit()
Dcgroup.c616 struct bpf_prog *new_prog = prog ? : link->link.prog; in __cgroup_bpf_attach() local
633 atype = bpf_cgroup_atype_find(type, new_prog->aux->attach_btf_id); in __cgroup_bpf_attach()
688 err = bpf_trampoline_link_cgroup_shim(new_prog, atype); in __cgroup_bpf_attach()
709 bpf_trampoline_unlink_cgroup_shim(new_prog); in __cgroup_bpf_attach()
795 struct bpf_prog *new_prog) in __cgroup_bpf_replace() argument
803 atype = bpf_cgroup_atype_find(link->type, new_prog->aux->attach_btf_id); in __cgroup_bpf_replace()
809 if (link->link.prog->type != new_prog->type) in __cgroup_bpf_replace()
821 old_prog = xchg(&link->link.prog, new_prog); in __cgroup_bpf_replace()
827 static int cgroup_bpf_replace(struct bpf_link *link, struct bpf_prog *new_prog, in cgroup_bpf_replace() argument
845 ret = __cgroup_bpf_replace(cg_link->cgroup, cg_link, new_prog); in cgroup_bpf_replace()
Dsyscall.c5018 struct bpf_prog *old_prog = NULL, *new_prog; in link_update() local
5039 new_prog = bpf_prog_get(attr->link_update.new_prog_fd); in link_update()
5040 if (IS_ERR(new_prog)) { in link_update()
5041 ret = PTR_ERR(new_prog); in link_update()
5058 ret = link->ops->update_prog(link, new_prog, old_prog); in link_update()
5066 bpf_prog_put(new_prog); in link_update()
/Linux-v6.6/tools/testing/selftests/bpf/prog_tests/
Dxdp_metadata.c283 struct bpf_program *new_prog, *prog; in test_xdp_metadata() local
377 new_prog = bpf_object__find_program_by_name(bpf_obj2->obj, "freplace_rx"); in test_xdp_metadata()
378 bpf_program__set_attach_target(new_prog, bpf_program__fd(prog), "rx"); in test_xdp_metadata()
/Linux-v6.6/net/core/
Ddev.c9244 struct bpf_xdp_link *link, struct bpf_prog *new_prog, in dev_xdp_attach() argument
9258 if (link && (new_prog || old_prog)) in dev_xdp_attach()
9310 new_prog = link->link.prog; in dev_xdp_attach()
9312 if (new_prog) { in dev_xdp_attach()
9325 if (!offload && bpf_prog_is_offloaded(new_prog->aux)) { in dev_xdp_attach()
9329 if (bpf_prog_is_dev_bound(new_prog->aux) && !bpf_offload_dev_match(new_prog, dev)) { in dev_xdp_attach()
9333 if (new_prog->expected_attach_type == BPF_XDP_DEVMAP) { in dev_xdp_attach()
9337 if (new_prog->expected_attach_type == BPF_XDP_CPUMAP) { in dev_xdp_attach()
9344 if (new_prog != cur_prog) { in dev_xdp_attach()
9351 err = dev_xdp_install(dev, mode, bpf_op, extack, flags, new_prog); in dev_xdp_attach()
[all …]
Dfilter.c560 struct bpf_prog *new_prog, int *new_len, in bpf_convert_filter() argument
575 if (new_prog) { in bpf_convert_filter()
576 first_insn = new_prog->insnsi; in bpf_convert_filter()
588 if (new_prog) { in bpf_convert_filter()
824 if (new_prog && new_prog->aux->stack_depth < stack_off) in bpf_convert_filter()
825 new_prog->aux->stack_depth = stack_off; in bpf_convert_filter()
874 if (new_prog) in bpf_convert_filter()
880 if (!new_prog) { in bpf_convert_filter()
/Linux-v6.6/net/netfilter/
Dnf_bpf_link.c162 static int bpf_nf_link_update(struct bpf_link *link, struct bpf_prog *new_prog, in bpf_nf_link_update() argument
/Linux-v6.6/drivers/net/ethernet/qlogic/qede/
Dqede.h521 struct bpf_prog *new_prog; member
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-v6.6/include/linux/
Dbpf.h1516 int (*update_prog)(struct bpf_link *link, struct bpf_prog *new_prog,
2775 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog);
2830 static inline int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, in bpf_prog_dev_bound_inherit() argument