On Thu, 07 Jan 2016 12:32:08 +0100 Greg Kurz <gk...@linux.vnet.ibm.com> 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 <gk...@linux.vnet.ibm.com> > --- > 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. > */ > >