Thanks Laine. The following patch worked for me.
--- qemu_command.c.orig 2012-12-21 10:12:33.021428569 -0800
+++ qemu_command.c 2012-12-17 13:52:41.860110967 -0800
@@ -4972,6 +4972,7 @@
qemuBuildCommandLine(virConnectPtr conn,
if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK ||
actualType == VIR_DOMAIN_NET_TYPE_BRIDGE ||
+ actualType == VIR_DOMAIN_NET_TYPE_ETHERNET ||
actualType == VIR_DOMAIN_NET_TYPE_DIRECT) {
/* Attempt to use vhost-net mode for these types of
network device */
I am guessing a similar change is needed in qemuDomainAttachNetDevice()
for the hotplug case, but I haven't tested that scenario. Could somebody
please commit this change as it impacts performance significantly? Please
let me know if you need me to do anything further.
Thanks,
Raja
From: Laine Stump <laine@xxxxxxxxx>
To: libvir-list@xxxxxxxxxx
Sent: Thursday, December 13, 2012 6:23 PM
Subject: Re: vhost-net on ethernet interface type
On 12/13/2012 07:05 PM, Raja Sivaramakrishnan wrote:
> Hello,
> I would like to enable vhost-net on an interface of ethernet type.
> However,
> this doesn't work, probably due to the following code in libvirt.
>
> if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK ||
> actualType == VIR_DOMAIN_NET_TYPE_BRIDGE ||
> actualType == VIR_DOMAIN_NET_TYPE_DIRECT) {
> /* Attempt to use vhost-net mode for these types of
> network device */
>
> Can VIR_DOMAIN_NET_TYPE_ETHERNET also be included in the check
> above? Or is there some reason to disable vhost-net for this type?
I'm not sure if there would be any problem or not; on the surface it
seems not. If you're able to build from sources, try it out and, if it
works, send a patch (or at least report back here and someone else can
make the patch).
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list