Lines Matching refs:xdp_prog
208 struct bpf_prog __rcu *xdp_prog; member
828 if (rtnl_dereference(tun->xdp_prog)) in tun_attach()
1203 old_prog = rtnl_dereference(tun->xdp_prog); in tun_xdp_set()
1204 rcu_assign_pointer(tun->xdp_prog, prog); in tun_xdp_set()
1625 static int tun_xdp_act(struct tun_struct *tun, struct bpf_prog *xdp_prog, in tun_xdp_act() argument
1632 err = xdp_do_redirect(tun->dev, xdp, xdp_prog); in tun_xdp_act()
1644 bpf_warn_invalid_xdp_action(tun->dev, xdp_prog, act); in tun_xdp_act()
1647 trace_xdp_exception(tun->dev, xdp_prog, act); in tun_xdp_act()
1664 struct bpf_prog *xdp_prog; in tun_build_skb() local
1672 xdp_prog = rcu_dereference(tun->xdp_prog); in tun_build_skb()
1673 if (xdp_prog) in tun_build_skb()
1693 if (hdr->gso_type || !xdp_prog) { in tun_build_skb()
1703 xdp_prog = rcu_dereference(tun->xdp_prog); in tun_build_skb()
1704 if (xdp_prog) { in tun_build_skb()
1711 act = bpf_prog_run_xdp(xdp_prog, &xdp); in tun_build_skb()
1716 err = tun_xdp_act(tun, xdp_prog, &xdp, act); in tun_build_skb()
1917 struct bpf_prog *xdp_prog; in tun_get_user() local
1922 xdp_prog = rcu_dereference(tun->xdp_prog); in tun_get_user()
1923 if (xdp_prog) { in tun_get_user()
1924 ret = do_xdp_generic(xdp_prog, skb); in tun_get_user()
2444 struct bpf_prog *xdp_prog; in tun_xdp_one() local
2453 xdp_prog = rcu_dereference(tun->xdp_prog); in tun_xdp_one()
2454 if (xdp_prog) { in tun_xdp_one()
2463 act = bpf_prog_run_xdp(xdp_prog, xdp); in tun_xdp_one()
2464 ret = tun_xdp_act(tun, xdp_prog, xdp, act); in tun_xdp_one()
2514 ret = do_xdp_generic(xdp_prog, skb); in tun_xdp_one()