On Thu, Feb 21, 2013 at 08:54:44PM +0800, Liu Ping Fan wrote: > This is a emulation to virtio-blk dataplane, which push the data > handling out of biglock. And it is a try to implement this process > in userspace, while vhost-net in kernel.
What's the motivation for doing this? Speed up the slirp backend which vhost-net does not support? If yes, I would start with implementing offloads (segmentation,checksum) in slirp. This is likely to give you a nice speed boost and is generally a desirable feature. > The iperf's result show it improving the perfermance of base line, > but still slower than vhost-net (maybe the rx path need optimized). > > Todo: > implement fine lock for net-subsystem vhost-net is currently the only way to get zero copy transmit on linux (and zero copy receive in the future) so at least in theory it'll always be faster. > Liu Ping Fan (9): > vring: split the modification and publish of used ring > vring: introduce vring_restore() to restore from img > event poll: make epoll work for normal fd > event poll: pass event type to event callback > event poll: enable event poll handle more than one event each time > virtio net: introduce dataplane for virtio net > tap: make tap peer work on dedicated data-plane thread > virtio net: enable dataplane for virtio net > configure: make virtio net dataplane configurable > > configure | 12 ++ > hw/dataplane/Makefile.objs | 4 +- > hw/dataplane/event-poll.c | 69 +++++-- > hw/dataplane/event-poll.h | 14 ++- > hw/dataplane/virtio-blk.c | 8 +- > hw/dataplane/virtio-net.c | 444 > ++++++++++++++++++++++++++++++++++++++++++++ > hw/dataplane/virtio-net.h | 32 ++++ > hw/dataplane/vring.c | 37 ++++ > hw/dataplane/vring.h | 3 + > hw/virtio-net.c | 94 +++++----- > hw/virtio-net.h | 64 +++++++ > hw/virtio-pci.c | 2 +- > include/net/tap.h | 6 + > net/tap.c | 92 +++++++++- > 14 files changed, 806 insertions(+), 75 deletions(-) > create mode 100644 hw/dataplane/virtio-net.c > create mode 100644 hw/dataplane/virtio-net.h > > -- > 1.7.4.4 >