Lines Matching refs:xdp_prog
219 struct bpf_prog __rcu *xdp_prog; member
840 if (rtnl_dereference(tun->xdp_prog)) in tun_attach()
1222 old_prog = rtnl_dereference(tun->xdp_prog); in tun_xdp_set()
1223 rcu_assign_pointer(tun->xdp_prog, prog); in tun_xdp_set()
1633 static int tun_xdp_act(struct tun_struct *tun, struct bpf_prog *xdp_prog, in tun_xdp_act() argument
1640 err = xdp_do_redirect(tun->dev, xdp, xdp_prog); in tun_xdp_act()
1655 trace_xdp_exception(tun->dev, xdp_prog, act); in tun_xdp_act()
1672 struct bpf_prog *xdp_prog; in tun_build_skb() local
1680 xdp_prog = rcu_dereference(tun->xdp_prog); in tun_build_skb()
1681 if (xdp_prog) in tun_build_skb()
1701 if (hdr->gso_type || !xdp_prog) { in tun_build_skb()
1711 xdp_prog = rcu_dereference(tun->xdp_prog); in tun_build_skb()
1712 if (xdp_prog) { in tun_build_skb()
1723 act = bpf_prog_run_xdp(xdp_prog, &xdp); in tun_build_skb()
1728 err = tun_xdp_act(tun, xdp_prog, &xdp, act); in tun_build_skb()
1945 struct bpf_prog *xdp_prog; in tun_get_user() local
1950 xdp_prog = rcu_dereference(tun->xdp_prog); in tun_get_user()
1951 if (xdp_prog) { in tun_get_user()
1952 ret = do_xdp_generic(xdp_prog, skb); in tun_get_user()
2464 struct bpf_prog *xdp_prog; in tun_xdp_one() local
2472 xdp_prog = rcu_dereference(tun->xdp_prog); in tun_xdp_one()
2473 if (xdp_prog) { in tun_xdp_one()
2482 act = bpf_prog_run_xdp(xdp_prog, xdp); in tun_xdp_one()
2483 err = tun_xdp_act(tun, xdp_prog, xdp, act); in tun_xdp_one()
2533 err = do_xdp_generic(xdp_prog, skb); in tun_xdp_one()