All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O
@ 2013-05-26  9:32 Luke Gorrie
  2013-05-27  9:34 ` Stefan Hajnoczi
  0 siblings, 1 reply; 49+ messages in thread
From: Luke Gorrie @ 2013-05-26  9:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: snabb-devel, stefanha, mst

[-- Attachment #1: Type: text/plain, Size: 2119 bytes --]

Dear qemu-devel hackers,

I am writing to ask for some technical advice. I am making embarrassingly
slow progress on finding a good way to integrate the Snabb Switch
user-space ethernet switch (http://snabb.co/snabbswitch/) with QEMU for
efficient ethernet I/O.

Stefan put us onto the highly promising track of vhost/virtio. We have
implemented this between Snabb Switch and the Linux kernel, but not
directly between Snabb Switch and QEMU guests. The "roadblock" we have hit
is embarrasingly basic: QEMU is using user-to-kernel system calls to setup
vhost (open /dev/net/tun and /dev/vhost-net, ioctl()s) and I haven't found
a good way to map these towards Snabb Switch instead of the kernel.

We have several ideas on the table and we would love some technical
feedback on what sounds like a good way forward -- ideally a better
alternative that we haven't thought of at all, not being QEMU gurus
ourselves.

Here are the ideas on the table right now:

1. Use FUSE to implement a complete clone of /dev/net/tun and
/dev/vhost-net inside Snabb Switch. Implement every ioctl() that QEMU
requires.

2. Extend QEMU to support a user-user IPC mode of vhost. In this mode QEMU
would not use ioctl() etc but some other system calls that are appropriate
for IPC between user-space processes.

3. Use the kernel as a middle-man. Create a double-ended "veth" interface
and have Snabb Switch and QEMU each open a PF_PACKET socket and accelerate
it with VHOST_NET.

#1 is appealing _if_ it can really be done. Risk is that we hit a
road-block when implementing the behavior of the ioctl()s, for example have
trouble mapping guest memory or getting hold of an eventfd, and that FUSE
is kinda heavy-weight.

#2 is appealing _if_ it can be done in a nice way. I don't know which
system calls would be appropriate and I don't know how to write the code
inside QEMU in a neat way.

#3 is appealing _if_ there is no significant overhead e.g. an extra memory
copy inside the kernel, or if it's really quick to do as a temporary
stop-gap.

We would love some words of wisdom about the options above and/or a new
idea :-)

Cheers,
-Luke

[-- Attachment #2: Type: text/html, Size: 2602 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2013-10-21 10:29 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-26  9:32 [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O Luke Gorrie
2013-05-27  9:34 ` Stefan Hajnoczi
2013-05-27 15:18   ` Michael S. Tsirkin
2013-05-27 15:43   ` Paolo Bonzini
2013-05-27 16:18     ` Anthony Liguori
2013-05-27 16:18       ` Paolo Bonzini
2013-05-27 17:01         ` Anthony Liguori
2013-05-27 17:13           ` Michael S. Tsirkin
2013-05-27 18:31             ` Anthony Liguori
2013-05-28 10:39       ` Luke Gorrie
2013-05-28 10:10   ` Luke Gorrie
2013-05-28 10:35     ` Stefan Hajnoczi
2013-05-28 11:36     ` Julian Stecklina
2013-05-28 11:53       ` Michael S. Tsirkin
2013-05-28 12:09         ` Julian Stecklina
2013-05-28 13:56           ` Michael S. Tsirkin
2013-05-28 15:35             ` Julian Stecklina
2013-05-28 15:44               ` Michael S. Tsirkin
2013-05-28 12:48         ` [Qemu-devel] [snabb-devel:276] " Luke Gorrie
2013-05-28 13:12           ` Julian Stecklina
2013-05-28 13:42             ` [Qemu-devel] [snabb-devel:280] " Luke Gorrie
2013-05-28 14:42         ` [Qemu-devel] [snabb-devel:276] " Luke Gorrie
2013-05-28 15:33           ` Julian Stecklina
2013-05-28 17:00       ` [Qemu-devel] " Anthony Liguori
2013-05-28 17:17         ` Michael S. Tsirkin
2013-05-28 18:55           ` Anthony Liguori
2013-05-29 10:31             ` Stefano Stabellini
2013-05-29 12:25               ` Michael S. Tsirkin
2013-05-29 13:04                 ` Stefano Stabellini
2013-06-04 12:19               ` [Qemu-devel] [snabb-devel:300] " Luke Gorrie
2013-06-04 12:49                 ` Julian Stecklina
2013-06-04 20:09                   ` [Qemu-devel] [snabb-devel:326] " Luke Gorrie
2013-06-04 12:56                 ` [Qemu-devel] [snabb-devel:300] " Michael S. Tsirkin
2013-06-05  6:09                   ` [Qemu-devel] [snabb-devel:327] " Luke Gorrie
2013-05-29  7:49           ` [Qemu-devel] " Stefan Hajnoczi
2013-05-29  9:08             ` Michael S. Tsirkin
2013-05-29 14:21               ` Stefan Hajnoczi
2013-05-29 14:48                 ` Michael S. Tsirkin
2013-05-29 16:02                 ` Julian Stecklina
2013-05-30  2:35                   ` ronnie sahlberg
2013-05-30  6:46                   ` Stefan Hajnoczi
2013-05-30  6:55                     ` Michael S. Tsirkin
2013-05-30  7:11                     ` [Qemu-devel] [snabb-devel:308] " Luke Gorrie
2013-05-30  8:08                     ` [Qemu-devel] " Julian Stecklina
2013-05-29 12:32         ` Julian Stecklina
2013-05-29 14:31           ` Stefan Hajnoczi
2013-05-29 15:59             ` Julian Stecklina
2013-05-28 11:58     ` Stefan Hajnoczi
2013-10-21 10:29       ` Luke Gorrie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.