/kernel/linux/linux-5.10/net/core/ |
D | sock_reuseport.c | 330 struct bpf_prog *old_prog; in reuseport_attach_prog() local 345 old_prog = rcu_dereference_protected(reuse->prog, in reuseport_attach_prog() 350 sk_reuseport_prog_free(old_prog); in reuseport_attach_prog() 358 struct bpf_prog *old_prog; in reuseport_detach_prog() local 363 old_prog = NULL; in reuseport_detach_prog() 367 old_prog = rcu_replace_pointer(reuse->prog, old_prog, in reuseport_detach_prog() 371 if (!old_prog) in reuseport_detach_prog() 374 sk_reuseport_prog_free(old_prog); in reuseport_detach_prog()
|
D | dev.c | 9134 struct bpf_prog *old_prog, u32 flags) in dev_xdp_attach() argument 9145 if (link && (new_prog || old_prog)) in dev_xdp_attach() 9164 if (old_prog && !(flags & XDP_FLAGS_REPLACE)) { in dev_xdp_attach() 9182 if ((flags & XDP_FLAGS_REPLACE) && cur_prog != old_prog) { in dev_xdp_attach() 9327 struct bpf_prog *old_prog) in bpf_xdp_link_update() argument 9342 if (old_prog && link->prog != old_prog) { in bpf_xdp_link_update() 9346 old_prog = link->prog; in bpf_xdp_link_update() 9347 if (old_prog->type != new_prog->type || in bpf_xdp_link_update() 9348 old_prog->expected_attach_type != new_prog->expected_attach_type) { in bpf_xdp_link_update() 9353 if (old_prog == new_prog) { in bpf_xdp_link_update() [all …]
|
D | filter.c | 1240 struct sock_filter *old_prog; in bpf_migrate_filter() local 1257 old_prog = kmemdup(fp->insns, old_len * sizeof(struct sock_filter), in bpf_migrate_filter() 1259 if (!old_prog) { in bpf_migrate_filter() 1265 err = bpf_convert_filter(old_prog, old_len, NULL, &new_len, in bpf_migrate_filter() 1285 err = bpf_convert_filter(old_prog, old_len, fp, &new_len, in bpf_migrate_filter() 1299 kfree(old_prog); in bpf_migrate_filter() 1303 kfree(old_prog); in bpf_migrate_filter()
|
/kernel/linux/linux-5.10/drivers/net/hyperv/ |
D | netvsc_bpf.c | 98 struct bpf_prog *old_prog; in netvsc_xdp_set() local 101 old_prog = netvsc_xdp_get(nvdev); in netvsc_xdp_set() 103 if (!old_prog && !prog) in netvsc_xdp_set() 128 if (old_prog) in netvsc_xdp_set() 130 bpf_prog_put(old_prog); in netvsc_xdp_set()
|
/kernel/linux/linux-5.10/kernel/bpf/ |
D | cgroup.c | 440 struct bpf_prog *old_prog = NULL; in __cgroup_bpf_attach() local 480 old_prog = pl->prog; in __cgroup_bpf_attach() 499 if (old_prog) in __cgroup_bpf_attach() 500 bpf_prog_put(old_prog); in __cgroup_bpf_attach() 507 if (old_prog) { in __cgroup_bpf_attach() 508 pl->prog = old_prog; in __cgroup_bpf_attach() 512 if (!old_prog) { in __cgroup_bpf_attach() 578 struct bpf_prog *old_prog; in __cgroup_bpf_replace() local 594 old_prog = xchg(&link->link.prog, new_prog); in __cgroup_bpf_replace() 596 bpf_prog_put(old_prog); in __cgroup_bpf_replace() [all …]
|
D | net_namespace.c | 165 struct bpf_prog *old_prog) in bpf_netns_link_update_prog() argument 174 if (old_prog && old_prog != link->prog) in bpf_netns_link_update_prog() 195 old_prog = xchg(&link->prog, new_prog); in bpf_netns_link_update_prog() 196 bpf_prog_put(old_prog); in bpf_netns_link_update_prog()
|
D | bpf_iter.c | 368 struct bpf_prog *old_prog) in bpf_iter_link_replace() argument 373 if (old_prog && link->prog != old_prog) { in bpf_iter_link_replace() 385 old_prog = xchg(&link->prog, new_prog); in bpf_iter_link_replace() 386 bpf_prog_put(old_prog); in bpf_iter_link_replace()
|
D | syscall.c | 4120 struct bpf_prog *old_prog = NULL, *new_prog; in link_update() local 4143 old_prog = bpf_prog_get(attr->link_update.old_prog_fd); in link_update() 4144 if (IS_ERR(old_prog)) { in link_update() 4145 ret = PTR_ERR(old_prog); in link_update() 4146 old_prog = NULL; in link_update() 4155 ret = link->ops->update_prog(link, new_prog, old_prog); in link_update() 4160 if (old_prog) in link_update() 4161 bpf_prog_put(old_prog); in link_update()
|
D | core.c | 2007 struct bpf_prog *old_prog) in bpf_prog_array_delete_safe() argument 2012 if (item->prog == old_prog) { in bpf_prog_array_delete_safe()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/netronome/nfp/bpf/ |
D | offload.c | 576 bool old_prog, struct netlink_ext_ack *extack) in nfp_net_bpf_offload() argument 583 if (prog && old_prog) { in nfp_net_bpf_offload() 595 if (!old_prog && nn->dp.ctrl & NFP_NET_CFG_CTRL_BPF) in nfp_net_bpf_offload() 598 if (old_prog && !prog) in nfp_net_bpf_offload() 605 if (!old_prog) in nfp_net_bpf_offload()
|
D | main.h | 583 bool old_prog, struct netlink_ext_ack *extack);
|
/kernel/linux/linux-5.10/drivers/net/ |
D | veth.c | 1139 struct bpf_prog *old_prog; in veth_xdp_set() local 1144 old_prog = priv->_xdp_prog; in veth_xdp_set() 1178 if (!old_prog) { in veth_xdp_set() 1184 if (old_prog) { in veth_xdp_set() 1194 bpf_prog_put(old_prog); in veth_xdp_set() 1197 if ((!!old_prog ^ !!prog) && peer) in veth_xdp_set() 1202 priv->_xdp_prog = old_prog; in veth_xdp_set()
|
D | virtio_net.c | 2479 struct bpf_prog *old_prog; in virtnet_xdp_set() local 2515 old_prog = rtnl_dereference(vi->rq[0].xdp_prog); in virtnet_xdp_set() 2516 if (!prog && !old_prog) in virtnet_xdp_set() 2549 if (i == 0 && !old_prog) in virtnet_xdp_set() 2557 if (old_prog) in virtnet_xdp_set() 2558 bpf_prog_put(old_prog); in virtnet_xdp_set() 2572 rcu_assign_pointer(vi->rq[i].xdp_prog, old_prog); in virtnet_xdp_set() 2717 struct bpf_prog *old_prog; in _free_receive_bufs() local 2724 old_prog = rtnl_dereference(vi->rq[i].xdp_prog); in _free_receive_bufs() 2726 if (old_prog) in _free_receive_bufs() [all …]
|
D | xen-netfront.c | 1628 struct bpf_prog *old_prog; in xennet_xdp_set() local 1652 old_prog = rtnl_dereference(np->queues[0].xdp_prog); in xennet_xdp_set() 1660 if (old_prog) in xennet_xdp_set() 1662 bpf_prog_put(old_prog); in xennet_xdp_set()
|
D | tun.c | 1219 struct bpf_prog *old_prog; in tun_xdp_set() local 1222 old_prog = rtnl_dereference(tun->xdp_prog); in tun_xdp_set() 1224 if (old_prog) in tun_xdp_set() 1225 bpf_prog_put(old_prog); in tun_xdp_set()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/sfc/ |
D | efx.c | 623 struct bpf_prog *old_prog; in efx_xdp_setup_prog() local 638 old_prog = rtnl_dereference(efx->xdp_prog); in efx_xdp_setup_prog() 641 if (old_prog) in efx_xdp_setup_prog() 642 bpf_prog_put(old_prog); in efx_xdp_setup_prog()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx4/ |
D | en_rx.c | 435 struct bpf_prog *old_prog; in mlx4_en_destroy_rx_ring() local 437 old_prog = rcu_dereference_protected( in mlx4_en_destroy_rx_ring() 440 if (old_prog) in mlx4_en_destroy_rx_ring() 441 bpf_prog_put(old_prog); in mlx4_en_destroy_rx_ring()
|
D | en_netdev.c | 2728 struct bpf_prog *old_prog; in mlx4_xdp_set() local 2747 old_prog = rcu_dereference_protected( in mlx4_xdp_set() 2751 if (old_prog) in mlx4_xdp_set() 2752 bpf_prog_put(old_prog); in mlx4_xdp_set() 2796 old_prog = rcu_dereference_protected( in mlx4_xdp_set() 2800 if (old_prog) in mlx4_xdp_set() 2801 bpf_prog_put(old_prog); in mlx4_xdp_set()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/ |
D | en_main.c | 617 struct bpf_prog *old_prog = NULL; in mlx5e_free_rq() local 622 old_prog = rcu_dereference_protected(rq->xdp_prog, in mlx5e_free_rq() 624 if (old_prog) in mlx5e_free_rq() 625 bpf_prog_put(old_prog); in mlx5e_free_rq() 4503 struct bpf_prog *old_prog; in mlx5e_rq_replace_xdp_prog() local 4505 old_prog = rcu_replace_pointer(rq->xdp_prog, prog, in mlx5e_rq_replace_xdp_prog() 4507 if (old_prog) in mlx5e_rq_replace_xdp_prog() 4508 bpf_prog_put(old_prog); in mlx5e_rq_replace_xdp_prog() 4514 struct bpf_prog *old_prog; in mlx5e_xdp_set() local 4543 old_prog = priv->channels.params.xdp_prog; in mlx5e_xdp_set() [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/socionext/ |
D | netsec.c | 1789 struct bpf_prog *old_prog; in netsec_xdp_setup() local 1801 old_prog = xchg(&priv->xdp_prog, prog); in netsec_xdp_setup() 1802 if (old_prog) in netsec_xdp_setup() 1803 bpf_prog_put(old_prog); in netsec_xdp_setup()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/cavium/thunder/ |
D | nicvf_main.c | 1840 struct bpf_prog *old_prog; in nicvf_xdp_setup() local 1870 old_prog = xchg(&nic->xdp_prog, prog); in nicvf_xdp_setup() 1872 if (old_prog) in nicvf_xdp_setup() 1873 bpf_prog_put(old_prog); in nicvf_xdp_setup()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/intel/ixgbevf/ |
D | ixgbevf_main.c | 4448 struct bpf_prog *old_prog; in ixgbevf_xdp_setup() local 4458 old_prog = xchg(&adapter->xdp_prog, prog); in ixgbevf_xdp_setup() 4461 if (!!prog != !!old_prog) { in ixgbevf_xdp_setup() 4479 if (old_prog) in ixgbevf_xdp_setup() 4480 bpf_prog_put(old_prog); in ixgbevf_xdp_setup()
|
/kernel/linux/linux-5.10/include/linux/ |
D | bpf.h | 951 struct bpf_prog *old_prog); 1132 struct bpf_prog *old_prog);
|
/kernel/linux/linux-5.10/drivers/net/ethernet/marvell/ |
D | mvneta.c | 4416 struct bpf_prog *old_prog; in mvneta_xdp_setup() local 4433 old_prog = xchg(&pp->xdp_prog, prog); in mvneta_xdp_setup() 4434 if (old_prog) in mvneta_xdp_setup() 4435 bpf_prog_put(old_prog); in mvneta_xdp_setup()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/intel/ice/ |
D | ice_main.c | 2313 struct bpf_prog *old_prog; in ice_vsi_assign_bpf_prog() local 2316 old_prog = xchg(&vsi->xdp_prog, prog); in ice_vsi_assign_bpf_prog() 2317 if (old_prog) in ice_vsi_assign_bpf_prog() 2318 bpf_prog_put(old_prog); in ice_vsi_assign_bpf_prog()
|