Dear poma,
Thank you for the reply with a test and sorry for my late reply. I was unfortunately unable to test this on the server, as there was no maintenance window yet. It’s still on my todo list though. Am Donnerstag, den 09.04.2015, 00:28 +0200 schrieb poma: > On 08.04.2015 23:05, Lennart Poettering wrote: > > On Wed, 08.04.15 22:13, Paul Menzel wrote: > > > >>> Wouldn't it suffice to unplug the ethernet cable, then use ethtool to > >>> turn this on, then replug it, and measuring the time until networkd > >>> notices the link beat is back? > >> > >> It would. But this is a rented Hetzner server and I have no access to > >> the data center. Do you have another idea. Please keep in mind that I > >> also only have remote access using that NIC. ;-) > > > > Then, I figure a udev rule should do. Something like this (untested:) > > > > ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="/usr/bin/ethtool $name > > ..." > > > > Replace the "..." of course with the ethool options you need. > > > > This would then be run immediately when the device appears. If this > > makes a measurable difference, then let us know. > > /etc/udev/rules.d/10-speed1G-enp1s6.rules > ACTION=="add", SUBSYSTEM=="net", RUN+="/usr/sbin/ethtool -s enp1s6 advertise > 0x20" > > :03 systemd[1]: Starting Network Service... > :05 systemd-networkd[1612]: enp1s6 : link configured > :05 systemd-networkd[1612]: enp1s6 : gained carrier > :06 systemd-networkd[1612]: enp1s6 : lost carrier > :09 systemd-networkd[1612]: enp1s6 : gained carrier > > ~~~ > > /etc/udev/rules.d/10-speed1G-enp1s6.rules- > > :15 systemd[1]: Starting Network Service... > :17 systemd-networkd[1633]: enp1s6 : link configured > :17 systemd-networkd[1633]: enp1s6 : gained carrier So in your case, `gained carrier` is indeed shown earlier saving two seconds. The next message probably indicates a problem with the driver. Poma, what Linux kernel do you use? Lennart, is poma’s test sufficient to show that integrating an `advertise` command(?) into systemd-networkd would be useful? Thanks, Paul
signature.asc
Description: This is a digitally signed message part
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel