Lines Matching defs:vnet_hdr
2097 struct virtio_net_hdr_mrg_rxbuf vnet_hdr = { .num_buffers = 0 };
2103 if (virtio_net_hdr_from_skb(skb, (struct virtio_net_hdr *)&vnet_hdr, vio_le(), true, 0))
2106 return memcpy_to_msg(msg, (void *)&vnet_hdr, vnet_hdr_sz);
2538 static int __packet_snd_vnet_parse(struct virtio_net_hdr *vnet_hdr, size_t len)
2540 if ((vnet_hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) &&
2541 (__virtio16_to_cpu(vio_le(), vnet_hdr->csum_start) +
2542 __virtio16_to_cpu(vio_le(), vnet_hdr->csum_offset) + 2 >
2543 __virtio16_to_cpu(vio_le(), vnet_hdr->hdr_len)))
2544 vnet_hdr->hdr_len = __cpu_to_virtio16(vio_le(),
2545 __virtio16_to_cpu(vio_le(), vnet_hdr->csum_start) +
2546 __virtio16_to_cpu(vio_le(), vnet_hdr->csum_offset) + 2);
2548 if (__virtio16_to_cpu(vio_le(), vnet_hdr->hdr_len) > len)
2555 struct virtio_net_hdr *vnet_hdr, int vnet_hdr_sz)
2563 if (!copy_from_iter_full(vnet_hdr, sizeof(*vnet_hdr), &msg->msg_iter))
2566 ret = __packet_snd_vnet_parse(vnet_hdr, *len);
2729 struct virtio_net_hdr *vnet_hdr = NULL;
2824 vnet_hdr = data;
2828 __packet_snd_vnet_parse(vnet_hdr, tp_len)) {
2833 vnet_hdr->hdr_len);
2871 if (virtio_net_hdr_to_skb(skb, vnet_hdr, vio_le())) {
2875 virtio_net_hdr_set_proto(skb, vnet_hdr);
2959 struct virtio_net_hdr vnet_hdr = { 0 };
3007 err = packet_snd_vnet_parse(msg, &len, &vnet_hdr, vnet_hdr_sz);
3021 if (!vnet_hdr.gso_type &&
3028 linear = __virtio16_to_cpu(vio_le(), vnet_hdr.hdr_len);
3062 if (!vnet_hdr.gso_type && (len > dev->mtu + reserve + extra_len) &&
3080 err = virtio_net_hdr_to_skb(skb, &vnet_hdr, vio_le());
3084 virtio_net_hdr_set_proto(skb, &vnet_hdr);