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. Michael S. Tsirkin (3): qemu-kvm: move virtio-pci.o to near pci.o virtio: move features to an inline function qemu-kvm: vhost-net implementation Makefile.hw | 2 +- Makefile.target | 3 +- 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 | 8 ++- net.h | 1 + qemu-kvm.c | 8 -- qemu-kvm.h | 9 +++ 15 files changed, 340 insertions(+), 42 deletions(-) create mode 100644 hw/vhost_net.c create mode 100644 hw/vhost_net.h
Michael S. Tsirkin wrote:> 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. >Any rough idea on performance? Better or worse than userspace? Regards, Anthony Liguori
Michael S. Tsirkin wrote:> 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.This has a large degree of rejects against qemu-kvm.git/master. What tree does this apply to? -Greg -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 267 bytes Desc: OpenPGP digital signature Url : http://lists.linux-foundation.org/pipermail/virtualization/attachments/20090812/be231866/attachment.pgp
On Wed, Aug 12, 2009 at 04:27:44PM -0400, Gregory Haskins wrote:> Michael S. Tsirkin wrote: > > 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. > > This has a large degree of rejects against qemu-kvm.git/master. What > tree does this apply to? > > -Greg >Likely that tree has advanced since. This is on top of commit b6bbd41fac4b6fb0efc65e083d2151ce1521f615. -- MST
Michael S. Tsirkin wrote:> On Wed, Aug 12, 2009 at 04:27:44PM -0400, Gregory Haskins wrote: >> Michael S. Tsirkin wrote: >>> 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. >> This has a large degree of rejects against qemu-kvm.git/master. What >> tree does this apply to? >> >> -Greg >> > > Likely that tree has advanced since. > This is on top of commit b6bbd41fac4b6fb0efc65e083d2151ce1521f615. >Hmm....better, but I still get rejects. Of particular concern is this one in net.c: @@ -1903,7 +1903,7 @@ static TAPState *net_tap_init(VLANState *vlan, const char *model, typedef struct RAWState { VLANClientState *vc; int fd; - uint8_t buf[4096]; + uint8_t buf[65000]; int promisc; } RAWState; I do not see any occurrence of "RAWState" in b6bbd41f (or master, for that matter). There is probably an operator error somewhere in here ;), but any help getting this working is appreciated. Do you have a git tree I can pull somewhere? Kind Regards, -Greg -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 267 bytes Desc: OpenPGP digital signature Url : http://lists.linux-foundation.org/pipermail/virtualization/attachments/20090813/87b9862f/attachment.pgp
On Thu, Aug 13, 2009 at 07:35:52AM -0400, Gregory Haskins wrote:> Michael S. Tsirkin wrote: > > On Wed, Aug 12, 2009 at 04:27:44PM -0400, Gregory Haskins wrote: > >> Michael S. Tsirkin wrote: > >>> 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. > >> This has a large degree of rejects against qemu-kvm.git/master. What > >> tree does this apply to? > >> > >> -Greg > >> > > > > Likely that tree has advanced since. > > This is on top of commit b6bbd41fac4b6fb0efc65e083d2151ce1521f615. > > > > > Hmm....better, but I still get rejects. Of particular concern is this > one in net.c: > > @@ -1903,7 +1903,7 @@ static TAPState *net_tap_init(VLANState *vlan, > const char *model, > typedef struct RAWState { > VLANClientState *vc; > int fd; > - uint8_t buf[4096]; > + uint8_t buf[65000]; > int promisc; > } RAWState; > > > I do not see any occurrence of "RAWState" in b6bbd41f (or master, for > that matter). There is probably an operator error somewhere in here ;),Yes. Mine :)> but any help getting this working is appreciated.I reposted a clean one which is against latest bits earlier today. Look for PATCHv2 in your inbox.> Do you have a git tree I can pull somewhere? > Kind Regards, > -Greg >Thanks for the patience, -- MST