mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
6bc04997b6eab35d1cb9fa73889892702c27be09
NPAR is a technology that allows a single network interface to be divided into number of partitions. The partitions show up as functions on the same PCI device... when there are more than 8 functions, ARI (alternative routing-ID interpretation) is used. With ARI is enabled, the 8 bit field that normally has 5 bits for the PCI device and 3 bits for the PCI function is instead interpreted as (implicit) device 0, with 8 bits for the function number. Because the linux kernel exposes the PCI device/function numbers to userspace the same regardless of whether ARI is enabled, systemd predictable device naming can generate unpredictable names in this case, because network names using the PCI slot use the function number, but not the device number, causing systemd to generate the same name for mulitple network devices (so some will revert to the "ethX" names). With this patch, device naming code checks if ARI is enabled for a PCI network device, and uses the full 8-bit function number for naming to avoid this situation. This should improve readability and predictability of device names. Here is an example of how this change would affect naming: before patch | after patch ----------------------------- ens2f0 | ens2f0 NPAR partition 0 (in PCI slot 2) ens2f1 | ens2f1 NPAR partition 1 ... ens2f7 | ens2f7 NPAR partition 7 eth1 | ens2f8 NPAR partition 8 eth2 | ens2f9 NPAR partition 9
…
systemd - System and Service Manager
Details
General information about systemd can be found in the systemd Wiki.
Information about build requirements are provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the HACKING file for information how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Description
Languages
C
89%
Python
5.1%
Shell
4.5%
Meson
1.2%