Lines Matching refs:vnet_hdr
646 struct virtio_net_hdr vnet_hdr = { 0 }; in tap_get_user() local
663 if (!copy_from_iter_full(&vnet_hdr, sizeof(vnet_hdr), from)) in tap_get_user()
665 iov_iter_advance(from, vnet_hdr_len - sizeof(vnet_hdr)); in tap_get_user()
666 if ((vnet_hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) && in tap_get_user()
667 tap16_to_cpu(q, vnet_hdr.csum_start) + in tap_get_user()
668 tap16_to_cpu(q, vnet_hdr.csum_offset) + 2 > in tap_get_user()
669 tap16_to_cpu(q, vnet_hdr.hdr_len)) in tap_get_user()
670 vnet_hdr.hdr_len = cpu_to_tap16(q, in tap_get_user()
671 tap16_to_cpu(q, vnet_hdr.csum_start) + in tap_get_user()
672 tap16_to_cpu(q, vnet_hdr.csum_offset) + 2); in tap_get_user()
674 if (tap16_to_cpu(q, vnet_hdr.hdr_len) > len) in tap_get_user()
685 copylen = vnet_hdr.hdr_len ? in tap_get_user()
686 tap16_to_cpu(q, vnet_hdr.hdr_len) : GOODCOPY_LEN; in tap_get_user()
700 linear = tap16_to_cpu(q, vnet_hdr.hdr_len); in tap_get_user()
736 err = virtio_net_hdr_to_skb(skb, &vnet_hdr, in tap_get_user()
801 struct virtio_net_hdr vnet_hdr; in tap_put_user() local
807 if (virtio_net_hdr_from_skb(skb, &vnet_hdr, in tap_put_user()
812 if (copy_to_iter(&vnet_hdr, sizeof(vnet_hdr), iter) != in tap_put_user()
813 sizeof(vnet_hdr)) in tap_put_user()
816 iov_iter_advance(iter, vnet_hdr_len - sizeof(vnet_hdr)); in tap_put_user()