<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 15 Aug 2024 at 14:46, Silvio Knizek <<a href="mailto:killermoehre@gmx.net">killermoehre@gmx.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am Donnerstag, dem 15.08.2024 um 14:07 +0100 schrieb Henti Smith:<br>
> Hello again. <br>
> <br>
> I've tried multiple ways of matching and none seem to be working. <br>
> <br>
> I removed all the configuration in /etc/systemd/network, run update-initramfs and rebooted. <br>
> <br>
> The resulting network configuration for the marvell devices was:<br>
> root@av20-mvc-01:~# udevadm info /sys/class/net/eno2<br>
> P: /devices/pci0000:00/0000:00:10.0/0000:05:00.0/net/eno2<br>
> L: 0<br>
> E: DEVPATH=/devices/pci0000:00/0000:00:10.0/0000:05:00.0/net/eno2<br>
> E: INTERFACE=eno2<br>
> E: IFINDEX=4<br>
> E: SUBSYSTEM=net<br>
> E: USEC_INITIALIZED=9048059<br>
> E: ID_NET_NAMING_SCHEME=v245<br>
> E: ID_NET_NAME_MAC=enx02000000000b<br>
> E: ID_NET_NAME_ONBOARD=eno2<br>
> E: ID_NET_LABEL_ONBOARD=Onboard ETHERNET Controller<br>
> E: ID_NET_NAME_PATH=enp5s0<br>
> E: ID_BUS=pci<br>
> E: ID_VENDOR_ID=0x11ab<br>
> E: ID_MODEL_ID=0x0f13<br>
> E: ID_PCI_CLASS_FROM_DATABASE=Network controller<br>
> E: ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller<br>
> E: ID_VENDOR_FROM_DATABASE=Marvell Technology Group Ltd.<br>
> E: ID_PATH=pci-0000:05:00.0<br>
> E: ID_PATH_TAG=pci-0000_05_00_0<br>
> E: ID_NET_DRIVER=oak<br>
> E: ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link<br>
> E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/eno2<br>
> E: TAGS=:systemd:<br>
> <br>
> and:<br>
> root@av20-mvc-01:~# udevadm info /sys/class/net/enp6s0 <br>
> P: /devices/pci0000:00/0000:00:11.0/0000:06:00.0/net/enp6s0<br>
> L: 0<br>
> E: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:06:00.0/net/enp6s0<br>
> E: INTERFACE=enp6s0<br>
> E: IFINDEX=5<br>
> E: SUBSYSTEM=net<br>
> E: USEC_INITIALIZED=9004147<br>
> E: ID_NET_NAMING_SCHEME=v245<br>
> E: ID_NET_NAME_MAC=enx02000000000c<br>
> E: ID_NET_NAME_PATH=enp6s0<br>
> E: ID_BUS=pci<br>
> E: ID_VENDOR_ID=0x11ab<br>
> E: ID_MODEL_ID=0x0f13<br>
> E: ID_PCI_CLASS_FROM_DATABASE=Network controller<br>
> E: ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller<br>
> E: ID_VENDOR_FROM_DATABASE=Marvell Technology Group Ltd.<br>
> E: ID_PATH=pci-0000:06:00.0<br>
> E: ID_PATH_TAG=pci-0000_06_00_0<br>
> E: ID_NET_DRIVER=oak<br>
> E: ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link<br>
> E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/enp6s0<br>
> E: TAGS=:systemd:<br>
> <br>
> As you can see it's generated by /usr/lib/systemd/network/99-default.link which uses OriginalName=*. <br>
> <br>
> Reading the man page the only options that can take glob matching are Path (ID_PATH), Driver (ID_NET_DRIVER), Type (DEVTYPE) and OriginalName (INTERFACE). <br>
> <br>
> ID_PATH changes when the board is connected and not, it's not usable. <br>
> ID_NET_DRIVER is the same for both. <br>
> DEVTYPE is not presented on these devices<br>
> <br>
> This only leaves INTERFACE, however the man page again states:<br>
> This cannot be used to match on names that have already been changed from userspace. Caution is advised when matching on kernel-assigned names, as they are known to be unstable between reboots.<br>
> <br>
> Which seems to mean I'm back to square one. <br>
> <br>
> I was really hoping that I could use DEVPATH to glob match on, but this seems to not be possible. the only way to match on DEVPATH is using Property. however there is no glob matching with that option. <br>
> <br>
> Having said that, I'm thinking that since you can have multiple options using Property thata ll need to match, I can possbly create four link files with the two sets of PCI and Drives matching to ensure that with or without the board two interface will match. <br>
> <br>
> I will attempt this and feed back. <br>
> <br>
> Kind regards<br>
> Henti<br>
<br>
Hi Henti,<br>
<br>
why can't you [Match] onto `Property="ID_NET_LABEL_ONBOARD=Onboard ETHERNET Controller"`? Is your systemd older than 243? Than you should really update.<br>
<br>
BR<br>
Silvio<br></blockquote><div><br></div><div>Hi Silvio, </div><div><br></div><div>I'm on systemd 245 (Ubuntu focal) and I can likely match on Property="ID_NET_LABEL_ONBOARD=Onboard ETHERNET Controller". I'll give that a test as well. <br></div><div><br></div><div>My existing config is using Path=pci-0000:05:00.0 and that works, but when I try to match on Property=Path=pci-0000:05:00.0 Driver=oak,it doesn't. this doesn't make sense to me. <br></div><div><br></div><div>I was hoping that I can have specific matches for hte PCI addresses and Drivers that I can use to match both sets of configuration with and without the hotplug board. <br></div><div><br></div><div>Henti <br></div><div></div></div></div>