[SR-IOV]: Use static MAC addresses with udev rules for renaming VF interfaces (Mellanox CX4) (Documentation)

Bug #1689616 reported by bugproxy on 2017-05-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
ubuntu-docs (Ubuntu)
Ubuntu on IBM Power Systems Bug Triage

Bug Description

Problem Description
The udev rules for renaming the SR-IOV Mellanox CX4 VF interface are not getting
implemented. After setting the udev rules, and unbind/bind the drivers for the VF's,
the interface name still doesn't change. Same issue isn't noticed for the PF of the
SR-IOV adapter.

Use static MAC addresses for renaming SRIOV Mellanox CX4 VF interfaces with udev rules.

With Mellanox CX4 SR-IOV when the VFs are created, each of them will get a random MAC address.
To be able to use the '70-persistent-net.rules' to define interfaces based on MAC Address, one need
to set static MAC address to the VF.

This is an example
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="02:a9:bb:cc:dd:00", NAME="enP4p1s0vf"

First execute below command
echo 02:a9:bb:cc:dd:00 > /sys/class/infiniband/mlx5_0/device/sriov/0/mac

and then
do the unbind/bind
echo 0004:01:00.2 > /sys/bus/pci/drivers/mlx5_core/unbind
echo 0004:01:00.2 > /sys/bus/pci/drivers/mlx5_core/bind

then one can see
enP4p1s0vf: flags=4098<BROADCAST,MULTICAST> mtu 1500
        ether 02:a9:bb:cc:dd:00 txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

bugproxy (bugproxy) on 2017-05-09
tags: added: architecture-ppc64le bugnameltc-153427 severity-low targetmilestone-inin1710
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: ubuntu → ubuntu-docs (Ubuntu)

------- Comment From <email address hidden> 2017-05-09 14:14 EDT-------
Hello Canonical,

Please include above documentation text for using static MAC addresses
for renaming SR-IOV Mellanox CX4 VF interfaces with udev rules.

Gunnar Hjalmarsson (gunnarhj) wrote :

ubuntu-docs is a package for the desktop documentation, and this issue is apparently not related to that. Which set of docs is it you would like to see updated?

Changed in ubuntu-docs (Ubuntu):
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers