Go to main content

Oracle® VM Server for SPARC 3.6 Administration Guide

Exit Print View

Updated: September 2019
 
 

Destroying Fibre Channel SR-IOV Virtual Functions

A virtual function can be destroyed if it is not currently assigned to a domain. A virtual function can be destroyed only in the reverse sequential order of creation, so only the last virtual function that was created can be destroyed. The resulting configuration is validated by the physical function driver.

How to Destroy a Fibre Channel SR-IOV Virtual Function

If you cannot use this dynamic method, use the static method instead. See Static SR-IOV.

  1. Identify the physical function device.
    primary# ldm list-io
  2. Destroy a single virtual function or multiple virtual functions either dynamically or statically.
    • Dynamic method:
      • To destroy all of the virtual functions from a physical function at one time, use the following command:
        primary# ldm destroy-vf -n number | max pf-name

        You can use either the path name or the pseudonym name to specify virtual functions. However, the recommended practice is to use the pseudonym name.

        Use the ldm destroy-vf -n max command to destroy all the virtual functions for that physical function at one time.

        If you specify number as an argument to the –n option, the last number of virtual functions are destroyed. Use this method as it performs this operation with only one physical function device driver state transition.

      • To destroy a specified virtual function:
        primary# ldm destroy-vf vf-name

      Due to delays in the affected hardware device and in the OS, the affected physical function and any remaining child virtual functions might not be available for immediate use. Use the ldm list-io command to determine whether the parent physical function and its child virtual functions have the INV value in the Status column. If they have this value, wait until the ldm list-io output no longer shows the INV value in the Status column (about 45 seconds). At that time, you can safely use that physical function or any of its child virtual functions. If this status persists, there is a problem with the device.

      A device status might be INV immediately following a root domain reboot (including that of the primary) or immediately after you use the ldm create-vf or ldm destroy-vf command.

    • Static method:
      1. Initiate a delayed reconfiguration.
        primary# ldm start-reconf root-domain-name
      2. Destroy either a single virtual function or multiple virtual functions.
        • To destroy all of the virtual functions from the specified physical function at the same time, use the following command:
          primary# ldm destroy-vf -n number | max pf-name

          You can use either the path name or the pseudonym name to specify virtual functions. However, the recommended practice is to use the pseudonym name.

        • To destroy a specified virtual function:
          primary# ldm destroy-vf vf-name
      3. Reboot the root domain.
        • To reboot the non-primary root domain:
          primary# ldm stop-domain -r root-domain
        • To reboot the primary root domain:
          primary# shutdown -i6 -g0 -y
Example 26  Dynamically Destroying Multiple Fibre Channel SR-IOV Virtual Functions

This example shows the results of destroying all the virtual functions from the /SYS/MB/PCIE5/IOVFC.PF1 physical function. The ldm list-io output shows that the physical function has eight virtual functions. The ldm destroy-vf -n max command destroys all the virtual functions, and the final ldm list-io output shows that none of the virtual functions remain.

primary# ldm list-io
...
/SYS/MB/PCIE5/IOVFC.PF1                   PF     pci_1                      
/SYS/MB/PCIE5/IOVFC.PF1.VF0               VF     pci_1                      
/SYS/MB/PCIE5/IOVFC.PF1.VF1               VF     pci_1                      
/SYS/MB/PCIE5/IOVFC.PF1.VF2               VF     pci_1                      
/SYS/MB/PCIE5/IOVFC.PF1.VF3               VF     pci_1                      
/SYS/MB/PCIE5/IOVFC.PF1.VF4               VF     pci_1                      
/SYS/MB/PCIE5/IOVFC.PF1.VF5               VF     pci_1                      
/SYS/MB/PCIE5/IOVFC.PF1.VF6               VF     pci_1                      
/SYS/MB/PCIE5/IOVFC.PF1.VF7               VF     pci_1                      
primary# ldm destroy-vf -n max /SYS/MB/PCIE5/IOVFC.PF1
primary# ldm list-io
...
/SYS/MB/PCIE5/IOVFC.PF1                   PF     pci_1
Example 27  Destroying a Fibre Channel Virtual Function

This example shows how to statically destroy the virtual functions from the /SYS/MB/PCIE7/IOVFC.PF0 physical function.

primary# ldm start-reconf rootdom1
Initiating a delayed reconfiguration operation on the rootdom1 domain.
All configuration changes for other domains are disabled until the rootdom1
domain reboots, at which time the new configuration for the rootdom1 domain
will also take effect.

primary# ldm destroy-vf -n max /SYS/MB/PCIE7/IOVFC.PF0
primary# ldm stop-domain -r rootdom1