[systemd-devel] networkd: Is auto-negotiation turned off when specifying parameters in a link file?

Paul Menzel paulepanter at users.sourceforge.net
Sat May 2 03:00:40 PDT 2015


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150502/8c5a0072/attachment.sig>


More information about the systemd-devel mailing list