Lines Matching refs:vnet_hdr
639 struct virtio_net_hdr vnet_hdr = { 0 }; in tap_get_user() local
656 if (!copy_from_iter_full(&vnet_hdr, sizeof(vnet_hdr), from)) in tap_get_user()
658 iov_iter_advance(from, vnet_hdr_len - sizeof(vnet_hdr)); in tap_get_user()
659 if ((vnet_hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) && in tap_get_user()
660 tap16_to_cpu(q, vnet_hdr.csum_start) + in tap_get_user()
661 tap16_to_cpu(q, vnet_hdr.csum_offset) + 2 > in tap_get_user()
662 tap16_to_cpu(q, vnet_hdr.hdr_len)) in tap_get_user()
663 vnet_hdr.hdr_len = cpu_to_tap16(q, in tap_get_user()
664 tap16_to_cpu(q, vnet_hdr.csum_start) + in tap_get_user()
665 tap16_to_cpu(q, vnet_hdr.csum_offset) + 2); in tap_get_user()
667 if (tap16_to_cpu(q, vnet_hdr.hdr_len) > len) in tap_get_user()
678 copylen = vnet_hdr.hdr_len ? in tap_get_user()
679 tap16_to_cpu(q, vnet_hdr.hdr_len) : GOODCOPY_LEN; in tap_get_user()
693 linear = tap16_to_cpu(q, vnet_hdr.hdr_len); in tap_get_user()
729 err = virtio_net_hdr_to_skb(skb, &vnet_hdr, in tap_get_user()
790 struct virtio_net_hdr vnet_hdr; in tap_put_user() local
796 if (virtio_net_hdr_from_skb(skb, &vnet_hdr, in tap_put_user()
801 if (copy_to_iter(&vnet_hdr, sizeof(vnet_hdr), iter) != in tap_put_user()
802 sizeof(vnet_hdr)) in tap_put_user()
805 iov_iter_advance(iter, vnet_hdr_len - sizeof(vnet_hdr)); in tap_put_user()