Alex,

The tests I'm making at work and at home, both to cheap 8 port switches,
one is an Encore Gigabit Switch and the other is a TP-Link Fast Ethernet
Switch. Although they are cheap hardware, both behave well in normal
conditions. Right now I'm connecting to the Fast Ethernet one.

Just upgraded to fedora today-released kernel (and therefore, rebooted):

[root@thinkpad ~]# uname -a
Linux thinkpad.tokenlabs 4.16.11-300.fc28.x86_64 #1 SMP Tue May 22 18:29:09
UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

[root@thinkpad ~]# ethtool enp0s31f6
Settings for enp0s31f6:
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
Supported FEC modes: Not reported
Advertised link modes:  10baseT/Half 10baseT/Full
                        100baseT/Half 100baseT/Full
                        1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: on (auto)
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
       drv probe link
Link detected: yes

As you can see, the cable is connected and link is at 100Mbit/s as
expected. DHCP got IP and all is well. Now I'm going to sleep the thinkpad.
I'm back. And it now only gets 10Mbit/s:

[root@thinkpad ~]# ethtool enp0s31f6
Settings for enp0s31f6:
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
Supported FEC modes: Not reported
Advertised link modes:  10baseT/Half 10baseT/Full
                        100baseT/Half 100baseT/Full
                        1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 10Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: off (auto)
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
       drv probe link
Link detected: yes

As per your sugestions, let's limit the advertised modes:

[root@thinkpad ~]# ethtool -s enp0s31f6 advertise 2c
[root@thinkpad ~]# ethtool enp0s31f6
Settings for enp0s31f6:
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
Supported FEC modes: Not reported
Advertised link modes:  100baseT/Half 100baseT/Full
                        1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: off (auto)
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
       drv probe link
Link detected: yes


I didn't even had to unplug/replug the cable, as soon as issuing the
command it re-negotiated to 100Mbit/s.

Just to be sure, I repluged and it kees getting 100Mbit/s. Then I undid the
advertised modes limiting (put them all back) and it still get's 100Mbit/s,
even after replugging, many times. Then, I slept the notebook again and the
10Mbit problem came back. Curious....

In all this testes traffic was passing and the only problem was the link
speed (if I can reproduce the other situation where traffic does not pass
I'l send a note).

Andre


On Fri, May 25, 2018 at 1:19 PM, Alexander Duyck <alexander.du...@gmail.com>
wrote:

> On Thu, May 24, 2018 at 6:54 PM, Andre Ruiz <andre.r...@gmail.com> wrote:
> >
> > Alex,
> >
> > In fact, sometimes it won't pass traffic at all and sometimes it will
> work
> > at 10Mbit/s. I still cannot tell what causes each scenario. The common
> > aspect is the 10Mbit/Full part. IIRC a failed link speed negotiation will
> > make it come up at 10Mbit/Half Duplex, right?
>
> No, you can support 10/FULL on a 2 pair link. Half Duplex is more a
> side effect of being on a hub versus a switch as I recall, though you
> should also be able to support 100/FULL on a 2 pair link. Normally to
> get into a 10/half state you would have to end up with autonegotation
> failing and the hardware trying modes until it links at 10Mbps.
> Normally if autoneg works it will just link with full duplex at
> whatever speed it links at assuming the full duplex modes are an
> option.
>
> One thing you might try testing is to reduce the number of advertised
> modes and see what the part defaults to. So for example you might
> specify something like "ethtool -s enp0s31f5 advertise 2c". That would
> limit the interface to 100 and gigabit speeds. One other possibility
> that I want to eliminate is the Low Power Link Up feature somehow
> being enabled. That would link at the lowest speed available on the
> interface in order to save power. So eliminating the 10Mbps options
> from the advertised modes should force it to link at 100 if that is
> what is going on.
>
> > This behaviour has been the same in all kernels released on fedora 28,
> the
> > GA one and all updates at least until 4.16.9-300.fc28.x86_64.
> >
> > Right now, it's working at 10Mbit, I have both hybernated and slept the
> > machine and it still passes traffic.
> >
> > [root@thinkpad ~]# ethtool -i enp0s31f6
> > driver: e1000e
> > version: 3.2.6-k
> > firmware-version: 0.13-4
> > expansion-rom-version:
> > bus-info: 0000:00:1f.6
> > supports-statistics: yes
> > supports-test: yes
> > supports-eeprom-access: yes
> > supports-register-dump: yes
> > supports-priv-flags: no
> > [root@thinkpad ~]# ethtool enp0s31f6
> > Settings for enp0s31f6:
> > 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
> > Supported FEC modes: Not reported
> > Advertised link modes:  10baseT/Half 10baseT/Full
> >                         100baseT/Half 100baseT/Full
> >                         1000baseT/Full
> > Advertised pause frame use: No
> > Advertised auto-negotiation: Yes
> > Advertised FEC modes: Not reported
> > Speed: 10Mb/s
> > Duplex: Full
> > Port: Twisted Pair
> > PHYAD: 1
> > Transceiver: internal
> > Auto-negotiation: on
> > MDI-X: off (auto)
> > Supports Wake-on: pumbg
> > Wake-on: g
> > Current message level: 0x00000007 (7)
> >        drv probe link
> > Link detected: yes
>
> Could you provide any information on what it is you are connecting to?
> I assume it is is a switch of some sort. If you could provide the
> make/model it would be useful for us to note that so that we can work
> on a reproduction on our end and do research into if there might be
> any known issues with the hardware that make be leading to this
> behavior.
>
> >
> > After a warm boot (does not need a cold one), it will get 1000Mbit/s.
> >
> > The only messages appearing on dmesg at the time of the test are:
> >
> > [49914.499713] e1000e: enp0s31f6 NIC Link is Up 10 Mbps Full Duplex, Flow
> > Control: Rx/Tx
> > [49914.499723] e1000e 0000:00:1f.6 enp0s31f6: 10/100 speed: disabling TSO
> > [49914.499837] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s31f6: link becomes
> ready
> >
> > Please tell me if you need any other kind of log or captures.
> >
> > Thank you
> > Andre
> >
>
> Unfortunately it looks like the logs aren't probably going to provide
> much information.
>
> Basically we will just need to poke and prod the link to try and
> figure out what is going on that is causing it to link at 10/half.
>
> Thanks.
>
> - Alex
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to