1. 18 3月, 2019 2 次提交
  2. 04 2月, 2019 1 次提交
  3. 14 12月, 2018 1 次提交
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  4. 12 11月, 2018 1 次提交
    • E
      conf: Add new module node_device_util · f1e8d2f0
      Erik Skultety 提交于
      There's a lot of stuff going on in src/conf/nodedev_conf which is
      sometimes not directly related to config and we're not really consistent
      with putting only parser/formatter related stuff here, e.g. like we do
      for domains. So, let's start simply by adding a new module
      node_device_util containing some of the helpers. Unfortunately, even
      though these helpers tend to open a secondary driver connection and would
      be much therefore better suited as a nodedev driver module, we can't do
      that without pulling headers from the driver into conf/ and that's wrong
      because we want conf/ to stay driver-agnostic.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      Acked-by: NMichal Privoznik <mprivozn@redhat.com>
      f1e8d2f0
  5. 20 9月, 2018 1 次提交
  6. 30 1月, 2018 1 次提交
  7. 29 1月, 2018 7 次提交
  8. 14 8月, 2017 1 次提交
  9. 07 8月, 2017 1 次提交
  10. 25 7月, 2017 2 次提交
    • J
      storage: Remove @conn from virNodeDeviceCreateVport · 214a353c
      John Ferlan 提交于
      It's no longer needed since the checkParent code moved back to
      storage_backend_scsi.c
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      214a353c
    • J
      storage: Fix existing parent check for vHBA creation · c4030331
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1472277
      
      Commit id '106930aa' altered the order of checking for an existing
      vHBA (e.g something created via nodedev-create functionality outside
      of the storage pool logic) which inadvertantly broke the code to
      decide whether to alter/force the fchost->managed field to be 'yes'
      because the storage pool will be managing the created vHBA in order
      to ensure when the storage pool is destroyed that the vHBA is also
      destroyed.
      
      This patch moves the check (and checkParent helper) for an existing
      vHBA back into the createVport in storage_backend_scsi. It also
      adjusts the checkParent logic to more closely follow the intentions
      prior to commit id '79ab0935'. The changes made by commit id '08c0ea16'
      are only necessary to run the virStoragePoolFCRefreshThread when
      a vHBA was really created because there's a timing lag such that
      the refreshPool call made after a startPool from storagePoolCreate*
      wouldn't necessarily find LUNs, but the thread would. For an already
      existing vHBA, using the thread is unnecessary since the vHBA already
      exists and the lag to configure the LUNs wouldn't exist.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      c4030331
  11. 17 7月, 2017 1 次提交
    • J
      nodedev: Introduce virNodeDeviceGetSCSIHostCaps · 12fa16eb
      John Ferlan 提交于
      We're about to move the call to nodeDeviceSysfsGetSCSIHostCaps from
      node_device_driver into virnodedeviceobj, so move the guts of the code
      from the driver specific node_device_linux_sysfs into its own API
      since virnodedeviceobj cannot callback into the driver.
      
      Nothing in the code deals with sysfs anyway, as that's hidden by the
      various virSCSIHost* and virVHBA* utility function calls.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      12fa16eb
  12. 26 5月, 2017 2 次提交
    • B
      node_device: introduce new capability FC_RPORT · bb2adfe9
      Bjoern Walk 提交于
      Similar to scsi_host and fc_host, there is a relation between a
      scsi_target and its transport specific fc_remote_port. Let's expose this
      relation and relevant information behind it.
      
      An example for a virsh nodedev-dumpxml:
      
          virsh # nodedev-dumpxml scsi_target0_0_0
          <device>
            <name>scsi_target0_0_0</name>
            <path>/sys/devices/[...]/host0/rport-0:0-0/target0:0:0</path>
            <parent>scsi_host0</parent>
            <capability type='scsi_target'>
              <target>target0:0:0</target>
              <capability type='fc_remote_port'>
                <rport>rport-0:0-0</rport>
                <wwpn>0x9d73bc45f0e21a86</wwpn>
              </capability>
            </capability>
          </device>
      Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
      bb2adfe9
    • B
      node_device: detect CCW devices · b0ffd938
      Bjoern Walk 提交于
      Make CCW devices available to the node_device driver. The devices are
      already seen by udev so let's implement necessary code for detecting
      them properly.
      
      Topologically, CCW devices are similar to PCI devices, e.g.:
      
          +- ccw_0_0_1a2b
              |
              +- scsi_host0
                  |
                  +- scsi_target0_0_0
                      |
                      +- scsi_0_0_0_0
      Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
      b0ffd938
  13. 24 5月, 2017 1 次提交
    • J
      conf: Resolve corner case on fc_host deletion · 2c8e30ee
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1420740
      
      Testing found an inventive way to cause an error at shutdown by providing the
      parent name for the fc host creation using the "same name" as the HBA. Since
      the code thus assumed the parent host name provided was the parent HBA and
      just extracted out the host number and sent that along to the vport_destroy
      this avoided checks made for equality.
      
      So just add the equality check to that path to resolve.
      2c8e30ee
  14. 18 5月, 2017 4 次提交
    • E
      nodedev: Introduce mdev capability for mediated devices · 88ef73e1
      Erik Skultety 提交于
      Start discovering the mediated devices on the host system and format the
      attributes for the mediated device into the XML. Compared to the parent
      device which reports generic information about the abstract mediated
      devices types, a child device only reports the type name it has been
      instantiated from and the IOMMU group number, since that's device
      specific compared to the rest of the info that can be gathered about
      mediated devices at the moment.
      This patch introduces both the formatting and parsing routines, updates
      nodedev.rng schema, adding a testcase as well.
      
      The resulting mdev child device XML:
      <device>
        <name>mdev_4b20d080_1b54_4048_85b3_a6a62d165c01</name>
        <path>/sys/devices/.../4b20d080-1b54-4048-85b3-a6a62d165c01</path>
        <parent>pci_0000_06_00_0</parent>
        <driver>
          <name>vfio_mdev</name>
        </driver>
        <capability type='mdev'>
          <type id='vendor_supplied_type_id'/>
          <iommuGroup number='NUM'/>
        <capability/>
      <device/>
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1452072Signed-off-by: NErik Skultety <eskultet@redhat.com>
      88ef73e1
    • E
      nodedev: Introduce the mdev capability to a PCI parent device · 500cbc06
      Erik Skultety 提交于
      The parent device needs to report the generic stuff about the supported
      mediated devices types, like device API, available instances, type name,
      etc. Therefore this patch introduces a new nested capability element of
      type 'mdev_types' with the resulting XML of the following format:
      
      <device>
        ...
        <capability type='pci'>
          ...
          <capability type='mdev_types'>
            <type id='vendor_supplied_id'>
              <name>optional_vendor_supplied_codename</name>
              <deviceAPI>vfio-pci</deviceAPI>
              <availableInstances>NUM</availableInstances>
            </type>
              ...
            <type>
              ...
            </type>
          </capability>
        </capability>
        ...
      </device>
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1452072Signed-off-by: NErik Skultety <eskultet@redhat.com>
      500cbc06
    • E
      nodedev: Introduce new mdev_types and mdev nodedev capabilities · 4385df97
      Erik Skultety 提交于
      The reason for introducing two capabilities, one for the device itself
      (cap 'mdev') and one for the parent device listing the available types
      ('mdev_types'), is that we should be able to do
      'virsh nodedev-list --cap' not only for existing mdev devices but also
      for devices that support creation of mdev devices, since one day libvirt
      might be actually able to create the mdev devices in an automated way
      (just like we do for NPIV/vHBA).
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1452072Signed-off-by: NErik Skultety <eskultet@redhat.com>
      4385df97
    • E
      nodedev: conf: Split PCI sub-capability parsing to separate methods · a5c1f3b7
      Erik Skultety 提交于
      Since there's at least SRIOV and MDEV sub-capabilities to be parsed,
      let's make the code more readable by splitting it to several logical
      blocks.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      a5c1f3b7
  15. 24 4月, 2017 1 次提交
  16. 13 4月, 2017 1 次提交
  17. 11 4月, 2017 1 次提交
  18. 16 3月, 2017 3 次提交
    • J
      conf: Alter error message for vHBA creation using parent wwnn/wwpn · e3c37aa8
      John Ferlan 提交于
      Commit id 'bb74a7ff' added a fairly non specific message when providing
      only the <parent wwnn='xxx'/> or <parent wwpn='xxx'/> instead of providing
      both wwnn and wwpn. This patch just modifies the message to be more specific
      about which was missing.
      e3c37aa8
    • J
      conf: Return the vHBA name from virNodeDeviceCreateVport · 08c0ea16
      John Ferlan 提交于
      Rather than returning true/false and having the caller check if the
      vHBA was actually created, let's do that check within the CreateVport
      function. That way the caller can faithfully assume success based
      on a name start the thread looking for the LUNs. Prior to this change
      it's possible that the vHBA wasn't really created (e.g if the call to
      virVHBAGetHostByWWN returned NULL), we'd claim success, but in reality
      there'd be no vHBA for the pool. This also fixes a second yet seen
      issue that if the nodedev was present, but the parent by name wasn't
      provided (perhaps parent by wwnn/wwpn or by fabric_name), then a failure
      would be returned. For this path it shouldn't be an error - we should
      just be happy that something else is managing the device and we don't
      have to create/delete it.
      
      The end result is that the createVport code can now just start the
      refresh thread once it gets a non NULL name back.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      08c0ea16
    • J
      conf: Move/Rename createVport and deleteVport · 106930aa
      John Ferlan 提交于
      Move the bulk of createVport and rename to virNodeDeviceCreateVport.
      
      Remove the deleteVport entirely and replace with virNodeDeviceDeleteVport
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      106930aa
  19. 04 3月, 2017 4 次提交
    • J
      node: Replace variable named 'system' with 'syscap' · cbcfd097
      John Ferlan 提交于
      Changes in commit id 'dec6d9df' caused a compilation failure on a RHEL6
      CI build environment. So just replace 'system' with 'syscap' as a name.
      
      cc1: warnings being treated as errors
      ../../src/conf/node_device_conf.c: In function 'virNodeDevCapSystemParseXML':
      ../../src/conf/node_device_conf.c:1415: error: declaration of 'system' shadows a global declaration [-Wshadow]
      cbcfd097
    • J
      nodedev: Reduce virNodeDevCapDataPtr usage · dec6d9df
      John Ferlan 提交于
      Replace with more data specific pointer types.
      dec6d9df
    • J
      conf: Adjust coding style for nodedev conf sources · 29714483
      John Ferlan 提交于
      Alter the format of the code to follow more recent style guidelines of
      two empty lines between functions, function decls with "[static] type"
      on one line followed by function name with arguments to functions each
      on one line.
      29714483
    • J
      conf: Introduce virnodedeviceobj · bc20200e
      John Ferlan 提交于
      Move all the NodeDeviceObj API's into their own module virnodedeviceobj
      from the node_device_conf
      
      Purely code motion at this point, plus adjustments to cleanly build.
      bc20200e
  20. 28 2月, 2017 1 次提交
  21. 21 2月, 2017 1 次提交
  22. 19 2月, 2017 2 次提交
    • J
      tests: Add createVHBAByNodeDevice-parent-fabric-wwn to fchosttest · f3b1b981
      John Ferlan 提交于
      Add a test that allows providing the parent fabric_wwn in the input XML
      in order to create the vHBA.
      
      This also fixes a mixed setting of the fabric_wwn field from the read
      test driver XML strings.
      f3b1b981
    • J
      nodedev: Rework virNodeDeviceGetParentHost · 7ad479d0
      John Ferlan 提交于
      Rework the code to perform the various searches by parent, parent_wwnn/
      parent_wwpn, parent_fabric_wwn, or vport capable in order to return the
      'parent_host' number that is vHBA capable.
      
      The former virNodeDeviceGetParentHost is renamed to add the ByParent
      on it fixes an issue where if no parent was supplied in the XML to
      create the vHBA, then virNodeDeviceFindByName was called with a NULL
      second parameter which had bad results.
      
      The reworked code will make the various calls to fetch the NPIV host
      by the passed parameter options or if none are provided find a vport
      capable NPIV HBA to perform the create. If the call is from the delete
      path, then this option won't be allowed.
      
      Each of virNodeDeviceGetParentHostBy* functions is now static, so
      remove them external definitions.
      
      A secondary benefit of this is the test_driver now can make use of
      the new API to add some new tests to test the various creation options.
      7ad479d0