issues with realtek r8125b

Post Reply
User avatar
target-drone
Posts: 5
Joined: Mon Aug 24, 2020 1:14 am
languages_spoken: english
ODROIDs: n2, h2
Has thanked: 0
Been thanked: 1 time
Contact:

issues with realtek r8125b

Post by target-drone »

Hey gang,

I've just set up an H2+ and ran into an issue where everything would initially run fine, but ping jitter would start to increase, then suddenly drop 4 or so pings, then resume. The interval between drops gets shorter until the connection was unusable.

Lots of this sort of thing in the log:

Code: Select all

Aug 23 15:13:43 Photon kernel: r8125: enp2s0: link down
Aug 23 15:13:43 Photon systemd-networkd[267]: enp2s0: Lost carrier
Aug 23 15:13:46 Photon kernel: r8125: enp2s0: link up
Aug 23 15:13:46 Photon systemd-networkd[267]: enp2s0: Gained carrier
Aug 23 15:13:46 Photon kernel: bond0: (slave enp2s0): link status definitely up, 1000 Mbps full duplex
Aug 23 15:23:22 Photon systemd-networkd[267]: enp2s0: Lost carrier
Aug 23 15:23:23 Photon kernel: bond0: (slave enp2s0): link status definitely down, disabling slave
Aug 23 15:23:27 Photon kernel: r8125: enp2s0: link up
Aug 23 15:23:27 Photon systemd-networkd[267]: enp2s0: Gained carrier
Aug 23 15:23:27 Photon kernel: bond0: (slave enp2s0): link status definitely up, 1000 Mbps full duplex
Initially tested as below, but also present in simplified topology:

Code: Select all

     enp2s0, enp3s0 -> bond0
         bond0 -> VLAN1, VLAN2, BRIDGE0
            VLAN1 -> BRIDGE1
            VLAN2 -> BRIDGE2
Using 1G not 2.5G. Traffic loss is seen to all bridge interfaces simultaneously, including BRIDGE0.

Turning off rxvlan + txvlan hardware offloading on both NICs did the job. \o/

Code: Select all

ethtool -K enp2s0 rxvlan off txvlan off
I'm still seeing the occasional really brief ping drop (3-6 in ~1,000) so will try to narrow down if any other offloads need to be switched off, unless someone has a better idea about what's going on here.

Code: Select all

[root@Photon ~]# uname -a
Linux Photon 5.8.3-arch1-1 #1 SMP PREEMPT Fri, 21 Aug 2020 16:54:16 +0000 x86_64 GNU/Linux
[root@Photon ~]# dkms status
r8125, 9.003.05, 5.8.3-arch1-1, x86_64: installed
Cheers
Last edited by target-drone on Sat Oct 17, 2020 2:38 am, edited 1 time in total.

User avatar
odroid
Site Admin
Posts: 35591
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1199 times
Been thanked: 877 times
Contact:

Re: issues with realtek r8125b VLAN hardware offload

Post by odroid »

Can you please try Kernel 5.9 RC to narrow down root causes?
viewtopic.php?p=303434#p303434

We found the realtek's r8125 9.003.05 driver was working fine with 2.5GbE infrastructure while Kernel 5.9 r8169 driver was working more reliably with 1GbE infrastructure.

User avatar
target-drone
Posts: 5
Joined: Mon Aug 24, 2020 1:14 am
languages_spoken: english
ODROIDs: n2, h2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: issues with realtek r8125b VLAN hardware offload

Post by target-drone »

So the changes in post1 only reduced the problem, or perhaps reset the timer as it flushed buffers or something?

Simplified things down to singleNIC -> Bridge -> vnic.

Narrowed it down to when UDP OpenVPN traffic gets going. At ~30Mbps-ish (outbound from the NIC) after a tew minutes the NIC starts to drop out at least once a minute, getting increasingly wobbly as traffic increases.

Inbound traffic seems fine but maybe that's because my Internet upload speed is too low to trigger whatever this is - the H2+ is running as a router/firewall and isn't the VPN endpoint.

