Go to main content

Oracle® VM Server for SPARC 3.5 Administration Guide

Exit Print View

Updated: November 2017
 
 

Destroying Ethernet 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 an Ethernet 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 single a virtual function or multiple virtual functions either dynamically or statically.
    • Dynamic method:
      • To destroy some or 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

        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.

        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

      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 11  Destroying an Ethernet Virtual Function

This example shows how to dynamically destroy the /SYS/MB/NET0/IOVNET.PF0.VF0 virtual function.

primary# ldm destroy-vf /SYS/MB/NET0/IOVNET.PF0.VF0

The following example shows how to statically destroy the /SYS/MB/NET0/IOVNET.PF0.VF0 virtual function.

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

primary# ldm destroy-vf /SYS/MB/NET0/IOVNET.PF0.VF0
primary# shutdown -i6 -g0 -y
Example 12  Destroying Multiple Ethernet SR-IOV Virtual Functions

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

primary# ldm list-io
...
/SYS/MB/NET2/IOVNET.PF1                   PF     pci_1                      
/SYS/MB/NET2/IOVNET.PF1.VF0               VF     pci_1                      
/SYS/MB/NET2/IOVNET.PF1.VF1               VF     pci_1                      
/SYS/MB/NET2/IOVNET.PF1.VF2               VF     pci_1                      
/SYS/MB/NET2/IOVNET.PF1.VF3               VF     pci_1                      
/SYS/MB/NET2/IOVNET.PF1.VF4               VF     pci_1                      
/SYS/MB/NET2/IOVNET.PF1.VF5               VF     pci_1                      
/SYS/MB/NET2/IOVNET.PF1.VF6               VF     pci_1
primary# ldm destroy-vf -n max /SYS/MB/NET2/IOVNET.PF1
primary# ldm list-io
...
/SYS/MB/NET2/IOVNET.PF1                   PF     pci_1    ldg1