Lines Matching refs:old_prog
9436 struct bpf_prog *old_prog, u32 flags) in dev_xdp_attach() argument
9449 if (link && (new_prog || old_prog)) in dev_xdp_attach()
9468 if (old_prog && !(flags & XDP_FLAGS_REPLACE)) { in dev_xdp_attach()
9494 if ((flags & XDP_FLAGS_REPLACE) && cur_prog != old_prog) { in dev_xdp_attach()
9639 struct bpf_prog *old_prog) in bpf_xdp_link_update() argument
9654 if (old_prog && link->prog != old_prog) { in bpf_xdp_link_update()
9658 old_prog = link->prog; in bpf_xdp_link_update()
9659 if (old_prog == new_prog) { in bpf_xdp_link_update()
9672 old_prog = xchg(&link->prog, new_prog); in bpf_xdp_link_update()
9673 bpf_prog_put(old_prog); in bpf_xdp_link_update()
9756 struct bpf_prog *new_prog = NULL, *old_prog = NULL; in dev_change_xdp_fd() local
9769 old_prog = bpf_prog_get_type_dev(expected_fd, BPF_PROG_TYPE_XDP, in dev_change_xdp_fd()
9771 if (IS_ERR(old_prog)) { in dev_change_xdp_fd()
9772 err = PTR_ERR(old_prog); in dev_change_xdp_fd()
9773 old_prog = NULL; in dev_change_xdp_fd()
9778 err = dev_xdp_attach(dev, extack, NULL, new_prog, old_prog, flags); in dev_change_xdp_fd()
9783 if (old_prog) in dev_change_xdp_fd()
9784 bpf_prog_put(old_prog); in dev_change_xdp_fd()