Lines Matching refs:vnet_hdr
631 struct virtio_net_hdr vnet_hdr = { 0 }; in tap_get_user() local
647 if (!copy_from_iter_full(&vnet_hdr, sizeof(vnet_hdr), from)) in tap_get_user()
649 iov_iter_advance(from, vnet_hdr_len - sizeof(vnet_hdr)); in tap_get_user()
650 if ((vnet_hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) && in tap_get_user()
651 tap16_to_cpu(q, vnet_hdr.csum_start) + in tap_get_user()
652 tap16_to_cpu(q, vnet_hdr.csum_offset) + 2 > in tap_get_user()
653 tap16_to_cpu(q, vnet_hdr.hdr_len)) in tap_get_user()
654 vnet_hdr.hdr_len = cpu_to_tap16(q, in tap_get_user()
655 tap16_to_cpu(q, vnet_hdr.csum_start) + in tap_get_user()
656 tap16_to_cpu(q, vnet_hdr.csum_offset) + 2); in tap_get_user()
658 if (tap16_to_cpu(q, vnet_hdr.hdr_len) > len) in tap_get_user()
669 copylen = vnet_hdr.hdr_len ? in tap_get_user()
670 tap16_to_cpu(q, vnet_hdr.hdr_len) : GOODCOPY_LEN; in tap_get_user()
684 linear = tap16_to_cpu(q, vnet_hdr.hdr_len); in tap_get_user()
709 err = virtio_net_hdr_to_skb(skb, &vnet_hdr, in tap_get_user()
778 struct virtio_net_hdr vnet_hdr; in tap_put_user() local
784 if (virtio_net_hdr_from_skb(skb, &vnet_hdr, in tap_put_user()
789 if (copy_to_iter(&vnet_hdr, sizeof(vnet_hdr), iter) != in tap_put_user()
790 sizeof(vnet_hdr)) in tap_put_user()
793 iov_iter_advance(iter, vnet_hdr_len - sizeof(vnet_hdr)); in tap_put_user()