]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu_hotplug: Fetch vhostuser ifname on hotplug
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 18 Sep 2018 08:59:05 +0000 (10:59 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 21 Sep 2018 12:59:35 +0000 (14:59 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=1630164

Since 2a13a0a1033 we are querying the vhostuser's interface name
when building qemu command line. However, we forgot to do so on
hotplug.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/qemu/qemu_hotplug.c

index 633e7fc18f8174a3f45efc175bac82fa88af0651..b00f5ef300dff99a2baf0b4cb97adf85307ba544 100644 (file)
@@ -1330,6 +1330,11 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver,
 
         if (!(charDevAlias = qemuAliasChardevFromDevAlias(net->info.alias)))
             goto cleanup;
+
+        if (virNetDevOpenvswitchGetVhostuserIfname(net->data.vhostuser->data.nix.path,
+                                                   &net->ifname) < 0)
+            goto cleanup;
+
         break;
 
     case VIR_DOMAIN_NET_TYPE_USER: