Searched refs:vnet_hdr (Results 1 – 3 of 3) sorted by relevance
/Linux-v5.4/drivers/net/ |
D | tap.c | 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() [all …]
|
/Linux-v5.4/net/packet/ |
D | af_packet.c | 2013 struct virtio_net_hdr vnet_hdr; in packet_rcv_vnet() local 2015 if (*len < sizeof(vnet_hdr)) in packet_rcv_vnet() 2017 *len -= sizeof(vnet_hdr); in packet_rcv_vnet() 2019 if (virtio_net_hdr_from_skb(skb, &vnet_hdr, vio_le(), true, 0)) in packet_rcv_vnet() 2022 return memcpy_to_msg(msg, (void *)&vnet_hdr, sizeof(vnet_hdr)); in packet_rcv_vnet() 2423 static int __packet_snd_vnet_parse(struct virtio_net_hdr *vnet_hdr, size_t len) in __packet_snd_vnet_parse() argument 2425 if ((vnet_hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) && in __packet_snd_vnet_parse() 2426 (__virtio16_to_cpu(vio_le(), vnet_hdr->csum_start) + in __packet_snd_vnet_parse() 2427 __virtio16_to_cpu(vio_le(), vnet_hdr->csum_offset) + 2 > in __packet_snd_vnet_parse() 2428 __virtio16_to_cpu(vio_le(), vnet_hdr->hdr_len))) in __packet_snd_vnet_parse() [all …]
|
/Linux-v5.4/samples/mic/mpssd/ |
D | mpssd.c | 528 static __u8 vnet_hdr[2][sizeof(struct virtio_net_hdr)]; in virtio_net() local 531 { { .iov_base = vnet_hdr[0], .iov_len = sizeof(vnet_hdr[0]) }, in virtio_net() 533 { { .iov_base = vnet_hdr[1], .iov_len = sizeof(vnet_hdr[1]) }, in virtio_net() 603 = (struct virtio_net_hdr *)vnet_hdr[0]; in virtio_net() 670 vnet_hdr[1]; in virtio_net()
|