From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhGro-0008Fo-Cs for qemu-devel@nongnu.org; Tue, 28 May 2013 06:11:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhGrk-0003Hh-5s for qemu-devel@nongnu.org; Tue, 28 May 2013 06:10:56 -0400 Received: from mail-bk0-x230.google.com ([2a00:1450:4008:c01::230]:53095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhGrj-0003HW-Sa for qemu-devel@nongnu.org; Tue, 28 May 2013 06:10:52 -0400 Received: by mail-bk0-f48.google.com with SMTP id jf20so2637661bkc.21 for ; Tue, 28 May 2013 03:10:50 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20130527093409.GH21969@stefanha-thinkpad.redhat.com> References: <20130527093409.GH21969@stefanha-thinkpad.redhat.com> Date: Tue, 28 May 2013 12:10:50 +0200 Message-ID: From: Luke Gorrie Content-Type: multipart/alternative; boundary=001a11c37378d145d104ddc47a91 Subject: Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: "snabb-devel@googlegroups.com" , qemu-devel@nongnu.org, mst@redhat.com --001a11c37378d145d104ddc47a91 Content-Type: text/plain; charset=ISO-8859-1 On 27 May 2013 11:34, Stefan Hajnoczi wrote: > vhost_net is about connecting the a virtio-net speaking process to a > tun-like device. The problem you are trying to solve is connecting a > virtio-net speaking process to Snabb Switch. > Yep! > Either you need to replace vhost or you need a tun-like device > interface. > > Replacing vhost would mean that your switch implements virtio-net, > shares guest RAM with the guest, and shares the ioeventfd and irqfd > which are used to signal with the guest. This would be a great solution from my perspective. This is the design that I am now struggling to find a good implementation strategy for. > At that point your switch is similar to the virtio-net data plane work > that Ping Fan Liu is working > on but your switch is in a separate process rather than a thread. > Thanks for the reference! I was not aware of this work and it sounds highly relevant. How does your switch talk to hardware? If you have userspace NIC > drivers that bypass the Linux network stack then the approach I > mentioned fits well. > The switch talks to hardware using a built-in userspace ("kernel bypass") device driver. The switch runs in a single userspace process with realtime priority and polls for traffic. The design is similar to what Intel are now promoting with their Data Plane Development Kit. The only system call in the main traffic loop is to sleep for a microsecond or so when idle. The Intel 10G NIC driver is written in Lua btw, in case anybody is curious to check out something so exotic here's the link: https://github.com/SnabbCo/snabbswitch/blob/master/src/intel10g.lua --001a11c37378d145d104ddc47a91 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 27 May 2013 11:34, Stefan Ha= jnoczi <stefanha@redhat.com> wrote:
vhost_net is about connecting the a virtio-net speaking p= rocess to a
tun-like device. =A0The problem you are trying to solve is connecting a
virtio-net speaking process to Snabb Switch.

Yep!
=A0
Either you need to replace vhost or you need a tun-like device
interface.

Replacing vhost would mean that your switch implements virtio-net,
shares guest RAM with the guest, and shares the ioeventfd and irqfd
which are used to signal with the guest.

This would be a great solution from my perspective. This is the design = that I am now struggling to find a good implementation strategy for.
=A0
At that point your switch is=A0similar to th= e virtio-net data plane work that Ping Fan Liu is working
on but your switch is in a separate process rather than a thread.

Thanks for the reference! I was not aware = of this work and it sounds highly relevant.

How does your switch talk to hardware? =A0If you have user= space NIC
drivers that bypass the Linux network stack then the approach I
mentioned fits well.

The switch t= alks to hardware using a built-in userspace ("kernel bypass") dev= ice driver.

The switch runs in a singl= e userspace process with realtime priority and polls for traffic. The desig= n is similar to what Intel are now promoting with their Data Plane Developm= ent Kit. The only system call in the main traffic loop is to sleep for a mi= crosecond or so when idle.

The Intel 10G NIC driver is written in Lua btw, in case= anybody is curious to check out something so exotic here's the link:= =A0https://github.com/SnabbCo/snabbswitch/blob/master/src/intel10g.lua=


--001a11c37378d145d104ddc47a91--