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.
If you cannot use this dynamic method, use the static method instead. See Static SR-IOV.
primary# ldm list-io
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.
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.
primary# ldm start-reconf root-domain-name
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.
primary# ldm destroy-vf vf-name
primary# ldm stop-domain -r root-domain
primary# shutdown -i6 -g0 -y
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_1Example 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