Re: [systemd-devel] Updating network file during boot

2024-08-23 Thread Henti Smith
On Fri, 23 Aug 2024 at 10:44, Mantas Mikulėnas wrote: > I might be missing something, but... the systemd renaming is just another > udev rule, one in 80-net-setup-link, isn't it? Rules for the same interface > can't race with each other, they're processed linearly. (Rules for > *different* interf

Re: [systemd-devel] Updating network file during boot

2024-08-23 Thread Mantas Mikulėnas
I might be missing something, but... the systemd renaming is just another udev rule, one in 80-net-setup-link, isn't it? Rules for the same interface can't race with each other, they're processed linearly. (Rules for *different* interfaces can race but that happens regardless of the method.) Last

Re: [systemd-devel] Updating network file during boot

2024-08-23 Thread Henti Smith
On Thu, 22 Aug 2024 at 19:07, Andrei Borzenkov wrote: > On 22.08.2024 16:56, Henti Smith wrote: > > I've switched to using "Property=" as follows: > > # Fixed MAC and name for enp6s0 (Block Diagram) when debug board is > not > > plugged in > > # Renamed to mvc-sw2 by PCI Address. > >

Re: [systemd-devel] Updating network file during boot

2024-08-22 Thread Andrei Borzenkov
On 22.08.2024 16:56, Henti Smith wrote: On Thu, 22 Aug 2024 at 12:45, Andrei Borzenkov wrote: On Wed, Aug 21, 2024 at 7:12 PM Lennart Poettering wrote: Honestly, I'd really avoid mixing rename via udev rules and rename via .link files. I'd stick to .link files for this, really. All .link

Re: [systemd-devel] Updating network file during boot

2024-08-22 Thread Henti Smith
On Thu, 22 Aug 2024 at 12:45, Andrei Borzenkov wrote: > On Wed, Aug 21, 2024 at 7:12 PM Lennart Poettering > wrote: > > > Honestly, I'd really avoid mixing rename via udev rules and rename via > > .link files. I'd stick to .link files for this, really. > > > > All .link files do is to suggest th

Re: [systemd-devel] Updating network file during boot

2024-08-22 Thread Andrei Borzenkov
On Wed, Aug 21, 2024 at 7:12 PM Lennart Poettering wrote: ... > > > > After adding some more network devices to udev this way I now have the same > > udev configuration working intermittently and I'm not sure why. > > You are probably racing against the usual rename logic via .link > devices if yo

Re: [systemd-devel] Updating network file during boot

2024-08-22 Thread Henti Smith
On Thu, 22 Aug 2024 at 09:59, Andrei Borzenkov wrote: > On Thu, Aug 22, 2024 at 11:45 AM Henti Smith > wrote: > ... > > > > I attempted to match the network devices using Property= as follows > (using debug1 as an example): > > > > # Fixed name for debug1 (Debug Board) > > [Match] > > Property=P

Re: [systemd-devel] Updating network file during boot

2024-08-22 Thread Andrei Borzenkov
On Thu, Aug 22, 2024 at 11:45 AM Henti Smith wrote: ... > > I attempted to match the network devices using Property= as follows (using > debug1 as an example): > > # Fixed name for debug1 (Debug Board) > [Match] > Property=Path=pci-:01:00.0 ID_NET_DRIVER=igb > "Path" is not udev property. >

Re: [systemd-devel] Updating network file during boot

2024-08-22 Thread Henti Smith
On Wed, 21 Aug 2024 at 17:12, Lennart Poettering wrote: > On Mi, 21.08.24 16:57, Henti Smith (he...@gaydonsmith.co.uk) wrote: > > > After adding some more network devices to udev this way I now have the > same > > udev configuration working intermittently and I'm not sure why. > > You are probabl

Re: [systemd-devel] Updating network file during boot

