Bug 1673321

Summary: [RFE] Allow to match network devices by PCI Address
Product: Red Hat Enterprise Linux 8 Reporter: Till Maas <till>
Component: NetworkManagerAssignee: Thomas Haller <thaller>
Status: NEW --- QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: atragler, bgalvani, fgiudici, lrintel, rkhan, sukulkar, thaller
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1723391 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 1695634, 1723391    

Description Till Maas 2019-02-07 11:29:40 UTC
Description of problem:
Currently, NetworkManager only allows to specify devices by name or MAC address. Since the device name is not stable and the MAC address requires an inventory about which MAC addresses are used, it would be nice to be able to specify a network card by PCI address, i.e. 0000:00:1f.6.

Additional info:
This could be implemented by a match setting that already exists for interface-name but not yet for PCI ID.

Comment 1 Thomas Haller 2019-02-07 11:38:10 UTC
do you know how to obtain the PCI address?

Comment 2 Thomas Haller 2019-02-07 11:56:43 UTC
there is:

 - grep PCI_SLOT_NAME /sys/class/net/*/device/uevent

 - ethtool -i eth0
     - which uses ETHTOOL_GDRVINFO and "struct ethtool_drvinfo"

 - udevadm info -a -p /sys/class/net/eth0

 - sudo lshw -c network -businfo  

 - lspci -D 

 - udevadm info /sys/class/net/eth0 

Note in `man systemd.link` there is:

           A whitespace-separated list of shell-style globs matching the persistent path, as exposed by the udev property "ID_PATH".


  $ udevadm info /sys/class/net/eth0 | grep ID_PATH=

So, we probably want to implement this udev "path".