类似于https://askubuntu.com/questions/760196/why-is-enps-in-stead-of-eth-whats-the-meaning-of-enps
但是f#
代表在enp#s#f#
接口名称格式?
Wiki仅说明这一点,未提及f
:
Adapters in the specified PCI slot, with slot index number on the adapter enp<PCI slot>s<card index no>
,此处类似https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
f 用于“函数索引”。
en = ethernet
p# = PCI bus number
s# = slot number
f# = function index
Run Code Online (Sandbox Code Playgroud)
添加了一些资源:libvirt.org有很好的解释
所有设备至少有 1 个功能,功能 #0。每个设备有 8 个可能的功能,编号为 0-7。任何具有超过 1 个功能的设备都称为多功能设备。多功能设备,例如调制解调器+声卡的组合,通常有 2 个唯一可寻址的功能,编号为 0 和 1。
该函数导致供应商和设备 ID:
设备的每个功能都有 256 个八位寄存器。寄存器 0-3F 由 PCI 规范定义,并提供有关特定功能的大量信息。寄存器 40-FF 是供应商定义的并控制函数本身的属性。如果没有供应商特定的文档,这些寄存器可能应该保持不变。
- 寄存器 0 和 1 由 PCI 规范定义为供应商 ID。供应商 ID 是一个 16 位值。
- 寄存器 2 和 3 是设备 ID
从 pbhj 在评论中的链接,它指向源代码:
第 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;
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1420 次 |
最近记录: |