Hi,

On Sun, 09 November 2014 Hans de Goede wrote:
> On 11/09/2014 08:31 AM, Diego Roversi wrote:
> > On Sat, 8 Nov 2014 20:44:48 +0100 Bruno Prémont wrote:
> >> Since I have my Cubietruck, be it with 3.4 kernels or with mainline
> >> kernels I've been experiencing unstable TCP connections.
> >>
> >> The symptoms are stalling connections (usually SSH connections to the
> >> Cubietruck) that have nearly no chance at recovering.
> >>
> >> When I tell GMAC to only advertise up to 100Mbps speed the SSH
> >> sessions do no show above symptoms anymore.
> >>
> >>
> >> If it's important, my setup is:
> >>
> >>           100Mbps            1Gbps
> >> Laptop  ----------- Switch --------- Cubietruck
> >>
> >>
> >>
> >> Any idea what the cause might be and how to fix it?
> >>
> >>
> >> When running wireshark on the laptop there is only silence when the
> >> SSH session is stalled. Just prior to stalling Wireshark mentions
> >> one missed packet (previous segment not captured) and no more packets
> >> after this.
> > 
> > Packet loss can explain stalled session, but I expect some retransmission
> > after some time.
> > 
> > The same problem is there whem the Cubietruck is connected directly to
> > the laptop? 

The problem is the same, but on the directly connected laptop (one
at 1Gps speed) I get rx_errors with CRC errors.

> > Look also for kernel messages on Cubietruck.

On the kernel log side of Cubietruck, there is no interesting message at all:
[    0.844078] stmmaceth 1c50000.ethernet: no regulator found
[    0.849669] stmmaceth 1c50000.ethernet: no reset control found
[    0.874209] libphy: stmmac: probed
[    0.877643] eth0: PHY ID 001cc915 at 0 IRQ POLL (stmmac-0:00) active
[    0.883990] eth0: PHY ID 001cc915 at 1 IRQ POLL (stmmac-0:01)
[   18.055544] stmmaceth 1c50000.ethernet eth0: Link is Up - 1Gbps/Full - flow 
control rx/tx


> > It's also possible that there is a problem like this:
> > 
> > https://groups.google.com/forum/#!searchin/linux-sunxi/gmac$20bug/linux-sunxi/kmsn0cNm37o/M-wwVE6mhrcJ
> 
> Right, I was thinking the same, maybe the cubietruck needs that too, but
> for some reason the problem on the bananapi is worse ?
> 
> Bruno, if you look at the u-boot sources board/sunxi/gmac.c, atline 32 there 
> is a:
> 
> #ifdef CONFIG_BANANAPI
> 
> Try replacing this with #if 1, and then build and install u-boot and
> re-try things on your cubietruck.
> Note this will influence the kernel too, as the kernel does not touch
> those bits.

I did try this but saw no difference in behavior.


Looking at tcpdump on both Cubietruck and Laptop I see lots of retransmits
on Cubietruck side that never make it to the Laptop. Each packet from the
Laptop though does reach Cubietruck.
Sometimes one of the Cubietruck's retransmits gets through but those are
rather rare.
In case of direct connection transmission errors seem to happen slightly
less often and connection recovers more easily.

Disabling some offloading features via ethtool on Cubietruck side makes
no change either. Even checksum offloading does not help.

The only efficient work-around I found is limiting speed to 100Mbps.

Thanks,
Bruno

Attachment: signature.asc
Description: PGP signature

Reply via email to