Lines Matching refs:prog
31 struct bpf_prog *prog; in netvsc_run_xdp() local
38 prog = rcu_dereference(nvchan->bpf_prog); in netvsc_run_xdp()
40 if (!prog) in netvsc_run_xdp()
61 act = bpf_prog_run_xdp(prog, xdp); in netvsc_run_xdp()
73 if (!xdp_do_redirect(ndev, xdp, prog)) { in netvsc_run_xdp()
95 trace_xdp_exception(ndev, prog, act); in netvsc_run_xdp()
99 bpf_warn_invalid_xdp_action(ndev, prog, act); in netvsc_run_xdp()
124 int netvsc_xdp_set(struct net_device *dev, struct bpf_prog *prog, in netvsc_xdp_set() argument
133 if (!old_prog && !prog) in netvsc_xdp_set()
137 if (prog && buf_max > PAGE_SIZE) { in netvsc_xdp_set()
145 if (prog && (dev->features & NETIF_F_LRO)) { in netvsc_xdp_set()
152 if (prog) in netvsc_xdp_set()
153 bpf_prog_add(prog, nvdev->num_chn - 1); in netvsc_xdp_set()
156 rcu_assign_pointer(nvdev->chan_table[i].bpf_prog, prog); in netvsc_xdp_set()
165 int netvsc_vf_setxdp(struct net_device *vf_netdev, struct bpf_prog *prog) in netvsc_vf_setxdp() argument
180 if (prog) in netvsc_vf_setxdp()
181 bpf_prog_inc(prog); in netvsc_vf_setxdp()
184 xdp.prog = prog; in netvsc_vf_setxdp()
188 if (ret && prog) in netvsc_vf_setxdp()
189 bpf_prog_put(prog); in netvsc_vf_setxdp()
208 ret = netvsc_xdp_set(dev, bpf->prog, extack, nvdev); in netvsc_bpf()
213 ret = netvsc_vf_setxdp(vf_netdev, bpf->prog); in netvsc_bpf()