Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752194AbbBWNZW (ORCPT ); Mon, 23 Feb 2015 08:25:22 -0500 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:34550 "EHLO e06smtp10.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751787AbbBWNZV convert rfc822-to-8bit (ORCPT ); Mon, 23 Feb 2015 08:25:21 -0500 Date: Mon, 23 Feb 2015 14:24:47 +0100 From: Greg Kurz To: "Michael S. Tsirkin" Cc: Cedric Le Goater , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH 0/3] vhost_net: support for cross endian guests Message-ID: <20150223142447.23b0572a@bahia.local> In-Reply-To: <20150222095351.GD17529@redhat.com> References: <20150220100724.18608.74654.stgit@bahia.local> <20150222095351.GD17529@redhat.com> Organization: IBM X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.24; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15022313-0041-0000-0000-00000356A725 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1750 Lines: 57 On Sun, 22 Feb 2015 10:53:51 +0100 "Michael S. Tsirkin" wrote: > On Fri, Feb 20, 2015 at 11:07:24AM +0100, Greg Kurz wrote: > > 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@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 the virtio-1 accessors (patch 2) > > > > Patch 3 is a separate fix: I think it is also valid for virtio-1. > > I don't think so. See e.g. this code in tun: > gso.csum_offset = cpu_to_tun16(tun, skb->csum_offset); > looks like it has the correct endian-ness for virtio-1. > > Indeed. I will fix tun/macvtap as you suggested. Thanks for the review. -- Greg > > > Please comment. > > > > --- > > > > Greg Kurz (3): > > vhost: add VHOST_VRING_F_LEGACY_BIG_ENDIAN flag > > vhost: add support for legacy virtio > > vhost_net: fix virtio_net header endianness > > > > > > drivers/vhost/net.c | 32 ++++++++++++++++++++++++++------ > > drivers/vhost/vhost.c | 6 +++++- > > drivers/vhost/vhost.h | 23 +++++++++++++++++------ > > include/uapi/linux/vhost.h | 2 ++ > > 4 files changed, 50 insertions(+), 13 deletions(-) > > > > -- > > Greg > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/