Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More predictable network interface names for PCI(e) devices #2811

Closed
1 of 2 tasks
jclehner opened this issue Mar 8, 2016 · 3 comments
Closed
1 of 2 tasks

More predictable network interface names for PCI(e) devices #2811

jclehner opened this issue Mar 8, 2016 · 3 comments
Labels
predictable-ifnames RFE 🎁 Request for Enhancement, i.e. a feature request udev

Comments

@jclehner
Copy link

jclehner commented Mar 8, 2016

Submission type

  • Bug report
  • Request for enhancement (RFE)

Used distribution

Ubuntu 15.10

Bugreport

I recently removed the GPU from my system, and noticed that my network interface names changed (enp4s1 -> enp3s1 and enp6s0 -> enp5s0 in my case). I know I'm late to the game, since this issue is similar to #563 but I'm also proposing a portable solution.

This is my pci configuration with a dedicated GPU (network interfaces enp4s1 and enp6s0):

$ lspci -vtnn
-[0000:00]-+-00.0  Intel Corporation Sky Lake Host Bridge/DRAM Registers [8086:191f]
           +-01.0-[01]----00.0  NVIDIA Corporation G84 [GeForce 8600 GTS] [10de:0400]
           +-02.0  Intel Corporation Sky Lake Integrated Graphics [8086:1912]
           +-14.0  Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller [8086:a12f]
           +-14.2  Intel Corporation Sunrise Point-H Thermal subsystem [8086:a131]
           +-16.0  Intel Corporation Sunrise Point-H CSME HECI #1 [8086:a13a]
           +-17.0  Intel Corporation Sunrise Point-H SATA controller [AHCI mode] [8086:a102]
           +-1b.0-[02]--
           +-1b.2-[03-04]----00.0-[04]--+-00.0  Promise Technology, Inc. PDC20267 (FastTrak100/Ultra100) [105a:4d30]
           |                            \-01.0  Realtek Semiconductor Co., Ltd. RTL8169 PCI Gigabit Ethernet Controller [10ec:8169]
           +-1c.0-[05]----00.0  ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller [1b21:1242]
           +-1c.3-[06]----00.0  Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168]
           +-1c.4-[07]--
           +-1d.0-[08]--
           +-1d.4-[09]--
           +-1f.0  Intel Corporation Sunrise Point-H LPC Controller [8086:a145]
           +-1f.2  Intel Corporation Sunrise Point-H PMC [8086:a121]
           +-1f.3  Intel Corporation Sunrise Point-H HD Audio [8086:a170]
           \-1f.4  Intel Corporation Sunrise Point-H SMBus [8086:a123]

And this is the same configuration with the dedicated GPU removed (enp3s1 and enp5s0):

$ lspci -vtnn
-[0000:00]-+-00.0  Intel Corporation Sky Lake Host Bridge/DRAM Registers [8086:191f]
           +-02.0  Intel Corporation Sky Lake Integrated Graphics [8086:1912]
           +-14.0  Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller [8086:a12f]
           +-14.2  Intel Corporation Sunrise Point-H Thermal subsystem [8086:a131]
           +-16.0  Intel Corporation Sunrise Point-H CSME HECI #1 [8086:a13a]
           +-17.0  Intel Corporation Sunrise Point-H SATA controller [AHCI mode] [8086:a102]
           +-1b.0-[01]--
           +-1b.2-[02-03]----00.0-[03]--+-00.0  Promise Technology, Inc. PDC20267 (FastTrak100/Ultra100) [105a:4d30]
           |                            \-01.0  Realtek Semiconductor Co., Ltd. RTL8169 PCI Gigabit Ethernet Controller [10ec:8169]
           +-1c.0-[04]----00.0  ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller [1b21:1242]
           +-1c.3-[05]----00.0  Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168]
           +-1c.4-[06]--
           +-1d.0-[07]--
           +-1d.4-[08]--
           +-1f.0  Intel Corporation Sunrise Point-H LPC Controller [8086:a145]
           +-1f.2  Intel Corporation Sunrise Point-H PMC [8086:a121]
           +-1f.3  Intel Corporation Sunrise Point-H HD Audio [8086:a170]
           \-1f.4  Intel Corporation Sunrise Point-H SMBus [8086:a123]

As is obvious from the lspci output, the bus numbers of all devices are shifted by 1 if the dedicated GPU is installed, thus explaining the changed interface names. One thing however remains constant: the BDF of the PCI root ports: 00:1c.4 for enp{5,6}s0, and 00:1b.2 for enp{3,4}s1, so my proposal is this:

If the interface names used some form of notation relative to their respective PCI root ports, wouldn't this be a more elegant solution (aside from the resulting interface name that is, but heh, it's more predictable)? For example, enr28f4p0s0 could be used to denote a network interface behind the PCI root port with slot 28 (==0x1c) and function 4. The p0 part in this case is to be interpreted relative to the bridge's secondary bus, i.e. if the bridge is configured with a secondary bus of 5, r28f4p0 is the same as p5.

Please comment.

Regards
Joseph

@poettering poettering added udev RFE 🎁 Request for Enhancement, i.e. a feature request labels Apr 15, 2016
@poettering
Copy link
Member

@teg?

@kalvdans
Copy link

I have a similar case as @jclehner. With CAN adapter in a PCIe slot bumps the bus numbers of the two network devices one step.

           +-1b.0-[02]----00.0  IXXAT Automation GmbH Device [1bee:0002]
           +-1c.0-[03]----00.0  Aquantia Corp. Device [1d6a:00b1]
           +-1d.0-[04]----00.0  Intel Corporation I210 Gigabit Network Connection [8086:1533]

Without can adapter:

           +-1c.0-[02]----00.0  Aquantia Corp. Device [1d6a:00b1]
           +-1d.0-[03]----00.0  Intel Corporation I210 Gigabit Network Connection [8086:1533]

biosdevname gives deterministic names p4p1 and p8p1 but I rather not depend on bios for the naming.

@poettering
Copy link
Member

Let's close this. The bug is 7 years old, and this is not really actionable to us anyway: if firmware re-numerates supposedly stable slot ids, there's nothing we can do. please complain to manufacturer.

sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
predictable-ifnames RFE 🎁 Request for Enhancement, i.e. a feature request udev
Development

No branches or pull requests

3 participants