2024-08-21 Thread Lennart Poettering
On Mi, 21.08.24 16:57, Henti Smith (he...@gaydonsmith.co.uk) wrote: > cOn Fri, 16 Aug 2024 at 15:39, Henti Smith wrote: > > > On Fri, 16 Aug 2024 at 07:31, Andrei Borzenkov > > wrote: > > > >> > >> echo 'SUBSYSTEM=="net", KERNELS==":00:10.0", NAME="mvc-sw1"' > > >> /etc/udev/rules.d/mvc.rule

Re: [systemd-devel] Updating network file during boot

2024-08-21 Thread Henti Smith
cOn Fri, 16 Aug 2024 at 15:39, Henti Smith wrote: > On Fri, 16 Aug 2024 at 07:31, Andrei Borzenkov > wrote: > >> >> echo 'SUBSYSTEM=="net", KERNELS==":00:10.0", NAME="mvc-sw1"' > >> /etc/udev/rules.d/mvc.rules >> echo 'SUBSYSTEM=="net", KERNELS==":00:11.0", NAME="mvc-sw2"' >> >> /etc/ude

Re: [systemd-devel] Updating network file during boot

2024-08-16 Thread Henti Smith
On Fri, 16 Aug 2024 at 07:31, Andrei Borzenkov wrote: > > echo 'SUBSYSTEM=="net", KERNELS==":00:10.0", NAME="mvc-sw1"' > > /etc/udev/rules.d/mvc.rules > echo 'SUBSYSTEM=="net", KERNELS==":00:11.0", NAME="mvc-sw2"' >> > /etc/udev/rules.d/mvc.rules > Thank you, this worked for me. I've up

Re: [systemd-devel] Updating network file during boot

