[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
Release Notes for Ubuntu
Canonical Foundations Team
The Ubuntu-power-systems project
Breno Leitão
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
Manoj Iyer (manjo) on 2017-06-01
tags: added: ubuntu-17.04
Manoj Iyer (manjo) on 2017-07-19
Changed in ubuntu-docs (Ubuntu):
importance: Undecided → Low
Changed in ubuntu-power-systems:
importance: Undecided → Low
Manoj Iyer (manjo) on 2017-07-19
Changed in ubuntu-release-notes:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
Manoj Iyer (manjo) on 2017-07-31
Changed in ubuntu-docs (Ubuntu):
status: Incomplete → Invalid
Changed in ubuntu-release-notes:
assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Canonical Foundations Team (canonical-foundations)
tags: added: triage-g
Manoj Iyer (manjo) on 2017-09-11
tags: added: triage-a
removed: triage-g
Steve Langasek (vorlon) wrote :

I don't find this request very clear. Several questions:
 - What release are you seeking to have this release noted for? tags suggest 17.04 or 17.10 or both, but neither of these are LTS releases, so I have to question whether the tags are correct.
 - Is the lack of persistent mac addresses a problem with the kernel driver? With the underlying hardware?
 - In what environment should we expect to see this problem? Is it POWER-specific?
 - The workaround suggested appears to be a one-off change, that would still not persist across reboots of the system (or perhaps the state persists within the VM, but would not persist across a cold boot). Have I understood correctly? If so, this does not seem like a complete workaround that warrants recommending to users in the release notes.
 - Why is this being suggested as a release notes change, instead of a request for a fix in the implementation?

Changed in ubuntu-release-notes:
status: New → Incomplete
Frank Heimes (fheimes) on 2017-09-21
Changed in ubuntu-power-systems:
status: New → Incomplete
Manoj Iyer (manjo) wrote :


Could you please help answer Steve's questions ?

Changed in ubuntu-power-systems:
assignee: nobody → Breno Leitão (breno-leitao)
Manoj Iyer (manjo) on 2017-10-02
tags: added: triage-g
removed: triage-a
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2017-12-04 11:28 EDT-------
Since we are not seeing update on this bug, and neither I or Carol knows where this bug should go, I am rejecting/closing it.

Andrew Cloke (andrew-cloke) wrote :

Thanks Breno. I'll close out the LP bug.

Changed in ubuntu-power-systems:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers