[systemd-devel] on the default for PredictableNetworkInterfaceNames

Greg KH gregkh at linuxfoundation.org
Mon Apr 11 20:19:33 UTC 2016


On Mon, Apr 11, 2016 at 07:59:30PM +0200, Xen wrote:
> Greg KH schreef op 11-04-16 15:42:
> > On Mon, Apr 11, 2016 at 11:56:00AM +0200, Xen wrote:
> >> The predictability issue seems to be due to using a MAC address.
> >>
> >> AFAIK a reinstall will not change PCI bus devices etc.
> > 
> > No, PCI device numbers change all the time, they are not guaranteed to
> > be stable at all.  Yes, lots of machines do not have them change, but a
> > non-small number do.  Most of the time they change only if you have
> > changed a PCI device (which includes thunderbolt and docking stations,
> > quite common these days), or when you update your BIOS, but my favorite
> > machine would renumber the whole bus every other boot for no good reason
> > at all.
> > 
> > So don't think of PCI bus numbers as static, they aren't, sorry.
> 
> That implies that the whole PCI addressing is not something you can
> depend on to begin with. I'm sorry, from their inclusion in the mapping
> feature, I assumed that it would be something dependable. You basically
> say that even on a single machine, that whole feature might not work
> reliably, and hence should not be used.
> 
> However, this currently confuses me because my own ethernet device is
> numbered by biosdev according to "PCI geographical location".
> 
> Maybe that is not a bus number, but:
> 
> [P<domain>]p<bus>s<slot>[f<function>][d<dev_port>]
> 
> My device is enp3s0, which implies 3rd bus number, which it indeed is:
> 
> E: ID_PATH=pci-0000:03:00.0
> 
> Are you telling me there are systems where this is not guaranteed to be
> stable?

Yes, including your own.

> Maybe these two numbers are coincidentally the same and not
> related. It's an onboard chip (as most) and so not really geograpically
> located.

Put a new PCI device in your system, or boot it in a docking station, or
plug in some thunderbolt devices before booting and then look at this
number.

But, it's the best that the system can do, as obviously your bios does
not provide a slot name for the PCI device, otherwise the naming scheme
would have picked that.

Go file a bug for your laptop manufacturer to properly provide the
needed PCI slot number, and then your id will not change.

> In all of the examples though, this is not a coincidence and these
> numbers are identical. This PCI path is used for the biosdev name.
> 
> You are saying it is not stable?

Yes, see above.

The naming scheme starts with the most stable thing it can find and
works downward.  PCI ids are usually "good enough" for almost everyone,
like you are seeing on your system.  But they do change, which is why
most sane BIOSes provide PCI slot information, as those correspond
directly to the hardware location in the system.

thanks,

greg k-h


More information about the systemd-devel mailing list