/linux-6.1.9/drivers/net/ethernet/microsoft/mana/ |
D | mana_bpf.c | 157 struct bpf_prog *old_prog = mana_chn_xdp_get(apc); in mana_chn_setxdp() local 163 if (old_prog == prog) in mana_chn_setxdp() 172 if (old_prog) in mana_chn_setxdp() 174 bpf_prog_put(old_prog); in mana_chn_setxdp() 181 struct bpf_prog *old_prog; in mana_xdp_set() local 184 old_prog = mana_xdp_get(apc); in mana_xdp_set() 186 if (!old_prog && !prog) in mana_xdp_set() 203 if (old_prog) in mana_xdp_set() 204 bpf_prog_put(old_prog); in mana_xdp_set()
|
/linux-6.1.9/drivers/net/ethernet/stmicro/stmmac/ |
D | stmmac_xdp.c | 106 struct bpf_prog *old_prog; in stmmac_xdp_set_prog() local 124 old_prog = xchg(&priv->xdp_prog, prog); in stmmac_xdp_set_prog() 125 if (old_prog) in stmmac_xdp_set_prog() 126 bpf_prog_put(old_prog); in stmmac_xdp_set_prog()
|
/linux-6.1.9/drivers/net/ethernet/intel/igc/ |
D | igc_xdp.c | 15 struct bpf_prog *old_prog; in igc_xdp_set_prog() local 28 old_prog = xchg(&adapter->xdp_prog, prog); in igc_xdp_set_prog() 29 if (old_prog) in igc_xdp_set_prog() 30 bpf_prog_put(old_prog); in igc_xdp_set_prog()
|
/linux-6.1.9/drivers/net/hyperv/ |
D | netvsc_bpf.c | 128 struct bpf_prog *old_prog; in netvsc_xdp_set() local 131 old_prog = netvsc_xdp_get(nvdev); in netvsc_xdp_set() 133 if (!old_prog && !prog) in netvsc_xdp_set() 158 if (old_prog) in netvsc_xdp_set() 160 bpf_prog_put(old_prog); in netvsc_xdp_set()
|
/linux-6.1.9/net/core/ |
D | sock_reuseport.c | 687 struct bpf_prog *old_prog; in reuseport_attach_prog() local 706 old_prog = rcu_dereference_protected(reuse->prog, in reuseport_attach_prog() 711 sk_reuseport_prog_free(old_prog); in reuseport_attach_prog() 719 struct bpf_prog *old_prog; in reuseport_detach_prog() local 721 old_prog = NULL; in reuseport_detach_prog() 739 old_prog = rcu_replace_pointer(reuse->prog, old_prog, in reuseport_detach_prog() 743 if (!old_prog) in reuseport_detach_prog() 746 sk_reuseport_prog_free(old_prog); in reuseport_detach_prog()
|
D | dev.c | 9159 struct bpf_prog *old_prog, u32 flags) in dev_xdp_attach() argument 9172 if (link && (new_prog || old_prog)) in dev_xdp_attach() 9191 if (old_prog && !(flags & XDP_FLAGS_REPLACE)) { in dev_xdp_attach() 9217 if ((flags & XDP_FLAGS_REPLACE) && cur_prog != old_prog) { in dev_xdp_attach() 9362 struct bpf_prog *old_prog) in bpf_xdp_link_update() argument 9377 if (old_prog && link->prog != old_prog) { in bpf_xdp_link_update() 9381 old_prog = link->prog; in bpf_xdp_link_update() 9382 if (old_prog->type != new_prog->type || in bpf_xdp_link_update() 9383 old_prog->expected_attach_type != new_prog->expected_attach_type) { in bpf_xdp_link_update() 9388 if (old_prog == new_prog) { in bpf_xdp_link_update() [all …]
|
/linux-6.1.9/drivers/net/ethernet/aquantia/atlantic/ |
D | aq_main.c | 449 struct bpf_prog *old_prog; in aq_xdp_setup() local 469 old_prog = xchg(&aq_nic->xdp_prog, prog); in aq_xdp_setup() 470 if (old_prog) in aq_xdp_setup() 471 bpf_prog_put(old_prog); in aq_xdp_setup() 473 if (!old_prog && prog) in aq_xdp_setup() 475 else if (old_prog && !prog) in aq_xdp_setup()
|
/linux-6.1.9/kernel/bpf/ |
D | cgroup.c | 613 struct bpf_prog *old_prog = NULL; in __cgroup_bpf_attach() local 662 old_prog = pl->prog; in __cgroup_bpf_attach() 697 if (old_prog) { in __cgroup_bpf_attach() 699 bpf_trampoline_unlink_cgroup_shim(old_prog); in __cgroup_bpf_attach() 700 bpf_prog_put(old_prog); in __cgroup_bpf_attach() 712 if (old_prog) { in __cgroup_bpf_attach() 713 pl->prog = old_prog; in __cgroup_bpf_attach() 717 if (!old_prog) { in __cgroup_bpf_attach() 797 struct bpf_prog *old_prog; in __cgroup_bpf_replace() local 820 old_prog = xchg(&link->link.prog, new_prog); in __cgroup_bpf_replace() [all …]
|
D | net_namespace.c | 166 struct bpf_prog *old_prog) in bpf_netns_link_update_prog() argument 175 if (old_prog && old_prog != link->prog) in bpf_netns_link_update_prog() 196 old_prog = xchg(&link->prog, new_prog); in bpf_netns_link_update_prog() 197 bpf_prog_put(old_prog); in bpf_netns_link_update_prog()
|
D | bpf_iter.c | 413 struct bpf_prog *old_prog) in bpf_iter_link_replace() argument 418 if (old_prog && link->prog != old_prog) { in bpf_iter_link_replace() 430 old_prog = xchg(&link->prog, new_prog); in bpf_iter_link_replace() 431 bpf_prog_put(old_prog); in bpf_iter_link_replace()
|
D | syscall.c | 4627 struct bpf_prog *old_prog = NULL, *new_prog; in link_update() local 4650 old_prog = bpf_prog_get(attr->link_update.old_prog_fd); in link_update() 4651 if (IS_ERR(old_prog)) { in link_update() 4652 ret = PTR_ERR(old_prog); in link_update() 4653 old_prog = NULL; in link_update() 4662 ret = link->ops->update_prog(link, new_prog, old_prog); in link_update() 4667 if (old_prog) in link_update() 4668 bpf_prog_put(old_prog); in link_update()
|
/linux-6.1.9/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);
|
/linux-6.1.9/drivers/net/ |
D | veth.c | 1516 struct bpf_prog *old_prog; in veth_xdp_set() local 1521 old_prog = priv->_xdp_prog; in veth_xdp_set() 1560 if (!old_prog) { in veth_xdp_set() 1566 if (old_prog) { in veth_xdp_set() 1576 bpf_prog_put(old_prog); in veth_xdp_set() 1579 if ((!!old_prog ^ !!prog) && peer) in veth_xdp_set() 1584 priv->_xdp_prog = old_prog; in veth_xdp_set()
|
D | virtio_net.c | 3081 struct bpf_prog *old_prog; in virtnet_xdp_set() local 3117 old_prog = rtnl_dereference(vi->rq[0].xdp_prog); in virtnet_xdp_set() 3118 if (!prog && !old_prog) in virtnet_xdp_set() 3151 if (i == 0 && !old_prog) in virtnet_xdp_set() 3159 if (old_prog) in virtnet_xdp_set() 3160 bpf_prog_put(old_prog); in virtnet_xdp_set() 3174 rcu_assign_pointer(vi->rq[i].xdp_prog, old_prog); in virtnet_xdp_set() 3345 struct bpf_prog *old_prog; in _free_receive_bufs() local 3352 old_prog = rtnl_dereference(vi->rq[i].xdp_prog); in _free_receive_bufs() 3354 if (old_prog) in _free_receive_bufs() [all …]
|
D | xen-netfront.c | 1622 struct bpf_prog *old_prog; in xennet_xdp_set() local 1646 old_prog = rtnl_dereference(np->queues[0].xdp_prog); in xennet_xdp_set() 1654 if (old_prog) in xennet_xdp_set() 1656 bpf_prog_put(old_prog); in xennet_xdp_set()
|
/linux-6.1.9/drivers/net/ethernet/sfc/siena/ |
D | efx.c | 617 struct bpf_prog *old_prog; in efx_xdp_setup_prog() local 632 old_prog = rtnl_dereference(efx->xdp_prog); in efx_xdp_setup_prog() 635 if (old_prog) in efx_xdp_setup_prog() 636 bpf_prog_put(old_prog); in efx_xdp_setup_prog()
|
/linux-6.1.9/drivers/net/ethernet/sfc/ |
D | efx.c | 619 struct bpf_prog *old_prog; in efx_xdp_setup_prog() local 634 old_prog = rtnl_dereference(efx->xdp_prog); in efx_xdp_setup_prog() 637 if (old_prog) in efx_xdp_setup_prog() 638 bpf_prog_put(old_prog); in efx_xdp_setup_prog()
|
/linux-6.1.9/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 | 2735 struct bpf_prog *old_prog; in mlx4_xdp_set() local 2754 old_prog = rcu_dereference_protected( in mlx4_xdp_set() 2758 if (old_prog) in mlx4_xdp_set() 2759 bpf_prog_put(old_prog); in mlx4_xdp_set() 2803 old_prog = rcu_dereference_protected( in mlx4_xdp_set() 2807 if (old_prog) in mlx4_xdp_set() 2808 bpf_prog_put(old_prog); in mlx4_xdp_set()
|
/linux-6.1.9/drivers/net/ethernet/mellanox/mlx5/core/ |
D | en_main.c | 879 struct bpf_prog *old_prog; in mlx5e_free_rq() local 883 old_prog = rcu_dereference_protected(rq->xdp_prog, in mlx5e_free_rq() 885 if (old_prog) in mlx5e_free_rq() 886 bpf_prog_put(old_prog); in mlx5e_free_rq() 4716 struct bpf_prog *old_prog; in mlx5e_rq_replace_xdp_prog() local 4718 old_prog = rcu_replace_pointer(rq->xdp_prog, prog, in mlx5e_rq_replace_xdp_prog() 4720 if (old_prog) in mlx5e_rq_replace_xdp_prog() 4721 bpf_prog_put(old_prog); in mlx5e_rq_replace_xdp_prog() 4728 struct bpf_prog *old_prog; in mlx5e_xdp_set() local 4760 old_prog = priv->channels.params.xdp_prog; in mlx5e_xdp_set() [all …]
|
/linux-6.1.9/drivers/net/ethernet/socionext/ |
D | netsec.c | 1795 struct bpf_prog *old_prog; in netsec_xdp_setup() local 1807 old_prog = xchg(&priv->xdp_prog, prog); in netsec_xdp_setup() 1808 if (old_prog) in netsec_xdp_setup() 1809 bpf_prog_put(old_prog); in netsec_xdp_setup()
|
/linux-6.1.9/drivers/net/ethernet/cavium/thunder/ |
D | nicvf_main.c | 1836 struct bpf_prog *old_prog; in nicvf_xdp_setup() local 1866 old_prog = xchg(&nic->xdp_prog, prog); in nicvf_xdp_setup() 1868 if (old_prog) in nicvf_xdp_setup() 1869 bpf_prog_put(old_prog); in nicvf_xdp_setup()
|
/linux-6.1.9/drivers/net/ethernet/fungible/funeth/ |
D | funeth_main.c | 1133 struct bpf_prog *old_prog, *prog = xdp->prog; in fun_xdp_setup() local 1164 old_prog = xchg(&fp->xdp_prog, prog); in fun_xdp_setup() 1165 if (old_prog) in fun_xdp_setup() 1166 bpf_prog_put(old_prog); in fun_xdp_setup()
|
/linux-6.1.9/drivers/net/ethernet/marvell/octeontx2/nic/ |
D | otx2_pf.c | 2494 struct bpf_prog *old_prog; in otx2_xdp_setup() local 2504 old_prog = xchg(&pf->xdp_prog, prog); in otx2_xdp_setup() 2506 if (old_prog) in otx2_xdp_setup() 2507 bpf_prog_put(old_prog); in otx2_xdp_setup()
|