Received: from eggs.gnu.org ([2001:4830:134:3::10]:47602) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX2Kg-0000uj-FD for qemu-devel@nongnu.org; Mon, 17 Jul 2017 05:28:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dX2Kb-0003E9-Hh for qemu-devel@nongnu.org; Mon, 17 Jul 2017 05:28:50 -0400 References: <1500035226-6530-1-git-send-email-jasowang@redhat.com> <20170714172631-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: Date: Mon, 17 Jul 2017 17:28:35 +0800 MIME-Version: 1.0 In-Reply-To: <20170714172631-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] virtio-net: fix offload ctrl endian List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, qemu-stable@nongnu.org, Dmitry Fleytman On 2017=E5=B9=B407=E6=9C=8814=E6=97=A5 22:26, Michael S. Tsirkin wrote: > 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 configurati= on") >> Cc: qemu-stable@nongnu.org >> Cc: Dmitry Fleytman >> Signed-off-by: Jason Wang >> --- >> 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, >> =20 >> if (cmd =3D=3D VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET) { >> uint64_t supported_offloads; > An empty line wouldn't hurt here. I apply this patch by adding a new line here. Thanks > >> + offloads =3D virtio_ldq_p(vdev, &offloads); >> =20 >> if (!n->has_vnet_hdr) { >> return VIRTIO_NET_ERR; >> --=20 >> 2.7.4