qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] virtio-net: fix offload ctrl endian


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH] virtio-net: fix offload ctrl endian
Date: Fri, 14 Jul 2017 17:26:44 +0300

On Fri, Jul 14, 2017 at 08:27:06PM +0800, Jason Wang wrote:
> Spec said offloads should be le64, so use virtio_ldq_p() to guarantee
> valid endian.
> 
> Fixes: 644c98587d4c ("virtio-net: dynamic network offloads configuration")
> Cc: address@hidden
> Cc: Dmitry Fleytman <address@hidden>
> Signed-off-by: Jason Wang <address@hidden>
> ---
>  hw/net/virtio-net.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index 657d099..eb8f5b6 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -757,6 +757,7 @@ static int virtio_net_handle_offloads(VirtIONet *n, 
> uint8_t cmd,
>  
>      if (cmd == VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET) {
>          uint64_t supported_offloads;

An empty line wouldn't hurt here.

> +        offloads = virtio_ldq_p(vdev, &offloads);
>  
>          if (!n->has_vnet_hdr) {
>              return VIRTIO_NET_ERR;
> -- 
> 2.7.4



reply via email to

[Prev in Thread] Current Thread [Next in Thread]