Lines Matching refs:xdp_prog
208 struct bpf_prog __rcu *xdp_prog; member
810 if (rtnl_dereference(tun->xdp_prog)) in tun_attach()
1119 old_prog = rtnl_dereference(tun->xdp_prog); in tun_xdp_set()
1120 rcu_assign_pointer(tun->xdp_prog, prog); in tun_xdp_set()
1530 static int tun_xdp_act(struct tun_struct *tun, struct bpf_prog *xdp_prog, in tun_xdp_act() argument
1537 err = xdp_do_redirect(tun->dev, xdp, xdp_prog); in tun_xdp_act()
1552 trace_xdp_exception(tun->dev, xdp_prog, act); in tun_xdp_act()
1569 struct bpf_prog *xdp_prog; in tun_build_skb() local
1577 xdp_prog = rcu_dereference(tun->xdp_prog); in tun_build_skb()
1578 if (xdp_prog) in tun_build_skb()
1598 if (hdr->gso_type || !xdp_prog) { in tun_build_skb()
1608 xdp_prog = rcu_dereference(tun->xdp_prog); in tun_build_skb()
1609 if (xdp_prog) { in tun_build_skb()
1616 act = bpf_prog_run_xdp(xdp_prog, &xdp); in tun_build_skb()
1621 err = tun_xdp_act(tun, xdp_prog, &xdp, act); in tun_build_skb()
1835 struct bpf_prog *xdp_prog; in tun_get_user() local
1840 xdp_prog = rcu_dereference(tun->xdp_prog); in tun_get_user()
1841 if (xdp_prog) { in tun_get_user()
1842 ret = do_xdp_generic(xdp_prog, skb); in tun_get_user()
2338 struct bpf_prog *xdp_prog; in tun_xdp_one() local
2346 xdp_prog = rcu_dereference(tun->xdp_prog); in tun_xdp_one()
2347 if (xdp_prog) { in tun_xdp_one()
2356 act = bpf_prog_run_xdp(xdp_prog, xdp); in tun_xdp_one()
2357 err = tun_xdp_act(tun, xdp_prog, xdp, act); in tun_xdp_one()
2407 err = do_xdp_generic(xdp_prog, skb); in tun_xdp_one()