Lines Matching refs:vnet_hdr
2158 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()
2603 static int __packet_snd_vnet_parse(struct virtio_net_hdr *vnet_hdr, size_t len) in __packet_snd_vnet_parse() argument
2605 if ((vnet_hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) && in __packet_snd_vnet_parse()
2606 (__virtio16_to_cpu(vio_le(), vnet_hdr->csum_start) + in __packet_snd_vnet_parse()
2607 __virtio16_to_cpu(vio_le(), vnet_hdr->csum_offset) + 2 > in __packet_snd_vnet_parse()
2608 __virtio16_to_cpu(vio_le(), vnet_hdr->hdr_len))) in __packet_snd_vnet_parse()
2609 vnet_hdr->hdr_len = __cpu_to_virtio16(vio_le(), in __packet_snd_vnet_parse()
2610 __virtio16_to_cpu(vio_le(), vnet_hdr->csum_start) + in __packet_snd_vnet_parse()
2611 __virtio16_to_cpu(vio_le(), vnet_hdr->csum_offset) + 2); in __packet_snd_vnet_parse()
2613 if (__virtio16_to_cpu(vio_le(), vnet_hdr->hdr_len) > len) in __packet_snd_vnet_parse()
2620 struct virtio_net_hdr *vnet_hdr, int vnet_hdr_sz) in packet_snd_vnet_parse() argument
2628 if (!copy_from_iter_full(vnet_hdr, sizeof(*vnet_hdr), &msg->msg_iter)) in packet_snd_vnet_parse()
2631 ret = __packet_snd_vnet_parse(vnet_hdr, *len); in packet_snd_vnet_parse()
2794 struct virtio_net_hdr *vnet_hdr = NULL; in tpacket_snd() local
2889 vnet_hdr = data; in tpacket_snd()
2893 __packet_snd_vnet_parse(vnet_hdr, tp_len)) { in tpacket_snd()
2898 vnet_hdr->hdr_len); in tpacket_snd()
2936 if (virtio_net_hdr_to_skb(skb, vnet_hdr, vio_le())) { in tpacket_snd()
2940 virtio_net_hdr_set_proto(skb, vnet_hdr); in tpacket_snd()
3024 struct virtio_net_hdr vnet_hdr = { 0 }; in packet_snd() local
3072 err = packet_snd_vnet_parse(msg, &len, &vnet_hdr, vnet_hdr_sz); in packet_snd()
3086 if (!vnet_hdr.gso_type && in packet_snd()
3093 linear = __virtio16_to_cpu(vio_le(), vnet_hdr.hdr_len); in packet_snd()
3127 if (!vnet_hdr.gso_type && (len > dev->mtu + reserve + extra_len) && in packet_snd()
3145 err = virtio_net_hdr_to_skb(skb, &vnet_hdr, vio_le()); in packet_snd()
3149 virtio_net_hdr_set_proto(skb, &vnet_hdr); in packet_snd()