<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Thanks Laine. The following patch worked for me.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal; "><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal; "><span><div style="background-color: transparent; ">--- qemu_command.c.orig<span class="Apple-tab-span" style="white-space:pre">     </span>2012-12-21 10:12:33.021428569 -0800</div><div style="background-color: transparent; ">+++ qemu_command.c<span class="Apple-tab-span" style="white-space:pre">      </span>2012-12-17 13:52:41.860110967 -0800</div><div style="background-color: transparent; ">@@ -4972,6 +4972,7 @@
 qemuBuildCommandLine(virConnectPtr conn,</div><div style="background-color: transparent; "> </div><div style="background-color: transparent; ">             if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK ||</div><div style="background-color: transparent; ">                 actualType == VIR_DOMAIN_NET_TYPE_BRIDGE ||</div><div style="background-color: transparent; ">+                actualType == VIR_DOMAIN_NET_TYPE_ETHERNET ||</div><div style="background-color: transparent; ">                 actualType == VIR_DOMAIN_NET_TYPE_DIRECT) {</div><div style="background-color: transparent; ">                 /* Attempt to use vhost-net mode for these types of</div><div style="background-color: transparent; ">           
         network device */</div><div><br></div></span></div><div>I am guessing a similar change is needed in qemuDomainAttachNetDevice()</div><div>for the hotplug case, but I haven't tested that scenario. Could somebody</div><div>please commit this change as it impacts performance significantly? Please</div><div>let me know if you need me to do anything further.</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal; ">Thanks,</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal; "><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal; ">Raja</div><div style="color: rgb(0, 0, 0);
 font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal; "><br></div>  <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Laine Stump <laine@laine.org><br> <b><span style="font-weight: bold;">To:</span></b> libvir-list@redhat.com <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, December 13, 2012 6:23 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [libvirt] vhost-net on ethernet interface type<br> </font> </div> <br>
On 12/13/2012 07:05 PM, Raja Sivaramakrishnan wrote:<br>> Hello,<br>>     I would like to enable vhost-net on an interface of ethernet type.<br>> However,<br>> this doesn't work, probably due to the following code in libvirt.<br>><br>>             if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK ||<br>>                 actualType == VIR_DOMAIN_NET_TYPE_BRIDGE ||<br>>                 actualType == VIR_DOMAIN_NET_TYPE_DIRECT) {<br>>                 /* Attempt to use vhost-net mode for these types of<br>>                    network device */<br>><br>> Can VIR_DOMAIN_NET_TYPE_ETHERNET also be included in the check <br>> above? Or is there some reason to disable vhost-net for this type?<br><br>I'm not sure if there
 would be any problem or not; on the surface it<br>seems not. If you're able to build from sources, try it out and, if it<br>works, send a patch (or at least report back here and someone else can<br>make the patch).<br><br>--<br>libvir-list mailing list<br><a ymailto="mailto:libvir-list@redhat.com" href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a><br><a href="https://www.redhat.com/mailman/listinfo/libvir-list" target="_blank">https://www.redhat.com/mailman/listinfo/libvir-list</a><br><br><br> </div> </div>  </div></body></html>