[systemd-devel] Network Interface Names: solution for a desktop OS

Andrei Borzenkov arvidjaar at gmail.com
Wed Apr 13 03:39:56 UTC 2016


13.04.2016 02:24, Jordan Hargrave пишет:
> 
> I am the primary developer of biosdevname.  I've been wanting this
> naming functionality built into systemd or even the OS itself.
> Primarily I am interested in servers with multiple physical and
> virtual NICs but getting it working on desktops would be a bonus as
> well.
> 
> The problem lies in the mapping itself.  Network devices can be on a
> single, dual, or even quad-port cards.  Each one of these ports can be
> 'virtualized' through SR-IOV or NIC partitioning, one physical card
> can potentially have hundreds of virtual NICs.  Other cards implement
> multiple network interfaces for a single PCI bus:dev:func pair.
> SMBIOS table has a mapping from slot number to PCI device, this can be
> used to determine the physical slot number of a network card (and its
> ports).
> 
> So there are at least 4 variables that you must keep track of, for add-in cards
> 
> PCI slot #
> NIC physical port # (for multi-port cards)
> NIC device ID (Each physical port can implement multiple network
> devices)  see mlx4 driver or i.
> NIC partition number (each device can then have multiple
> partitions/virtual devices)  See. SR-IOV or Dell NPAR (network
> partitioning)
> 
> For embedded devices (onboard), PCI slot # is replaced by instance
> number.  This is also available through SMBIOS.

Yes. And I do not see how all this information is expected to be stuffed
into 14 characters available for interface name, or even less if we
account to VLAN numbers.

I am not aware of any OS that tries to do it. All of them maintain
persistent association between interface names and hardware
characteristics; most use physical topology, but this is not really
mandatory. Interface names themselves are usually allocated on the first
come first serve basis. This gives reasonable behavior for small systems
(where existing interface will always get the same name irrespectively
of how it is connected) and stable names for large systems.

That is what we used in the past as well in form of udev rules. And any
answer "but you can easily disable predictable names" is hypocritical
because the whole infrastructure to maintain such name database was
ripped out, so anyone who disables predictable names is forced to
reinvent the wheel and reimplement it. Which by far exceeds what average
user is capable of. So average user simply has no choice.


More information about the systemd-devel mailing list