I have had no dropouts since switching the VPN to TCP.

Not sure why OVPN (or maybe it is the tunneled traffic?) is special. Things are completely stable under iperf3 -u - I've been running it maxed out all day with either 1 or 128 threads and have had no issues. Tomorrow I'll mess around with MTU/mssfix of the tunnel to maybe see if it's that.

I'm compiling 5.9 on the thing overnight - kinda feel 5.8.14 is bleeding edge enough for me without running a RC kernel! :D
These users thanked the author target-drone for the post:
odroid (Mon Oct 12, 2020 11:51 am)

mad_ady
Posts: 8582
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 578 times
Been thanked: 486 times
Contact:

Re: issues with realtek r8125b VLAN hardware offload

Post by mad_ady »

You know, I found that udp traffic (going through a switch) has the tendency to drop packets once in a while, independent of nics used. Haven't investigated why, could be buffers getting filled, or maybe sender needs to refresh the arp table, or could be the wrong phase of the moon... I consider dropped packets the normal state of udp.

User avatar
target-drone
Posts: 5
Joined: Mon Aug 24, 2020 1:14 am
languages_spoken: english
ODROIDs: n2, h2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: issues with realtek r8125b VLAN hardware offload

Post by target-drone »

UDP isn't a reliable protocol, but this isn't a dropped packet thing. From the OS's point of view it looks the same as unplugging and plugging the Network cable:

Code: Select all

Oct 03 13:44:04 Photon systemd-networkd[265]: enp2s0: Link DOWN
Oct 03 13:44:04 Photon systemd-networkd[265]: enp2s0: Lost carrier
Oct 03 13:44:13 Photon systemd-networkd[265]: enp2s0: Link UP
Oct 03 13:44:17 Photon systemd-networkd[265]: enp2s0: Gained carrier

mad_ady
Posts: 8582
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 578 times
Been thanked: 486 times
Contact:

Re: issues with realtek r8125b VLAN hardware offload

Post by mad_ady »

In this case I'd say it's a driver thing...

User avatar
odroid
Site Admin
Posts: 35591
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1199 times
Been thanked: 877 times
Contact:

Re: issues with realtek r8125b VLAN hardware offload

Post by odroid »

Are you running official Kernel 5.9 on Ubuntu 20.04.1?

User avatar
target-drone
Posts: 5
Joined: Mon Aug 24, 2020 1:14 am
languages_spoken: english
ODROIDs: n2, h2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: issues with realtek r8125b VLAN hardware offload

Post by target-drone »

odroid wrote:
Tue Oct 13, 2020 11:38 am
Are you running official Kernel 5.9 on Ubuntu 20.04.1?
No, as I put in the first post it's 5.8.x on Arch with the Realtek 9.003.05 dkms module.
I messed up the 5.9 installation, so rebooted back into 5.8.[14] to try again and got this message:

Code: Select all

Oct 16 17:16:26 Photon kernel: TCP: LAN-br: Driver has suspect GRO implementation, TCP performance may be compromised.
I assume that message is for the bridge vdev though, rather than the underlying NIC.

Things have been stable for the past few days even with OpenVPN/UDP after removing the VPN's configured mssfix limit.

User avatar
target-drone
Posts: 5
Joined: Mon Aug 24, 2020 1:14 am
languages_spoken: english
ODROIDs: n2, h2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: issues with realtek r8125b

Post by target-drone »

I believe the OpenVPN option causing issues was 'mssfix 1305'. Can anyone confirm?

I've been on 5.9.1 for a day or so and the network still seems fine.

Xorg, however, now hangs after screensaver activation. Disabled for now until the package is updated.

User avatar
odroid
Site Admin
Posts: 35591
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1199 times
Been thanked: 877 times
Contact:

Re: issues with realtek r8125b

Post by odroid »

Thank you for the good news about Kernel 5.9.1.

I hope other OpenVPN users can confirm the problem.

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 0 guests