[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 09/10] linkstate: qemu: Add detection of link state setting capability.



On 08/11/2011 09:27 AM, Peter Krempa wrote:
Adds a capability flag based on version number to detect if qemu
supports setting link state.
---
  src/qemu/qemu_capabilities.c |    5 +++++
  src/qemu/qemu_capabilities.h |    1 +
  2 files changed, 6 insertions(+), 0 deletions(-)

No testsuite changes to validate that the new capability is detected?

@@ -1033,6 +1034,10 @@ qemuCapsComputeCmdFlags(const char *help,

      if (version>= 13000)
          qemuCapsSet(flags, QEMU_CAPS_PCI_MULTIFUNCTION);
+
+    /* link state modification appeared before 0.11.0*/
+    if (version>= 11000)
+        qemuCapsSet(flags, QEMU_CAPS_LINK_SET);

Version checks are not nice (they are okay as a last resort, though). Is there is anything nicer that we could use? Also, how do you plan to set link=down at boot from the command line, or can link state only be changed via monitor command?

--
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]