Lines Matching refs:pi
1034 struct tun_pi pi = { 0, cpu_to_be16(ETH_P_IP) }; in tun_get_user() local
1047 if (len < sizeof(pi)) in tun_get_user()
1049 len -= sizeof(pi); in tun_get_user()
1051 n = copy_from_iter(&pi, sizeof(pi), from); in tun_get_user()
1052 if (n != sizeof(pi)) in tun_get_user()
1144 pi.proto = htons(ETH_P_IP); in tun_get_user()
1147 pi.proto = htons(ETH_P_IPV6); in tun_get_user()
1157 skb->protocol = pi.proto; in tun_get_user()
1240 struct tun_pi pi = { 0, skb->protocol }; in tun_put_user() local
1255 if (iov_iter_count(iter) < sizeof(pi)) in tun_put_user()
1258 total += sizeof(pi); in tun_put_user()
1261 pi.flags |= TUN_PKT_STRIP; in tun_put_user()
1264 if (copy_to_iter(&pi, sizeof(pi), iter) != sizeof(pi)) in tun_put_user()