search for: fix_virtio_net_hdr

Displaying 4 results from an estimated 4 matches for "fix_virtio_net_hdr".

2015 Feb 20
0
[PATCH 3/3] vhost_net: fix virtio_net header endianness
...tions(+), 6 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index afa06d2..2923eee 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -288,6 +288,16 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) rcu_read_unlock_bh(); } +static void fix_virtio_net_hdr(struct vhost_virtqueue *vq) +{ + struct virtio_net_hdr *hdr = vq->iov[0].iov_base; + + hdr->hdr_len = vhost16_to_cpu(vq, hdr->hdr_len); + hdr->gso_size = vhost16_to_cpu(vq, hdr->gso_size); + hdr->csum_start = vhost16_to_cpu(vq, hdr->csum_start); + hdr->csum_offset = vhost16...
2015 Feb 20
0
[PATCH 3/3] vhost_net: fix virtio_net header endianness
...tions(+), 6 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index afa06d2..2923eee 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -288,6 +288,16 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) rcu_read_unlock_bh(); } +static void fix_virtio_net_hdr(struct vhost_virtqueue *vq) +{ + struct virtio_net_hdr *hdr = vq->iov[0].iov_base; + + hdr->hdr_len = vhost16_to_cpu(vq, hdr->hdr_len); + hdr->gso_size = vhost16_to_cpu(vq, hdr->gso_size); + hdr->csum_start = vhost16_to_cpu(vq, hdr->csum_start); + hdr->csum_offset = vhost16...
2015 Feb 20
8
[PATCH 0/3] vhost_net: support for cross endian guests
Hi, This patchset allows vhost_net to be used with legacy virtio when guest and host have a different endianness. It is based on previous work by C?dric Le Goater: https://www.mail-archive.com/kvm-ppc at vger.kernel.org/msg09848.html As suggested by MST: - the API now asks for a specific format (big endian) instead of the hint whether byteswap is needed or not (patch 1) - rebased on top of
2015 Feb 20
8
[PATCH 0/3] vhost_net: support for cross endian guests
Hi, This patchset allows vhost_net to be used with legacy virtio when guest and host have a different endianness. It is based on previous work by C?dric Le Goater: https://www.mail-archive.com/kvm-ppc at vger.kernel.org/msg09848.html As suggested by MST: - the API now asks for a specific format (big endian) instead of the hint whether byteswap is needed or not (patch 1) - rebased on top of