Lines Matching refs:gso

1038 	struct virtio_net_hdr gso = { 0 };  in tun_get_user()  local
1061 n = copy_from_iter(&gso, sizeof(gso), from); in tun_get_user()
1062 if (n != sizeof(gso)) in tun_get_user()
1065 if ((gso.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) && in tun_get_user()
1066 …tun16_to_cpu(tun, gso.csum_start) + tun16_to_cpu(tun, gso.csum_offset) + 2 > tun16_to_cpu(tun, gso in tun_get_user()
1067gso.hdr_len = cpu_to_tun16(tun, tun16_to_cpu(tun, gso.csum_start) + tun16_to_cpu(tun, gso.csum_off… in tun_get_user()
1069 if (tun16_to_cpu(tun, gso.hdr_len) > len) in tun_get_user()
1071 iov_iter_advance(from, tun->vnet_hdr_sz - sizeof(gso)); in tun_get_user()
1077 (gso.hdr_len && tun16_to_cpu(tun, gso.hdr_len) < ETH_HLEN))) in tun_get_user()
1090 copylen = gso.hdr_len ? tun16_to_cpu(tun, gso.hdr_len) : GOODCOPY_LEN; in tun_get_user()
1101 if (tun16_to_cpu(tun, gso.hdr_len) > good_linear) in tun_get_user()
1104 linear = tun16_to_cpu(tun, gso.hdr_len); in tun_get_user()
1130 if (gso.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) { in tun_get_user()
1131 if (!skb_partial_csum_set(skb, tun16_to_cpu(tun, gso.csum_start), in tun_get_user()
1132 tun16_to_cpu(tun, gso.csum_offset))) { in tun_get_user()
1165 if (gso.gso_type != VIRTIO_NET_HDR_GSO_NONE) { in tun_get_user()
1167 switch (gso.gso_type & ~VIRTIO_NET_HDR_GSO_ECN) { in tun_get_user()
1183 if (gso.gso_type & VIRTIO_NET_HDR_GSO_ECN) in tun_get_user()
1186 skb_shinfo(skb)->gso_size = tun16_to_cpu(tun, gso.gso_size); in tun_get_user()
1269 struct virtio_net_hdr gso = { 0 }; /* no info leak */ in tun_put_user() local
1277 gso.hdr_len = cpu_to_tun16(tun, skb_headlen(skb)); in tun_put_user()
1278 gso.gso_size = cpu_to_tun16(tun, sinfo->gso_size); in tun_put_user()
1280 gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV4; in tun_put_user()
1282 gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV6; in tun_put_user()
1284 gso.gso_type = VIRTIO_NET_HDR_GSO_UDP; in tun_put_user()
1288 sinfo->gso_type, tun16_to_cpu(tun, gso.gso_size), in tun_put_user()
1289 tun16_to_cpu(tun, gso.hdr_len)); in tun_put_user()
1293 min((int)tun16_to_cpu(tun, gso.hdr_len), 64), true); in tun_put_user()
1298 gso.gso_type |= VIRTIO_NET_HDR_GSO_ECN; in tun_put_user()
1300 gso.gso_type = VIRTIO_NET_HDR_GSO_NONE; in tun_put_user()
1303 gso.flags = VIRTIO_NET_HDR_F_NEEDS_CSUM; in tun_put_user()
1304 gso.csum_start = cpu_to_tun16(tun, skb_checksum_start_offset(skb) + in tun_put_user()
1306 gso.csum_offset = cpu_to_tun16(tun, skb->csum_offset); in tun_put_user()
1308 gso.flags = VIRTIO_NET_HDR_F_DATA_VALID; in tun_put_user()
1311 if (copy_to_iter(&gso, sizeof(gso), iter) != sizeof(gso)) in tun_put_user()
1314 iov_iter_advance(iter, vnet_hdr_sz - sizeof(gso)); in tun_put_user()