Home
last modified time | relevance | path

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

/linux/kernel/bpf/
H A Dnet_namespace.c164 struct bpf_prog *new_prog, in bpf_netns_link_update_prog() argument
176 if (new_prog->type != link->prog->type) in bpf_netns_link_update_prog()
191 ret = bpf_prog_array_update_at(run_array, idx, new_prog); in bpf_netns_link_update_prog()
195 old_prog = xchg(&link->prog, new_prog); in bpf_netns_link_update_prog()
H A Dverifier.c20703 struct bpf_prog *new_prog, u32 off, u32 cnt) in adjust_insn_aux_data() argument
20706 struct bpf_insn *insn = new_prog->insnsi; in adjust_insn_aux_data()
20719 prog_len = new_prog->len; in adjust_insn_aux_data()
20764 struct bpf_prog *new_prog; in bpf_patch_insn_data() local
20774 new_prog = bpf_patch_insn_single(env->prog, off, patch, len); in bpf_patch_insn_data()
20775 if (IS_ERR(new_prog)) { in bpf_patch_insn_data()
20776 if (PTR_ERR(new_prog) == -ERANGE) in bpf_patch_insn_data()
20783 adjust_insn_aux_data(env, new_data, new_prog, off, len); in bpf_patch_insn_data()
20785 adjust_poke_descs(new_prog, off, len); in bpf_patch_insn_data()
20786 return new_prog; in bpf_patch_insn_data()
[all …]
H A Dbpf_iter.c409 struct bpf_prog *new_prog, in bpf_iter_link_replace() argument
420 if (link->prog->type != new_prog->type || in bpf_iter_link_replace()
421 link->prog->expected_attach_type != new_prog->expected_attach_type || in bpf_iter_link_replace()
422 link->prog->aux->attach_btf_id != new_prog->aux->attach_btf_id) { in bpf_iter_link_replace()
427 old_prog = xchg(&link->prog, new_prog); in bpf_iter_link_replace()
H A Doffload.c271 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog) in bpf_prog_dev_bound_inherit() argument
281 new_prog->aux->dev_bound = old_prog->aux->dev_bound; in bpf_prog_dev_bound_inherit()
282 new_prog->aux->offload_requested = old_prog->aux->offload_requested; in bpf_prog_dev_bound_inherit()
290 err = __bpf_prog_dev_bound_init(new_prog, old_prog->aux->offload->netdev); in bpf_prog_dev_bound_inherit()
H A Dcgroup.c796 struct bpf_prog *new_prog = prog ? : link->link.prog; in __cgroup_bpf_attach() local
816 atype = bpf_cgroup_atype_find(type, new_prog->aux->attach_btf_id); in __cgroup_bpf_attach()
870 err = bpf_trampoline_link_cgroup_shim(new_prog, atype, type); in __cgroup_bpf_attach()
892 bpf_trampoline_unlink_cgroup_shim(new_prog); in __cgroup_bpf_attach()
979 struct bpf_prog *new_prog) in __cgroup_bpf_replace() argument
987 atype = bpf_cgroup_atype_find(link->link.attach_type, new_prog->aux->attach_btf_id); in __cgroup_bpf_replace()
993 if (link->link.prog->type != new_prog->type) in __cgroup_bpf_replace()
1006 old_prog = xchg(&link->link.prog, new_prog); in __cgroup_bpf_replace()
1012 static int cgroup_bpf_replace(struct bpf_link *link, struct bpf_prog *new_prog, in cgroup_bpf_replace() argument
1030 ret = __cgroup_bpf_replace(cg_link->cgroup, cg_link, new_prog); in cgroup_bpf_replace()
H A Dsyscall.c5661 struct bpf_prog *old_prog = NULL, *new_prog; in link_update() local
5682 new_prog = bpf_prog_get(attr->link_update.new_prog_fd); in link_update()
5683 if (IS_ERR(new_prog)) { in link_update()
5684 ret = PTR_ERR(new_prog); in link_update()
5701 ret = link->ops->update_prog(link, new_prog, old_prog); in link_update()
5709 bpf_prog_put(new_prog); in link_update()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dxdp_metadata.c353 struct bpf_program *new_prog, *prog; in test_xdp_metadata() local
416 new_prog = bpf_object__find_program_by_name(bpf_obj->obj, "redirect"); in test_xdp_metadata()
417 bpf_program__set_ifindex(new_prog, rx_ifindex); in test_xdp_metadata()
418 bpf_program__set_flags(new_prog, BPF_F_XDP_DEV_BOUND_ONLY); in test_xdp_metadata()
507 new_prog = bpf_object__find_program_by_name(bpf_obj2->obj, "freplace_rx"); in test_xdp_metadata()
508 bpf_program__set_attach_target(new_prog, bpf_program__fd(prog), "rx"); in test_xdp_metadata()
/linux/net/core/
H A Ddev.c10162 struct bpf_xdp_link *link, struct bpf_prog *new_prog, in dev_xdp_attach() argument
10176 if (link && (new_prog || old_prog)) in dev_xdp_attach()
10228 new_prog = link->link.prog; in dev_xdp_attach()
10230 if (new_prog) { in dev_xdp_attach()
10243 if (!offload && bpf_prog_is_offloaded(new_prog->aux)) { in dev_xdp_attach()
10247 if (bpf_prog_is_dev_bound(new_prog->aux) && !bpf_offload_dev_match(new_prog, dev)) { in dev_xdp_attach()
10251 if (bpf_prog_is_dev_bound(new_prog->aux) && mode == XDP_MODE_SKB) { in dev_xdp_attach()
10255 if (new_prog->expected_attach_type == BPF_XDP_DEVMAP) { in dev_xdp_attach()
10259 if (new_prog->expected_attach_type == BPF_XDP_CPUMAP) { in dev_xdp_attach()
10266 if (new_prog != cur_prog) { in dev_xdp_attach()
[all …]
H A Dfilter.c586 struct bpf_prog *new_prog, int *new_len, in bpf_convert_filter() argument
601 if (new_prog) { in bpf_convert_filter()
602 first_insn = new_prog->insnsi; in bpf_convert_filter()
614 if (new_prog) { in bpf_convert_filter()
850 if (new_prog && new_prog->aux->stack_depth < stack_off) in bpf_convert_filter()
851 new_prog->aux->stack_depth = stack_off; in bpf_convert_filter()
900 if (new_prog) in bpf_convert_filter()
906 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.c1022 old = xchg(&edev->xdp_prog, args->u.new_prog); in qede_xdp_reload_func()
1033 args.u.new_prog = prog; in qede_xdp_set()
/linux/include/linux/
H A Dbpf.h1774 int (*update_prog)(struct bpf_link *link, struct bpf_prog *new_prog,
3224 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog);
3280 static inline int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, in bpf_prog_dev_bound_inherit() argument