Home
last modified time | relevance | path

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

/linux/kernel/bpf/
H A Dfixups.c160 struct bpf_prog *new_prog, u32 off, u32 cnt) in adjust_insn_aux_data() argument
163 struct bpf_insn *insn = new_prog->insnsi; in adjust_insn_aux_data()
176 prog_len = new_prog->len; in adjust_insn_aux_data()
250 struct bpf_prog *new_prog; in bpf_patch_insn_data() local
264 new_prog = bpf_patch_insn_single(env->prog, off, patch, len); in bpf_patch_insn_data()
265 if (IS_ERR(new_prog)) { in bpf_patch_insn_data()
266 if (PTR_ERR(new_prog) == -ERANGE) in bpf_patch_insn_data()
272 adjust_insn_aux_data(env, new_prog, off, len); in bpf_patch_insn_data()
275 adjust_poke_descs(new_prog, off, len); in bpf_patch_insn_data()
276 return new_prog; in bpf_patch_insn_data()
592 struct bpf_prog *new_prog; bpf_opt_subreg_zext_lo32_rnd_hi32() local
698 struct bpf_prog *new_prog; bpf_convert_ctx_accesses() local
1473 struct bpf_prog *new_prog; bpf_do_misc_fixups() local
2419 struct bpf_prog *new_prog; inline_bpf_loop() local
2512 struct bpf_prog *new_prog; bpf_optimize_bpf_loop() local
[all...]
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 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 Dcgroup.c816 struct bpf_prog *new_prog = prog ? : link->link.prog; in __cgroup_bpf_attach()
836 atype = bpf_cgroup_atype_find(type, new_prog->aux->attach_btf_id); in __cgroup_bpf_attach()
890 err = bpf_trampoline_link_cgroup_shim(new_prog, atype, type); in __cgroup_bpf_attach()
912 bpf_trampoline_unlink_cgroup_shim(new_prog); in cgroup_bpf_attach()
1026 * @new_prog: &struct bpf_prog for the target BPF program with its refcnt in cgroup_bpf_replace()
1033 struct bpf_prog *new_prog) in cgroup_bpf_replace()
1041 atype = bpf_cgroup_atype_find(link->link.attach_type, new_prog->aux->attach_btf_id); in find_detach_entry()
1047 if (link->link.prog->type != new_prog->type) in find_detach_entry()
1060 old_prog = xchg(&link->link.prog, new_prog); in find_detach_entry()
1066 static int cgroup_bpf_replace(struct bpf_link *link, struct bpf_prog *new_prog,
795 struct bpf_prog *new_prog = prog ? : link->link.prog; __cgroup_bpf_attach() local
978 __cgroup_bpf_replace(struct cgroup * cgrp,struct bpf_cgroup_link * link,struct bpf_prog * new_prog) __cgroup_bpf_replace() argument
1011 cgroup_bpf_replace(struct bpf_link * link,struct bpf_prog * new_prog,struct bpf_prog * old_prog) cgroup_bpf_replace() argument
[all...]
H A Dsyscall.c5983 struct bpf_prog *old_prog = NULL, *new_prog; in bpf_link_get_curr_or_next()
6004 new_prog = bpf_prog_get(attr->link_update.new_prog_fd); in bpf_link_get_fd_by_id()
6005 if (IS_ERR(new_prog)) { in bpf_link_get_fd_by_id()
6006 ret = PTR_ERR(new_prog); in bpf_link_get_fd_by_id()
6023 ret = link->ops->update_prog(link, new_prog, old_prog);
6031 bpf_prog_put(new_prog); in bpf_enable_runtime_stats()
5864 struct bpf_prog *old_prog = NULL, *new_prog; link_update() local
/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.c10396 struct bpf_xdp_link *link, struct bpf_prog *new_prog, in dev_xdp_attach()
10410 if (link && (new_prog || old_prog)) in dev_xdp_attach()
10460 /* put effective new program into new_prog */ in dev_xdp_attach()
10462 new_prog = link->link.prog; in dev_xdp_attach()
10464 if (new_prog) { in dev_xdp_attach()
10477 if (!offload && bpf_prog_is_offloaded(new_prog->aux)) { in dev_xdp_attach()
10481 if (bpf_prog_is_dev_bound(new_prog->aux) && !bpf_offload_dev_match(new_prog, dev)) { in dev_xdp_attach()
10485 if (bpf_prog_is_dev_bound(new_prog->aux) && mode == XDP_MODE_SKB) { in dev_xdp_attach()
10489 if (new_prog in dev_xdp_attach()
10380 dev_xdp_attach(struct net_device * dev,struct netlink_ext_ack * extack,struct bpf_xdp_link * link,struct bpf_prog * new_prog,struct bpf_prog * old_prog,u32 flags) dev_xdp_attach() argument
10593 bpf_xdp_link_update(struct bpf_link * link,struct bpf_prog * new_prog,struct bpf_prog * old_prog) bpf_xdp_link_update() argument
10724 struct bpf_prog *new_prog = NULL, *old_prog = NULL; dev_change_xdp_fd() local
[all...]
H A Dfilter.c565 * @new_prog: allocated 'struct bpf_prog' or NULL
578 * bpf_convert_filter(old_prog, old_len, new_prog, &new_len, &seen_ld_abs)
581 struct bpf_prog *new_prog, int *new_len, in bpf_convert_filter() argument
596 if (new_prog) { in bpf_convert_filter()
597 first_insn = new_prog->insnsi; in bpf_convert_filter()
608 if (new_prog) { in bpf_convert_filter()
844 if (new_prog && new_prog->aux->stack_depth < stack_off) in bpf_convert_filter()
845 new_prog->aux->stack_depth = stack_off; in bpf_convert_filter()
894 if (new_prog) in bpf_convert_filter()
[all...]
/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.h1955 int (*update_prog)(struct bpf_link *link, struct bpf_prog *new_prog,
3631 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog);
3687 static inline int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog,
3500 bpf_prog_dev_bound_inherit(struct bpf_prog * new_prog,struct bpf_prog * old_prog) bpf_prog_dev_bound_inherit() argument