Re: [systemd-devel] About stable network interface names

2017-06-10 Thread Greg KH
On Sat, Jun 10, 2017 at 09:08:17AM +0300, Andrei Borzenkov wrote:
> 09.06.2017 23:42, Martin Wilck пишет:
> > On Tue, 2017-06-06 at 21:40 +0300, Andrei Borzenkov wrote:
> >>
> >> Can device and function really change? My understanding is that
> >> device
> >> part is determined by bus physical wiring and function by PCI card
> >> design; this leaves bus as volatile run-time enumeration value.
> > 
> > For PCIe, that's only true for the "function" part.
> > https://superuser.com/questions/1060808/how-is-the-device-determined-in
> > -pci-enumeration-bus-device-function
> > 
> 
> I do not see anything there that would imply device designation is
> random. You have PCIe switch port instead of IDSEL wiring but port is
> most likely hardwired and does not change. Actually this article says
> the same
> 
> --><--
> Since each device has its own independent set of wires, the device IDs
> are essentially all hard-coded
> --><--

"essentially" does not mean "will never change".  Some BIOSes will
renumber them, some will not, as it's not a PCI requirement it can, and
will, happen.

Yes, for lots of people this will be fine and nothing will ever change,
but you can not guarantee it will never happen for all types of
machines, sorry.

That's just the nature of dynamic busses :)

good luck!

greg k-h
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] About stable network interface names

2017-06-10 Thread Andrei Borzenkov
09.06.2017 23:42, Martin Wilck пишет:
> On Tue, 2017-06-06 at 21:40 +0300, Andrei Borzenkov wrote:
>>
>> Can device and function really change? My understanding is that
>> device
>> part is determined by bus physical wiring and function by PCI card
>> design; this leaves bus as volatile run-time enumeration value.
> 
> For PCIe, that's only true for the "function" part.
> https://superuser.com/questions/1060808/how-is-the-device-determined-in
> -pci-enumeration-bus-device-function
> 

I do not see anything there that would imply device designation is
random. You have PCIe switch port instead of IDSEL wiring but port is
most likely hardwired and does not change. Actually this article says
the same

--><--
Since each device has its own independent set of wires, the device IDs
are essentially all hard-coded
--><--


> The systemd docs are a bit misleading for PCIe, as they talk about
> "physical/geographical location" for the common enp$Xs$Yf$Z scheme,
> which is actually just the BDF. The interface on my laptop is called
> enp0s31f6 although the laptop doesn't have "slot 31". (1)
> 

The reason for this scheme is to generate unique names during boot. All
this buzz about "predictability" etc is just usual marketing stuff to
better sell it.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel