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

Tom Gundersen teg at jklm.no
Fri Apr 3 08:10:01 PDT 2015


On Fri, Apr 3, 2015 at 4:47 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Thu, 02.04.15 13:11, Paul Menzel (paulepanter at users.sourceforge.net) wrote:
>
>> Dear systemd folks,
>>
>>
>> some network cards with certain cables and devices take up to five
>> seconds so that the link is up [1].
>>
>>         $ sudo journalctl -u systemd-networkd
>>         -- Logs begin at Fr 2015-03-20 17:39:31 CET, end at So 2015-03-22 08:39:39 CET. --
>>         Mär 20 17:39:31 myhostname systemd-networkd[245]: lo              : gained carrier
>>         Mär 20 17:39:31 myhostname systemd-networkd[245]: eth0            : link configured
>>         Mär 20 17:39:34 myhostname systemd-networkd[245]: eth0            : gained carrier
>>
>> This is annoying if the system is up, but you cannot log into a server
>> because the NIC is so slow configuring the link.
>>
>> The Linux kernel module developers from the e1000-devel mailing list
>> suggested the following [2]:
>>
>> > Both sides either need to be forced or both sides need to be auto-neg.
>> > Otherwise the auto-negotiation process will usually detect link (the
>> > physical signal) but fail to find duplex (since one side is not
>> > talking) and default to the lowest common denominator, e.g. half
>> > duplex.  So, you could try forcing speed, it may look right on your
>> > end but if you have no visibility to the other end it could be running
>> > at half duplex.
>> >
>> > You may be able to speed up the auto negotiation process by
>> > exclusively advertising 1000 Mbps Full Duplex.
>> >
>> > # ethtool -s ethX advertise 0x20
>>
>> In the IRC channel #systemd at irc.freenode.net somebody told me to look
>> into systemd’s network link configuration (`man systemd.link`).
>>
>> Reading the manual page, it’s not clear to me, if auto-negotiation is
>> going to be disabled, if the following is set.
>>
>>         BitsPerSecond=1G
>>         Duplex=Full
>>
>> Is that equivalent to `ethtool -s ethX advertise 0x20`? If not, how
>> could I set that up?
>
> BitsPerSecond= and Duplex= are equivalent to "ethtool speed" and
> "ethtool duplex".
>
> We currently have no setting in .link files that was equivalent to
> "ethtool advertise". Maybe we could add that, Tom?
>
> Paul, are you sure that this will really cut 5s from the configuration
> time? Did you try this?

No objections from me if it really cuts 5s as described.

Cheers,

Tom


More information about the systemd-devel mailing list