5

Similar to https://askubuntu.com/questions/760196/why-is-enps-in-stead-of-eth-whats-the-meaning-of-enps

But what f# stands for in enp#s#f# interface name format?

Wiki states only this, not mentioning f: Adapters in the specified PCI slot, with slot index number on the adapter enp<PCI slot>s<card index no>, similar here https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

simPod
  • 175

1 Answers1

7

The f is for "function indexes".

en = ethernet
p# = PCI bus number
s# = slot number
f# = function index

Added some resources: libvirt.org has a good explanation

waste.org says this about "f":

All devices have at least 1 function, function #0. There are 8 possible functions per device, numbered 0-7. Any device that has more than 1 function is called a multi-function device. Multi-function devices, such as a combination modem+soundcard will usually have 2 uniquely addressable functions, numbered 0 and 1.

The function leads to the vendor and device id:

Every function of a device has 256 eight-bit registers. Registers 0-3F are defined by the PCI specification and provide a wealth of information about the particular function. Registers 40-FF are vendor defined and control the properties of the function itself. Without vendor specific documentation, these registers should probably be left untouched.

  • Registers 0 and 1 are defined by the PCI spec as being the vendor ID. The vendor ID is a 16bit value.
  • Registers 2 and 3 are the device ID

From pbhj's link in comments it leads to the source code:

Line 264+:

if (sscanf(sysname, "%x:%x:%x.%u", &domain, &bus, &slot, &func) != 4)
            return -ENOENT;

if (naming_scheme_has(NAMING_NPAR_ARI) && is_pci_ari_enabled(names->pcidev)) /* ARI devices support up to 256 functions on a single device ("slot"), and interpret the * traditional 5-bit slot and 3-bit function number as a single 8-bit function number, * where the slot makes up the upper 5 bits. / func += slot 8;

Rinzwind
  • 309,379