Score:2

RHEL8: How to use UDEV to set SR-IOV VF Interface name

cn flag

The SR-IOV VF is persisted over boot with

nmcli connection modify <PF> sriov.total-vfs 3
nmcli connection modify <PF> connection.autoconnect true

Then it would create VF interface names like <PF>v0-v2.

I would like to change that and tried to follow this RHEL link by setting UDEV rules with the matching MAC address (chapter 1.6) but not working, seems the MAC address that UDEV sees is not the same as what has been set later after boot. In fact, in /var/log/messages during bootup the VF MAC addresses are always random so cannot use it as the criteria to set the interface name.

Any other way to set the VF interface name during startup? even not using UDEV?

Score:1
cn flag

Just figured it out, do not use MAC address as criteria, use VF PCI address instead, also using systemd.link instead:

cat /etc/systemd/network/70-custom-ifnames-1.link
[Match]
Path=pci-<PCI address>

[Link]
Name=<new name>
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.