Bug 291431 - order in /sys/class/net/eth is backwards from /sys/bus/pci/devices
order in /sys/class/net/eth is backwards from /sys/bus/pci/devices
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-09-14 14:27 EDT by John Reiser
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-19 15:56:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Reiser 2007-09-14 14:27:04 EDT
Description of problem: The order of devices in /sys/class/net/eth is backwards
from the order in /sys/bus/pci/devices.  This causes needless confusion.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.ls -l /sys/class/net/eth*/device
Actual results:
lrwxrwxrwx 1 root root 0 2007-09-14 10:43 /sys/class/net/eth0/device ->
lrwxrwxrwx 1 root root 0 2007-09-14 10:43 /sys/class/net/eth1/device ->
lrwxrwxrwx 1 root root 0 2007-09-14 10:43 /sys/class/net/eth2/device ->
lrwxrwxrwx 1 root root 0 2007-09-14 10:43 /sys/class/net/eth3/device ->

Notice that eth* order is 0,1,2,3 while device order is 01:{09,08,07}, 00:0a. 
This is backwards.

Expected results: Order of eth* is the same as device order.  In this case:
  eth0 -> 00:0a
  eth1 -> 01:07
  eth2 -> 01:08
  eth3 -> 01:09

Additional info:
Comment 1 Dave Jones 2007-09-19 15:56:23 EDT
I don't think there's an easy way to fix this.

The problem is that PCI device probing isn't predictable (which is why unless
you use HWADDR to bind ethN names to NICs, eth0 could be a different device
depending on the order in which the devices get probed).

If this was to change however, it'd likely need fairly involved changes that
should really be done upstream rather than in Fedora.  netdev@vger.kernel.org is
probably a much better place to ask.

Note You need to log in before you can comment on or make changes to this bug.