3 Replies Latest reply on Nov 4, 2011 1:57 PM by Patrick_Kutch

    Persistent eth names with SR-IOV


      Hi everybody,

      I have a ubuntu box with a dual-port 82599EB card, so I have two Physical Functions shown up. Each PF spawns 10 VFs.


      One of the applications I am running, bases things on persistent network interface names.


      I would like to know whether there is a way to ensure persistent naming of the PFs across reboots, like "eth2" and "eth3".

      Sometimes, eth3 comes up as eth23-eth3 and so on.


      I have a udev rule that is supposed to give persistent names based on MAC address:

      # PCI device 0x8086:0x10fb (ixgbe)
      SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",  ATTR{address}=="00:1b:21:a3:bf:40", ATTR{dev_id}=="0x0",  ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

      # PCI device 0x8086:0x10fb (ixgbe)
      SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:a3:bf:41", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"

      However, for some reason, this doesn't work.

      What is happening, I believe, that PFs and VFs are being discovered concurrently. So if a VF is discovered before the second PF, it takes its name (say eth3). Later, when the second PF is discovered, it cannot receive the same name, so it generates a name like ethXX-eth3.


      I tried to put a udev rule to give persistent names based on PCI addresses of the PFs:

      ACTION=="add", SUBSYSTEM=="net", BUS=="pci", ID=="0000:03:00.0", NAME="eth2"
      ACTION=="add", SUBSYSTEM=="net", BUS=="pci", ID=="0000:03:00.1", NAME="eth3

      But this did not work also. Sometimes, after a reboot, names still get messed up.


      Any help is appeciated.