1. 21 12月, 2015 3 次提交
    • A
      pci: Introduce virPCIStubDriver enumeration · 6d9cdd2a
      Andrea Bolognani 提交于
      This replaces the virPCIKnownStubs string array that was used
      internally for stub driver validation.
      
      Advantages:
      
        * possible values are well-defined
        * typos in driver names will be detected at compile time
        * avoids having several copies of the same string around
        * no error checking required when setting / getting value
      
      The names used mirror those in the
      virDomainHostdevSubsysPCIBackendType enumeration.
      6d9cdd2a
    • A
      pci: Remove 'reprobe' parameter from virPCIDeviceUnbind() · e1b24583
      Andrea Bolognani 提交于
      The value is not inspected inside the function, so it makes more
      sense for the caller to change the device's setting explicitly.
      e1b24583
    • A
      pci: Remove redundant parameter from virPCIDeviceBindToStub() · 51f39c70
      Andrea Bolognani 提交于
      This internal function supports, in theory, binding to a different
      stub driver than the one the PCI device has been configured to use.
      
      In practice, it is only ever called like
      
        virPCIDeviceBindToStub(dev, dev->stubDriver);
      
      which makes its second parameter redundant. Get rid of it, along
      with the extra string copy required to support it.
      51f39c70
  2. 17 12月, 2015 2 次提交
  3. 16 12月, 2015 1 次提交
    • A
      pci: Use virPCIDeviceAddress in virPCIDevice · 77434541
      Andrea Bolognani 提交于
      Instead of replicating the information (domain, bus, slot, function)
      inside the virPCIDevice structure, use the already-existing
      virPCIDeviceAddress structure.
      
      For users of the module, this means that the object returned by
      virPCIDeviceGetAddress() can no longer be NULL and must no longer
      be freed by the caller.
      77434541
  4. 15 12月, 2015 2 次提交
  5. 14 12月, 2015 1 次提交
    • M
      virNetDevMacVLanTapSetup: Drop @multiqueue argument · 65e3451e
      Michal Privoznik 提交于
      Firstly, there's a bug (or typo) in the only place where we call
      this function: @multiqueue is set whenever @tapfdSize is greater
      than zero, while in fact the condition should have been 'greater
      than one'.
      Then, secondly, since the condition depends on just one
      variable, that we are even passing down to the function, we can
      move the condition into the function and drop useless argument.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      65e3451e
  6. 13 12月, 2015 1 次提交
    • M
      virNetDevMacVLanTapSetup: Work around older systems · ec93cc25
      Michal Privoznik 提交于
      Some older systems, e.g. RHEL-6 do not have IFF_MULTI_QUEUE flag
      which we use to enable multiqueue feature. Therefore one gets the
      following compile error there:
      
        CC     util/libvirt_util_la-virnetdevmacvlan.lo
      util/virnetdevmacvlan.c: In function 'virNetDevMacVLanTapSetup':
      util/virnetdevmacvlan.c:338: error: 'IFF_MULTI_QUEUE' undeclared (first use in this function)
      util/virnetdevmacvlan.c:338: error: (Each undeclared identifier is reported only once
      util/virnetdevmacvlan.c:338: error: for each function it appears in.)
      make[3]: *** [util/libvirt_util_la-virnetdevmacvlan.lo] Error 1
      
      So, whenever user wants us to enable the feature on such systems,
      we will just throw a runtime error instead.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      ec93cc25
  7. 11 12月, 2015 9 次提交
  8. 05 12月, 2015 1 次提交
  9. 02 12月, 2015 1 次提交
    • I
      network: selectively disable -Wcast-align in virNetDevParseDadStatus · af2954ae
      Ian Campbell 提交于
      Commit 0f7436ca "network: wait for DAD to finish for bridge IPv6 addresses"
      results in:
      
       CC     util/libvirt_util_la-virnetdevmacvlan.lo
      util/virnetdev.c: In function 'virNetDevParseDadStatus':
      util/virnetdev.c:1319:188: error: cast increases required alignment of target type [-Werror=cast-align]
      util/virnetdev.c:1332:41: error: cast increases required alignment of target type [-Werror=cast-align]
      util/virnetdev.c:1334:92: error: cast increases required alignment of target type [-Werror=cast-align]
      cc1: all warnings being treated as errors
      
      on at least ARM platforms.
      
      The three macros involved (NLMSG_NEXT, IFA_RTA and RTA_NEXT) all appear to
      correctly take care of alignment, therefore suppress Wcast-align around their
      uses.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Cc: Maxim Perevedentsev <mperevedentsev@virtuozzo.com>
      Cc: Laine Stump <laine@laine.org>
      Cc: Dario Faggioli <dario.faggioli@citrix.com>
      Cc: Jim Fehlig <jfehlig@suse.com>
      af2954ae
  10. 30 11月, 2015 5 次提交
  11. 27 11月, 2015 1 次提交
  12. 26 11月, 2015 3 次提交
  13. 25 11月, 2015 1 次提交
    • L
      nodedev: report maxCount for virtual_functions capability · f391889f
      Laine Stump 提交于
      A PCI device may have the capability to setup virtual functions (VFs)
      but have them currently all disabled. Prior to this patch, if that was
      the case the the node device XML for the device wouldn't report any
      virtual_functions capability.
      
      With this patch, if a file called "sriov_totalvfs" is found in the
      device's sysfs directory, its contents will be interpreted as a
      decimal number, and that value will be reported as "maxCount" in a
      capability element of the device's XML, e.g.:
      
         <capability type='virtual_functions' maxCount='7'/>
      
      This will be reported regardless of whether or not any VFs are
      currently enabled for the device.
      
      NB: sriov_numvfs (the number of VFs currently active) is also
      available in sysfs, but that value is implied by the number of items
      in the list that is inside the capability element, so there is no
      reason to explicitly provide it as an attribute.
      
      sriov_totalvfs and sriov_numvfs are available in kernels at least as far
      back as the 2.6.32 that is in RHEL6.7, but in the case that they
      simply aren't there, libvirt will behave as it did prior to this patch
      - no maxCount will be displayed, and the virtual_functions capability
      will be absent from the device's XML when 0 VFs are enabled.
      f391889f
  14. 24 11月, 2015 1 次提交
  15. 20 11月, 2015 1 次提交
  16. 19 11月, 2015 1 次提交
  17. 18 11月, 2015 2 次提交
  18. 16 11月, 2015 1 次提交
  19. 07 11月, 2015 2 次提交
    • J
      virnetdev: Use virNetDevSetupControl in virNetDevSendEthtoolIoctl · edc88e20
      John Ferlan 提交于
      Use virNetDevSetupControl instead of open coding using socket(AF_LOCAL...)
      and clearing virIfreq.
      
      By using virNetDevSetupControl, the socket is then opened using
      AF_PACKET which requires being privileged (effectively root) in
      order to complete successfully.  Since that's now a requirement,
      then the ioctl(SIOCETHTOOL) should not fail with EPERM, thus it
      is removed from the filtered listed of failure codes.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      edc88e20
    • J
      virnetdev: Check for root in virNetDevGetFeatures · d0a3a1ff
      John Ferlan 提交于
      Since the SIOCETHTOOL ioctl only works for privileged daemons, if called
      when not root, then virNetDevGetFeatures will VIR_DEBUG a message and
      return 0 as if the functions were not available for the architecture.
      This effectively returns an empty bitmap indicating no features available.
      
      Introduced by commit id 'c9027d8f'
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      d0a3a1ff
  20. 06 11月, 2015 1 次提交