Configuring SR-IOV for the MZ510
Enable SR-IOV in the Emulex BIOS and configure SR-IOV parameters in the OS.
The following describes how to enable and configure SR-IOV in SLES 11.
- Access the Emulex BIOS, and enable SR-IOV.
Before using the SR-IOV function on the MZ510, disable UMC.
- Log in to the OS, and add the following information to the menu.lst file in /boot/grub/:
intel_iommu=on
- Uninstall the be2net driver, reload it, and specify the number of VFs.
#rmmod be2net #modprobe be2net num_vfs=[value]
The value of [value] is the number of VFs of each PF. The maximum value is 28.
- Run the lspci -vvv command to view the configuration result. You can view the PF of the VFs, as shown in Figure 4-84.
#lspci –vvv
Run the ifconfig -a command. You can view that each VF is displayed as eth[num], as shown in Figure 4-85.
- Configure a MAC address for a VF by running the following command:
#ip link set eth[num] VF [VF num] mac [MAC address]
The eth[num] parameter indicates the PF port number, that is, the number of the physical port. The [VF num] parameter indicates the VF number. For example:
#ip link set eth13 vf 0 mac 00:11:22:33:44:50
When a VF is generated, the driver randomly generates an MAC address for the VF based on the MAC address of the physical port. Therefore, you can view the MAC address of each eth[num] even if you do not configure any MAC address for a VF.
- Configure the VLAN for a VF.
Each VF supports two types of VLANs: transparent VLAN tagging and virtual guest tagging.
Transparent VLAN tagging: A VF adds a VLAN tag to packets, equivalent to PVID. The VM (OS) does not detect the VLAN tag. The VF adds a PVID to the packets sent from a VM and then forwards the packets. If the VF receives packets with a VLAN tag containing a PVID, it removes the VLAN tag and then sends the packets to the VM. You can run the following command to configure transparent VLAN tagging:
#ip link set eth[num] vf [VF num] vlan [VLAN ID]
Virtual guest tagging: The VF does not process the VLAN tags and transparently transmits packets. The VM (OS) sets a VLAN tag for packets. You can run the following command to configure the virtual guest tagging:
#ip link set eth[num] vf [VF num] vlan 4095
Each VF can be configured with only one VLAN ID.