From: Laine Stump Date: Tue, 16 Jun 2015 15:57:11 +0000 (-0400) Subject: nodedev: update netdev feature bits before each dumpxml X-Git-Tag: v1.2.17-rc1~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=307081796ee07d5f47e1fef66766de82d5fce642;p=thirdparty%2Flibvirt.git nodedev: update netdev feature bits before each dumpxml As with several other attributes of devices (link status, sriov VF list, IOMMU group list), the detdev feature bits aren't automatically updated in the nodedev driver's cache when they change. In order to get a properly up-to-date list when getting the XML of a device, we must reget them in update-caps prior to each dumpxml. This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1232880 --- diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index 768db7fbb3..500caeb231 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -58,6 +58,9 @@ static int update_caps(virNodeDeviceObjPtr dev) case VIR_NODE_DEV_CAP_NET: if (virNetDevGetLinkInfo(cap->data.net.ifname, &cap->data.net.lnk) < 0) return -1; + virBitmapFree(cap->data.net.features); + if (virNetDevGetFeatures(cap->data.net.ifname, &cap->data.net.features) < 0) + return -1; break; case VIR_NODE_DEV_CAP_PCI_DEV: if (nodeDeviceSysfsGetPCIRelatedDevCaps(dev->def->sysfs_path,