User Manual
Driver FeaturesRev 2.0-3.0.0
Mellanox Technologies
94
vm1 pkey index 0 will be mapped to physical pkey-index 1, and vm2 pkey index 0
will be mapped to physical pkey index 2. Both vm1 and vm2 will have their pkey
index 1 mapped to the default pkey.
Step d. On Host2 do the following.
Step e. Once the VMs are running, you can check the VM's virtualized PKey table by doing (on the
vm).
Step 3.
Start up the VMs (and bind VFs to them).
Step 4. Configure IP addresses for ib0 on the host and on the guests.
4.13.7.3 Ethernet Virtual Function Configuration when Running SR-IOV
4.13.7.3.1VLAN Guest Tagging (VGT) and VLAN Switch Tagging (VST)
When running ETH ports on VFs, the ports may be configured to simply pass through packets as
is from VFs (Vlan Guest Tagging), or the administrator may configure the Hypervisor to silently
force packets to be associated with a VLan/Qos (Vlan Switch Tagging).
In the latter case, untagged or priority-tagged outgoing packets from the guest will have the
VLAN tag inserted, and incoming packets will have the VLAN tag removed. Any vlan-tagged
packets sent by the VF are silently dropped. The default behavior is VGT.
The feature may be controlled on the Hypervisor from userspace via iprout2 / netlink:
use:
•where
NUM = 0..max-vf-num
• vlan_id = 0..4095 (4095 means "set VGT")
•qos =
0..7
For example:
•
ip link set dev eth2 vf 2 qos 3 - sets VST mode for VF #2 belonging to PF eth2,
with qos = 3
•
ip link set dev eth2 vf 4095 - sets mode for VF 2 back to VGT
cd /sys/class/infiniband/mlx4_0/iov
echo 0 > 0000:03:00.1/ports/1/pkey_idx/1
echo 1 > 0000:03:00.1/ports/1/pkey_idx/0
echo 0 > 0000:03:00.2/ports/1/pkey_idx/1
echo 2 > 0000:03:00.2/ports/1/pkey_idx/0
cat /sys/class/infiniband/mlx4_0/ports/[1,2]/pkeys/[0,1]
ip link set { dev DEVICE | group DEVGROUP } [ { up | down } ]
...
[ vf NUM [ mac LLADDR ]
[ vlan VLANID [ qos VLAN-QOS ] ]
...
[ spoofchk { on | off} ] ]
...
ip link set dev <PF device> vf <NUM> vlan <vlan_id> [qos <qos>]