From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NV0ze-0003M8-IU for qemu-devel@nongnu.org; Wed, 13 Jan 2010 06:02:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NV0zZ-0003KF-DN for qemu-devel@nongnu.org; Wed, 13 Jan 2010 06:02:29 -0500 Received: from [199.232.76.173] (port=35361 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV0zZ-0003Ju-1K for qemu-devel@nongnu.org; Wed, 13 Jan 2010 06:02:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63901) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NV0zY-0005oP-D9 for qemu-devel@nongnu.org; Wed, 13 Jan 2010 06:02:24 -0500 Date: Wed, 13 Jan 2010 12:59:27 +0200 From: "Michael S. Tsirkin" Message-ID: <20100113105927.GC5077@redhat.com> References: <20100111172217.GJ11936@redhat.com> <4B4CFA38.3070008@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B4CFA38.3070008@codemonkey.ws> Subject: [Qemu-devel] Re: [PATCH-RFC 09/13] tap: add vhost/vhostfd options List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On Tue, Jan 12, 2010 at 04:39:52PM -0600, Anthony Liguori wrote: > On 01/11/2010 11:22 AM, Michael S. Tsirkin wrote: >> Looks like order got mixed up: vhost_net header >> is added by a follow-up patch. Will be fixed >> in the next revision. >> >> Signed-off-by: Michael S. Tsirkin >> --- >> net.c | 8 ++++++++ >> net/tap.c | 29 +++++++++++++++++++++++++++++ >> qemu-options.hx | 4 +++- >> 3 files changed, 40 insertions(+), 1 deletions(-) >> >> diff --git a/net.c b/net.c >> index 6ef93e6..b942d03 100644 >> --- a/net.c >> +++ b/net.c >> @@ -976,6 +976,14 @@ static struct { >> .name = "vnet_hdr", >> .type = QEMU_OPT_BOOL, >> .help = "enable the IFF_VNET_HDR flag on the tap interface" >> + }, { >> + .name = "vhost", >> + .type = QEMU_OPT_BOOL, >> + .help = "enable vhost-net network accelerator", >> + }, { >> + .name = "vhostfd", >> + .type = QEMU_OPT_STRING, >> + .help = "file descriptor of an already opened vhost net device", >> }, >> > > Semantically, I think making vhost it's own backend makes more sense > from a user perspective. It doesn't. Users mostly do not care that vhost is used: they just get fast virtio and that's all. Users do care about e.g. tap because they need setup scripts, understand bridging etc. Do you propose -net tap be replaced with -net vhost? This means vhost will need to get tap flags if it is attached to tap and raw flags if attached to raw, etc. A separate backend that only works with virtio frontend is also ugly. OTOH an option that has effect only with virtio frontend is pretty usual, vnet_hdr is one such example. > > I don't think it's a significant code change. > > Regards, > > Anthony Liguori -- MST