1. 24 3月, 2017 5 次提交
    • L
      util: make virMacAddrParse more versatile · 30b07a42
      Laine Stump 提交于
      Previously the MAC address text was required to be terminated with a
      NULL. After this, it can be terminated with a space or any control
      character.
      30b07a42
    • L
      util: eliminate useless local variable · 606a0133
      Laine Stump 提交于
      vf in virNetDevMacVLanDeleteWithVPortProfile() is initialized to -1
      and never set. It's not set for a good reason - because it doesn't
      make sense during macvtap device setup to refer to a VF device as
      "PF:VF#". This patch replaces the two uses of "vf" with "-1", and
      removes the local variable, so that it's more clear we are always
      calling the utility functions with vf set to -1.
      606a0133
    • L
      util: use cleanup label consistently in virHostdevNetConfigReplace() · 19c5db74
      Laine Stump 提交于
      This will make an upcoming functional change more straightforward.
      19c5db74
    • L
      util: remove unused args from virNetDevSetVfConfig() · 0a583c26
      Laine Stump 提交于
      This function is only called in two places, and the ifindex,
      nltarget_kernel, and getPidFunc args are never used (and never will
      be).
      
      ifindex - we always know the name of the device, and never know the
      ifindex - if we really did need the ifindex we would have to get it
      from the name using virNetDevGetIndex(). In practice, we just send -1
      to virNetDevSetVfConfig(), which doesn't bother to learn the real
      ifindex (you only need a name *or* an ifindex for the netlink command
      to succeed, not both).
      
      nltarget_kernel - messages to set the config of an SRIOV VF will
      always go to netlink in the kernel, not to another user process, so
      this arg is always true (there are other uses of netlink messages
      where the message might need to go to another user process, but never
      in the case of RTM_SETLINK for SRIOV).
      
      getPidFunc - this arg is only used if nltarget_kernel is false, and it
      never is.
      
      None of this has any functional effect, it just makes it easier to
      follow what's happening when virNetDevSetVfConfig() is called.
      0a583c26
    • L
      util: permit querying a VF MAC address or VLAN tag by itself · 176229dd
      Laine Stump 提交于
      virNetDevParseVfConfig() assumed that both the MAC address and VLAN
      tag pointers were valid, so even if you only wanted one or the other,
      you would need a variable to hold the returned value for both. This
      patch checks each for a NULL pointer before filling it in.
      176229dd
  2. 23 3月, 2017 31 次提交
  3. 22 3月, 2017 4 次提交