From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vinu7-0005Ux-Cr for qemu-devel@nongnu.org; Tue, 19 Nov 2013 11:12:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vinu0-0000Qm-B0 for qemu-devel@nongnu.org; Tue, 19 Nov 2013 11:11:55 -0500 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:46401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vinu0-0000Qi-4V for qemu-devel@nongnu.org; Tue, 19 Nov 2013 11:11:48 -0500 Received: by mail-wi0-f177.google.com with SMTP id hq4so5690063wib.10 for ; Tue, 19 Nov 2013 08:11:47 -0800 (PST) Date: Tue, 19 Nov 2013 17:11:44 +0100 From: Stefan Hajnoczi Message-ID: <20131119161144.GA1115@stefanha-thinkpad.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [RFC] Architecture to connect a userspace ethernet switch to QEMU guests via Virtio List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Antonios Motakis Cc: Luke Gorrie , Daniel Raho , qemu-devel qemu-devel On Tue, Nov 19, 2013 at 11:17:40AM +0100, Antonios Motakis wrote: > There have been discussions before on these lists on the topic of > connecting a QEMU guest running a virtio_net driver, with an external > userspace ethernet switch (Snabbswitch in particular). The essential > requirement in this is to put the virtio backend in the external > userspace process. > > The preferred direction should be similar to vhost, with the main > difference of the control mechanism being a unix domain socket instead > of an ioctl interface, and of course placing the backend in an > userspace process instead the kernel. > > Since we are pursuing this direction,we would like to share a more > detailed description of the architecture we are working on. Any > feedback is most welcome. It is available here: > http://www.virtualopensystems.com/media/snabbswitch/rfc_snabbswitch_qemu.pdf It sounds like you are proposing an interprocess virtio device interface. QEMU's virtio-pci emulation calls into a new vapp virtio device inside QEMU, which then forwards virtio device calls to the vapp process. This is pretty different from vhost. vhost only puts rx/tx handling in the kernel. Other functionality is handled by plain old QEMU virtio device emulation (e.g. virtio-net ctrl virtqueue). In the past device plugin interfaces have been rejected by the community because they can lead to lower code quality (out-of-tree devices) and an avenue to bypass the software license. So what's the alternative? Reuse as much of the vhost approach as possible and define a userspace network I/O interface instead of a device plugin interface. Stefan