This adds support for vhost-net virtio kernel backend. This is RFC, but works without issues for me. Still needs to be split up, tested and benchmarked properly, but posting it here in case people want to test drive the kernel bits I posted. Changes since v2: - minor fixes - added patch to build on RHEL5.3 Changes since v1: - rebased on top of 9dc275d9d660fe1cd64d36102d600885f9fdb88a Michael S. Tsirkin (4): qemu-kvm: move virtio-pci.o to near pci.o virtio: move features to an inline function qemu-kvm: vhost-net implementation qemu-kvm: add compat eventfd Makefile.hw | 2 +- Makefile.target | 3 +- compat/sys/eventfd.h | 13 ++++ configure | 1 + hw/vhost_net.c | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++ hw/vhost_net.h | 30 ++++++++ hw/virtio-balloon.c | 2 +- hw/virtio-blk.c | 2 +- hw/virtio-console.c | 2 +- hw/virtio-net.c | 34 +++++++++- hw/virtio-pci.c | 43 +++++++++++- hw/virtio.c | 19 ----- hw/virtio.h | 38 ++++++++++- net.c | 6 ++- net.h | 1 + qemu-kvm.c | 8 -- qemu-kvm.h | 9 +++ 17 files changed, 353 insertions(+), 41 deletions(-) create mode 100644 compat/sys/eventfd.h create mode 100644 hw/vhost_net.c create mode 100644 hw/vhost_net.h
On 08/17/2009 03:37 PM, Michael S. Tsirkin wrote:> but posting it here in case people want to test drive > the kernel bits I posted. >I think that is best served if you post a link to a git tree... -- error compiling committee.c: too many arguments to function
On Mon, Aug 17, 2009 at 6:37 AM, Michael S. Tsirkin<mst at redhat.com> wrote:> This adds support for vhost-net virtio kernel backend. > > This is RFC, but works without issues for me.I got this to build by syncing up some headers in kvm/include/linux, but it doesn't seem to be working quite right. I have an unused e1000e nic in my system (eth10,00:17:a4:77:a4:08) that I ifconfig up, then launch a VM with the option: -net nic,model=virtio,macaddr=00:17:a4:77:a4:08,vhost=eth10 The virtio nic is functional in the guest, but it gets packet dupes on ping, which is likely contributing to the poor performance, roughly 1/3rd of virtio-net userspace for tcp_stream and tcp_rr. I think I have all the offload option disabled on the nic in the host. Any idea what I might be doing wrong? This seems quite a bit off of the udp_rr results you posted. Thanks, Alex