How to Create a Fibre Channel SR-IOV Virtual Function
If you cannot use this dynamic method, use the static method instead. See Static SR-IOV.
Example 8-18 Displaying Information About the Fibre Channel Physical Function
This example shows information about the /SYS/MB/PCIE7/IOVFC.PF0
physical function:
-
This physical function is from a board in a PCIe slot,
PCIE7
. -
The
IOVFC
string indicates that the physical function is a Fibre Channel SR-IOV device.
primary# ldm list-io NAME TYPE BUS DOMAIN STATUS ---- ---- --- ------ ------ /SYS/PM0/CMP0/PEX BUS pci_0 primary IOV /SYS/PM0/CMP1/PEX BUS pci_1 rootdom1 IOV /SYS/PM0/CMP0/NIU_CORE NIU niu_0 primary /SYS/PM0/CMP1/NIU_CORE NIU niu_1 primary /SYS/MB/PCIE0 PCIE pci_0 primary OCC /SYS/MB/PCIE2 PCIE pci_0 primary OCC /SYS/MB/PCIE4 PCIE pci_0 primary OCC /SYS/MB/PCIE6 PCIE pci_0 primary EMP /SYS/MB/PCIE8 PCIE pci_0 primary EMP /SYS/MB/SASHBA PCIE pci_0 primary OCC /SYS/MB/NET0 PCIE pci_0 primary OCC /SYS/MB/PCIE1 PCIE pci_1 rootdom1 OCC /SYS/MB/PCIE3 PCIE pci_1 rootdom1 OCC /SYS/MB/PCIE5 PCIE pci_1 rootdom1 OCC /SYS/MB/PCIE7 PCIE pci_1 rootdom1 OCC /SYS/MB/PCIE9 PCIE pci_1 rootdom1 OCC /SYS/MB/NET2 PCIE pci_1 rootdom1 OCC /SYS/MB/NET0/IOVNET.PF0 PF pci_0 primary /SYS/MB/NET0/IOVNET.PF1 PF pci_0 primary /SYS/MB/PCIE5/IOVNET.PF0 PF pci_1 rootdom1 /SYS/MB/PCIE5/IOVNET.PF1 PF pci_1 rootdom1 /SYS/MB/PCIE7/IOVFC.PF0 PF pci_1 rootdom1 /SYS/MB/PCIE7/IOVFC.PF1 PF pci_1 rootdom1 /SYS/MB/NET2/IOVNET.PF0 PF pci_1 rootdom1 /SYS/MB/NET2/IOVNET.PF1 PF pci_1 rootdom1
The following command shows more details about the specified physical function. The maxvfs value indicates the maximum number of virtual functions that is supported by the device.
primary# ldm list-io -l /SYS/MB/PCIE7/IOVFC.PF0
NAME TYPE BUS DOMAIN STATUS
---- ---- --- ------ ------
/SYS/MB/PCIE7/IOVFC.PF0 PF pci_0 rootdom1
[pci@400/pci@1/pci@0/pci@6/SUNW,emlxs@0]
maxvfs = 8
Example 8-19 Dynamically Creating a Fibre Channel Virtual Function Without Setting Optional Properties
This example dynamically creates a virtual function without setting any optional properties. In this case, the ldm create-vf
command automatically allocates the default bandwidth percentage, port world-wide name (WWN), and node WWN values.
Ensure that I/O virtualization is enabled on the pci_1
PCIe bus. See How to Enable I/O Virtualization for a PCIe Bus.
You can use the ldm create-vf
command to create all the virtual functions from the /SYS/MB/PCIE7/IOVFC.PF0
physical function.
primary# ldm create-vf -n max /SYS/MB/PCIE7/IOVFC.PF0
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF0
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF1
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF2
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF3
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF4
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF5
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF6
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF7
Example 8-20 Dynamically Creating a Fibre Channel Virtual Function and Setting Properties
This example dynamically creates a virtual function while setting the bw-percent property value to 25
and specifies the port and node WWNs.
primary# ldm create-vf port-wwn=10:00:00:14:4F:FC:00:01 \
node-wwn=20:00:00:14:4F:FC:00:01 bw-percent=25 /SYS/MB/PCIE7/IOVFC.PF0
Example 8-21 Statically Creating a Fibre Channel Virtual Function Without Setting Optional Properties
This example statically creates a virtual function without setting any optional properties. In this case, the ldm create-vf
command automatically allocates the default bandwidth percentage, port world-wide name (WWN), and node WWN values.
First you initiate a delayed reconfiguration on the rootdom1
domain. Then, enable I/O virtualization on the pci_1
PCIe bus. Because the pci_1
bus has already been assigned to the rootdom1
root domain, use the ldm set-io
command to enable I/O virtualization.
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 set-io iov=on pci_1
Now, you can use the ldm create-vf
command to create all the virtual functions from the /SYS/MB/PCIE7/IOVFC.PF0
physical function.
primary# ldm create-vf -n max /SYS/MB/PCIE7/IOVFC.PF0
------------------------------------------------------------------------------
Notice: The rootdom1 domain is in the process of a delayed reconfiguration.
Any changes made to the rootdom1 domain will only take effect after it reboots.
------------------------------------------------------------------------------
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF0
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF1
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF2
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF3
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF4
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF5
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF6
Created new vf: /SYS/MB/PCIE7/IOVFC.PF0.VF7
Finally, reboot the rootdom1
root domain to make the changes take effect in one of the following ways:
-
rootdom1
is a non-primary
root domainprimary# ldm stop-domain -r rootdom1
-
rootdom1
is theprimary
domainprimary# shutdown -i6 -g0 -y