Lines Matching refs:gso

1092 	struct virtio_net_hdr gso = { 0 };  in tun_get_user()  local
1115 n = copy_from_iter(&gso, sizeof(gso), from); in tun_get_user()
1116 if (n != sizeof(gso)) in tun_get_user()
1119 if ((gso.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) && in tun_get_user()
1120 …tun16_to_cpu(tun, gso.csum_start) + tun16_to_cpu(tun, gso.csum_offset) + 2 > tun16_to_cpu(tun, gso in tun_get_user()
1121gso.hdr_len = cpu_to_tun16(tun, tun16_to_cpu(tun, gso.csum_start) + tun16_to_cpu(tun, gso.csum_off… in tun_get_user()
1123 if (tun16_to_cpu(tun, gso.hdr_len) > len) in tun_get_user()
1125 iov_iter_advance(from, tun->vnet_hdr_sz - sizeof(gso)); in tun_get_user()
1131 (gso.hdr_len && tun16_to_cpu(tun, gso.hdr_len) < ETH_HLEN))) in tun_get_user()
1144 copylen = gso.hdr_len ? tun16_to_cpu(tun, gso.hdr_len) : GOODCOPY_LEN; in tun_get_user()
1155 if (tun16_to_cpu(tun, gso.hdr_len) > good_linear) in tun_get_user()
1158 linear = tun16_to_cpu(tun, gso.hdr_len); in tun_get_user()
1184 if (gso.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) { in tun_get_user()
1185 if (!skb_partial_csum_set(skb, tun16_to_cpu(tun, gso.csum_start), in tun_get_user()
1186 tun16_to_cpu(tun, gso.csum_offset))) { in tun_get_user()
1219 if (gso.gso_type != VIRTIO_NET_HDR_GSO_NONE) { in tun_get_user()
1221 switch (gso.gso_type & ~VIRTIO_NET_HDR_GSO_ECN) { in tun_get_user()
1237 if (gso.gso_type & VIRTIO_NET_HDR_GSO_ECN) in tun_get_user()
1240 skb_shinfo(skb)->gso_size = tun16_to_cpu(tun, gso.gso_size); in tun_get_user()
1323 struct virtio_net_hdr gso = { 0 }; /* no info leak */ in tun_put_user() local
1331 gso.hdr_len = cpu_to_tun16(tun, skb_headlen(skb)); in tun_put_user()
1332 gso.gso_size = cpu_to_tun16(tun, sinfo->gso_size); in tun_put_user()
1334 gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV4; in tun_put_user()
1336 gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV6; in tun_put_user()
1338 gso.gso_type = VIRTIO_NET_HDR_GSO_UDP; in tun_put_user()
1342 sinfo->gso_type, tun16_to_cpu(tun, gso.gso_size), in tun_put_user()
1343 tun16_to_cpu(tun, gso.hdr_len)); in tun_put_user()
1347 min((int)tun16_to_cpu(tun, gso.hdr_len), 64), true); in tun_put_user()
1352 gso.gso_type |= VIRTIO_NET_HDR_GSO_ECN; in tun_put_user()
1354 gso.gso_type = VIRTIO_NET_HDR_GSO_NONE; in tun_put_user()
1357 gso.flags = VIRTIO_NET_HDR_F_NEEDS_CSUM; in tun_put_user()
1358 gso.csum_start = cpu_to_tun16(tun, skb_checksum_start_offset(skb) + in tun_put_user()
1360 gso.csum_offset = cpu_to_tun16(tun, skb->csum_offset); in tun_put_user()
1362 gso.flags = VIRTIO_NET_HDR_F_DATA_VALID; in tun_put_user()
1365 if (copy_to_iter(&gso, sizeof(gso), iter) != sizeof(gso)) in tun_put_user()
1368 iov_iter_advance(iter, vnet_hdr_sz - sizeof(gso)); in tun_put_user()