User Manual

Rev 2.2-1.0.1
Mellanox Technologies
127
The feature may be controlled on the Hypervisor from userspace via iprout2 / netlink:
ip link set { dev DEVICE | group DEVGROUP } [ { up | down } ]
...
[ vf NUM [ mac LLADDR ]
[ vlan VLANID [ qos VLAN-QOS ] ]
...
[ spoofchk { on | off} ] ]
...
use:
ip link set dev <PF device> vf <NUM> vlan <vlan_id> [qos <qos>]
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 2 4095 - sets mode for VF 2 back to VGT
4.15.6.3.2Additional Ethernet VF Configuration Options
Guest MAC configuration
By default, guest MAC addresses are configured to be all zeroes. In the mlnx_ofed guest driver,
if a guest sees a zero MAC, it generates a random MAC address for itself. If the administrator
wishes the guest to always start up with the same MAC, he/she should configure guest MACs
before the guest driver comes up.
The guest MAC may be configured by using:
ip link set <PF device> vf <NUM> mac <LLADDR>
For legacy guests, which do not generate random MACs, the adminstrator should always con-
figure their MAC addresses via ip link, as above.
Spoof checking
Spoof checking is currently available only on upstream kernels newer than 3.1.
ip link set dev <PF device> vf <NUM> spoofchk [on | off]
4.15.6.3.3Mapping VFs to Ports
To view the VFs mapping to ports:
Using the ip link tool v2.6.34~3 and above.
ip link
The output is as following:
61: p1p1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group
default qlen 1000
link/ether 00:02:c9:f1:72:e0 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 00:00:00:00:00:00, vlan 4095, spoof checking off, link-state auto
vf 37 MAC 00:00:00:00:00:00, vlan 4095, spoof checking off, link-state auto
vf 38 MAC ff:ff:ff:ff:ff:ff, vlan 65535, spoof checking off, link-state disable
vf 39 MAC ff:ff:ff:ff:ff:ff, vlan 65535, spoof checking off, link-state disable