From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHU14-0005iy-V4 for qemu-devel@nongnu.org; Fri, 08 Jan 2016 05:11:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHU10-0001QW-MJ for qemu-devel@nongnu.org; Fri, 08 Jan 2016 05:11:30 -0500 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:36666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHU10-0001QQ-DV for qemu-devel@nongnu.org; Fri, 08 Jan 2016 05:11:26 -0500 Received: from localhost by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 8 Jan 2016 10:11:24 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 274D517D8056 for ; Fri, 8 Jan 2016 10:12:08 +0000 (GMT) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u08ABMwH8782314 for ; Fri, 8 Jan 2016 10:11:22 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u08ABLS9023875 for ; Fri, 8 Jan 2016 05:11:21 -0500 Date: Fri, 8 Jan 2016 11:11:20 +0100 From: Cornelia Huck Message-ID: <20160108111120.3429b210.cornelia.huck@de.ibm.com> In-Reply-To: <20160107113208.10897.13792.stgit@bahia.huguette.org> References: <20160107110747.10897.41118.stgit@bahia.huguette.org> <20160107113208.10897.13792.stgit@bahia.huguette.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/6] Revert "vhost-net: tell tap backend about the vnet endianness" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" On Thu, 07 Jan 2016 12:32:08 +0100 Greg Kurz wrote: > This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. > > Cross-endian is now configured by the core virtio-net code. We simply > fall back on full emulation if the net backend cannot support the > requested endianness for vnet headers. > > Signed-off-by: Greg Kurz > --- > hw/net/vhost_net.c | 33 +-------------------------------- > hw/net/virtio-net.c | 7 +++++++ > 2 files changed, 8 insertions(+), 32 deletions(-) > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c > index d4cc94ea5e55..5a0ab6ad5bb5 100644 > --- a/hw/net/virtio-net.c > +++ b/hw/net/virtio-net.c > @@ -128,6 +128,13 @@ static void virtio_net_vhost_status(VirtIONet *n, uint8_t status) > if (!n->vhost_started) { > int r, i; > > + if (n->needs_vnet_hdr_swap) { > + error_report("backend does not support %s vnet headers." s/./;/ > + "falling back on userspace virtio", s/on/to/ ? > + virtio_is_big_endian(vdev) ? "BE" : "LE"); > + return; > + } > + > /* Any packets outstanding? Purge them to avoid touching rings > * when vhost is running. > */ > >