Users Guide

7–RoCE Configuration
Configuring RoCE on the Adapter for Linux
162 AH0054602-00 M
vf 1 MAC 00:00:00:00:00:00, spoof checking off, link-state auto
2. Assign the static MAC address:
# ip link set dev p6p1 vf 0 mac 3c:33:44:55:66:77
# ip link set dev p6p1 vf 1 mac 3c:33:44:55:66:89
#ip link show
14: p6p1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default
qlen 1000
link/ether 14:02:ec:ce:d0:e4 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 3c:33:44:55:66:77, tx rate 25000 (Mbps), max_tx_rate 25000Mbps, spoof checking off,
link-state auto
vf 1 MAC 3c:33:44:55:66:89, tx rate 25000 (Mbps), max_tx_rate 25000Mbps, spoof checking off,
link-state auto
3. To reflect for RDMA, load/unload the qedr driver if it is already loaded.
#rmmod qedr
#modprobe qedr
#ibv_devices
device node GUID
------ ----------------
qedr0 1602ecfffeced0e4
qedr1 1602ecfffeced0e5
qedr_vf0 3e3344fffe556677
qedr_vf1 3e3344fffe556689
Dynamic or Random VF MAC Allocation
To dynamically allocate a VF MAC:
# modprobe -r qedr
# modprobe -v qed vf_mac_origin=3 [Use this module parameter for dynamic
MAC allocation]
# modprobe -v qede
# echo 2 > /sys/class/net/p6p1/device/sriov_numvfs
# modprobe qedr (This is an optional, mostly qedr driver loads
itself)
# ip link show|grep vf
vf 0 MAC ba:1a:ad:08:89:00, tx rate 25000 (Mbps), max_tx_rate
25000Mbps, spoof checking off, link-state auto
vf 1 MAC 96:40:61:49:cd:68, tx rate 25000 (Mbps), max_tx_rate
25000Mbps, spoof checking off, link-state auto
# lsmod |grep qedr
# ibv_devices