[systemd-devel] Problems with Ethernet link configuration using udevd

Bob Ham bob.ham at collabora.com
Tue Jul 21 06:12:26 PDT 2015


Hi there,

I seem to have come across a couple of issues with udevd v219's
configuration of Ethernet link-level parameters specified in .link
files, in particular the speed and duplex settings.  Firstly, the speed
and duplex ioctl() call is succeeding but without any changes taking
effect on the interface.  Secondly, the Duplex parameter of the .link
file does not appear to be parsed correctly; the duplex value presented
to link_apply_config() is not the value specified in the .link file
while the speed value is.


With the attached .link file specifying a speed of 100M, half duplex,
and MAC address of 52:54:00:77:77:77, I get the following after boot:

root at qemux86-64:~# ethtool eth0
Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: off (auto)
        Supports Wake-on: umbg
        Wake-on: d
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes
root at qemux86-64:~# journalctl -b -u systemd-udevd.service
-- Logs begin at Tue 2015-07-21 13:08:03 UTC, end at Tue 2015-07-21 13:08:21 UTC. --
Jul 21 13:08:04 qemux86-64 systemd[1]: Starting udev Kernel Device Manager...
Jul 21 13:08:04 qemux86-64 systemd-udevd[91]: starting version 219
Jul 21 13:08:05 qemux86-64 systemd[1]: Started udev Kernel Device Manager.
Jul 21 13:08:05 qemux86-64 systemd-udevd[108]: failed to execute '/lib/systemd/systemd-vconsole-setup' '/lib/systemd/systemd-vconsole-setup': No such file or directory
Jul 21 13:08:06 qemux86-64 systemd-udevd[98]: Failed to apply ACL on /dev/sequencer: Operation not supported
Jul 21 13:08:06 qemux86-64 systemd-udevd[98]: Failed to apply ACL on /dev/sequencer2: Operation not supported
Jul 21 13:08:06 qemux86-64 systemd-udevd[99]: Failed to apply ACL on /dev/snd/timer: Operation not supported
Jul 21 13:08:06 qemux86-64 systemd-udevd[96]: Failed to apply ACL on /dev/snd/seq: Operation not supported
Jul 21 13:08:08 qemux86-64 systemd-udevd[130]: failed to execute '/lib/systemd/systemd-vconsole-setup' '/lib/systemd/systemd-vconsole-setup': No such file or directory
Jul 21 13:08:08 qemux86-64 systemd-udevd[129]: failed to execute '/lib/systemd/systemd-vconsole-setup' '/lib/systemd/systemd-vconsole-setup': No such file or directory
root at qemux86-64:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 52:54:00:77:77:77  
...


but with the attached patch, which adds a system() call to execute the
ethtool program using the specified parameters, I get advertised link
modes different from above:


root at qemux86-64:~# ethtool eth0
Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  100baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: off (auto)
        Supports Wake-on: umbg
        Wake-on: d
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes
root at qemux86-64:~# journalctl -b -u systemd-udevd.service
-- Logs begin at Tue 2015-07-21 12:42:35 UTC, end at Tue 2015-07-21 12:43:00 UTC. --
Jul 21 12:42:36 qemux86-64 systemd[1]: Starting udev Kernel Device Manager...
Jul 21 12:42:37 qemux86-64 systemd-udevd[91]: starting version 219
Jul 21 12:42:37 qemux86-64 systemd[1]: Started udev Kernel Device Manager.
Jul 21 12:42:37 qemux86-64 systemd-udevd[104]: failed to execute '/lib/systemd/systemd-vconsole-setup' '/lib/systemd/systemd-vconsole-setup': No such file or directory
Jul 21 12:42:38 qemux86-64 systemd-udevd[101]: Setting link eth0 speed to 97656 Mbps, duplex: full
Jul 21 12:42:38 qemux86-64 systemd-udevd[101]: Successfully set link eth0 speed to 97656 Mbps (raw: 100000000), duplex: full
Jul 21 12:42:38 qemux86-64 systemd-udevd[102]: Failed to apply ACL on /dev/sequencer: Operation not supported
Jul 21 12:42:38 qemux86-64 systemd-udevd[99]: Failed to apply ACL on /dev/snd/seq: Operation not supported
Jul 21 12:42:38 qemux86-64 systemd-udevd[98]: Setting link sit0 speed to 0 Mbps, duplex: (null)
Jul 21 12:42:38 qemux86-64 systemd-udevd[98]: Successfully set link sit0 speed to 0 Mbps (raw: 0), duplex: (null)
Jul 21 12:42:38 qemux86-64 systemd-udevd[103]: Failed to apply ACL on /dev/snd/timer: Operation not supported
Jul 21 12:42:38 qemux86-64 systemd-udevd[99]: Failed to apply ACL on /dev/sequencer2: Operation not supported
Jul 21 12:42:38 qemux86-64 systemd-udevd[97]: Setting link lo speed to 0 Mbps, duplex: (null)
Jul 21 12:42:38 qemux86-64 systemd-udevd[97]: Successfully set link lo speed to 0 Mbps (raw: 0), duplex: (null)
Jul 21 12:42:39 qemux86-64 systemd-udevd[101]: Return code 0 from execution of ethtool: `ethtool --change eth0 speed 100 duplex full >/dev/console 2>&1'
root at qemux86-64:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 52:54:00:77:77:77
...


-- 
Bob Ham <bob.ham at collabora.com>
Software Engineer

>>>>>>>>
Open First 
Collabora is hiring!
Please check out our latest opportunities here:
http://bit.ly/Collabora-Careers
<<<<<<<<

-------------- next part --------------
[Match]
Path=pci-0000:00:03.0

[Link]
Duplex=half
BitsPerSecond=100M
MACAddress=52:54:00:77:77:77
-------------- next part --------------
A non-text attachment was scrubbed...
Name: link-config-ethtool-exec.patch
Type: text/x-patch
Size: 1740 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150721/b05fc5a9/attachment-0001.bin>


More information about the systemd-devel mailing list