2024-08-16 Thread Henti Smith
On Thu, 15 Aug 2024 at 16:14, Etienne Champetier < champetier.etie...@gmail.com> wrote: > > > Le jeu. 15 août 2024, 05:03, Henti Smith a > écrit : > >> Hello Etienne >> >> I cannot find any info on how to extract this information from the >> current system. >> >> How would I go about doing that ?

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Andrei Borzenkov
On Thu, Aug 15, 2024 at 7:15 PM Henti Smith wrote: ... > > The full device list (when configured correctly) is: > E: DEVPATH=/devices/pci:00/:00:0c.0/:01:00.0/net/eno1 > E: DEVPATH=/devices/pci:00/:00:0d.0/:02:00.0/net/eth1 > E: DEVPATH=/devices/pci:00/:00:10.0/

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Etienne Champetier
Le jeu. 15 août 2024, 05:03, Henti Smith a écrit : > Hello Etienne > > I cannot find any info on how to extract this information from the current > system. > > How would I go about doing that ? > Try cat /sys/devices/pci:00/:00:10.0/:05:00.0/firmware_node/sun cat /sys/devices/pci000

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Henti Smith
On Thu, 15 Aug 2024 at 15:18, Silvio Knizek wrote: > Am Donnerstag, dem 15.08.2024 um 14:57 +0100 schrieb Henti Smith: > > > > Hi Henti, > > > > > > why can't you [Match] onto `Property="ID_NET_LABEL_ONBOARD=Onboard > ETHERNET Controller"`? Is your systemd older than 243? Than you should > really

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Silvio Knizek
Am Donnerstag, dem 15.08.2024 um 14:57 +0100 schrieb Henti Smith: > > Hi Henti, > > > > 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 > > Silvio > Hi Silvio,  > > I'm on

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Henti Smith
On Thu, 15 Aug 2024 at 14:46, Silvio Knizek wrote: > Am Donnerstag, dem 15.08.2024 um 14:07 +0100 schrieb Henti Smith: > > Hello again. > > > > I've tried multiple ways of matching and none seem to be working. > > > > I removed all the configuration in /etc/systemd/network, run > update-initramfs

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Silvio Knizek
Am Donnerstag, dem 15.08.2024 um 14:07 +0100 schrieb Henti Smith: > Hello again. > > I've tried multiple ways of matching and none seem to be working.  > > I removed all the configuration in /etc/systemd/network, run update-initramfs > and rebooted. > > The resulting network configuration for

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Andrei Borzenkov
On Thu, Aug 15, 2024 at 4:08 PM Henti Smith wrote: > > 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. You can go old school and simply s

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Henti Smith
Hello again. I've tried multiple ways of matching and none seem to be working. I removed all the configuration in /etc/systemd/network, run update-initramfs and rebooted. The resulting network configuration for the marvell devices was: root@av20-mvc-01:~# udevadm info /sys/class/net/eno2 P: /dev

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Henti Smith
This does not seem to work, and reading the man page, "Path" matches against the udev property ID_PATH, which in this case is will be the changing addresses for example "pci-:05:00.0" I'll play some more and see what other options I have. Kind regards Henti On Thu, 15 Aug 2024 at 12:46, And

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Andrei Borzenkov
On Thu, Aug 15, 2024 at 2:37 PM Henti Smith wrote: > > > They do stay the same: > > Without the Board: > DEVPATH=/devices/pci:00/:00:10.0/:04:00.0/net/eno2 > DEVPATH=/devices/pci:00/:00:11.0/:05:00.0/net/mvc-sw1 > > With the Board: > DEVPATH=/devices/pci:00/:00:10.0

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Henti Smith
They do stay the same: Without the Board: DEVPATH=/devices/pci:00/:00:10.0/:04:00.0/net/eno2 DEVPATH=/devices/pci:00/:00:11.0/:05:00.0/net/mvc-sw1 With the Board: DEVPATH=/devices/pci:00/:00:10.0/:05:00.0/net/mvc-sw2 DEVPATH=/devices/pci:00/:00:11.0/000

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Andrei Borzenkov
On Thu, Aug 15, 2024 at 12:25 PM Henti Smith wrote: > root@av20-mvc-01:~# udevadm info /sys/class/net/eno2 > P: /devices/pci:00/:00:10.0/:04:00.0/net/eno2 ... > > root@av20-mvc-01:~# udevadm info /sys/class/net/mvc-sw1 > P: /devices/pci:00/:00:11.0/:05:00.0/net/mvc-sw1 Doe

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Henti Smith
Hi Silvio, Thank you for this information. Unfortunately, this does not seem to have the uniquely identifiable information I can use to consistently match the devices. See below. root@av20-mvc-01:~# lspci -d:"$marvell_device_id" 04:00.0 Ethernet controller: Marvell Technology Group Ltd. Device 0

Re: [systemd-devel] Updating network file during boot

2024-08-15 Thread Henti Smith
Hello Etienne I cannot find any info on how to extract this information from the current system. How would I go about doing that ? Kind regards Henti On Tue, 13 Aug 2024 at 17:56, Etienne Champetier < champetier.etie...@gmail.com> wrote: > Hello Henti, > > Le mar. 13 août 2024 à 12:16, Henti S

Re: [systemd-devel] Updating network file during boot

2024-08-13 Thread Silvio Knizek
Am Dienstag, dem 13.08.2024 um 17:16 +0100 schrieb Henti Smith: > Good day everybody. > > I've searched high and low and cannot seem to find an answer for what I'm > trying to do. The most relevant I found was this [1] thread in 2020, but only > because I'm using a script to change the contents

Re: [systemd-devel] Updating network file during boot

2024-08-13 Thread Etienne Champetier
Hello Henti, Le mar. 13 août 2024 à 12:16, Henti Smith a écrit : > > Good day everybody. > > I've searched high and low and cannot seem to find an answer for what I'm > trying to do. The most relevant I found was this [1] thread in 2020, but only > because I'm using a script to change the conte

[systemd-devel] Updating network file during boot

2024-08-13 Thread Henti Smith
Good day everybody. I've searched high and low and cannot seem to find an answer for what I'm trying to do. The most relevant I found was this [1] thread in 2020, but only because I'm using a script to change the contents of my .link files during boot, which is not working constantly. Some things