Home
last modified time | relevance | path

Searched refs:vnet_hdr (Results 1 – 2 of 2) sorted by relevance

/linux/drivers/net/
H A Dtap.c646 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()
[all …]
/linux/net/packet/
H A Daf_packet.c2158 struct virtio_net_hdr_mrg_rxbuf vnet_hdr = { .num_buffers = 0 }; in packet_rcv_vnet() local
2164 if (virtio_net_hdr_from_skb(skb, (struct virtio_net_hdr *)&vnet_hdr, vio_le(), true, 0)) in packet_rcv_vnet()
2167 return memcpy_to_msg(msg, (void *)&vnet_hdr, vnet_hdr_sz); in packet_rcv_vnet()
2597 static int __packet_snd_vnet_parse(struct virtio_net_hdr *vnet_hdr, size_t len) in __packet_snd_vnet_parse() argument
2599 if ((vnet_hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) && in __packet_snd_vnet_parse()
2600 (__virtio16_to_cpu(vio_le(), vnet_hdr->csum_start) + in __packet_snd_vnet_parse()
2601 __virtio16_to_cpu(vio_le(), vnet_hdr->csum_offset) + 2 > in __packet_snd_vnet_parse()
2602 __virtio16_to_cpu(vio_le(), vnet_hdr->hdr_len))) in __packet_snd_vnet_parse()
2603 vnet_hdr->hdr_len = __cpu_to_virtio16(vio_le(), in __packet_snd_vnet_parse()
2604 __virtio16_to_cpu(vio_le(), vnet_hdr->csum_start) + in __packet_snd_vnet_parse()
[all …]