BPI-R4 Pro 10G RJ45 WAN/LAN link @1Gb flapping problem

tried

root@banana:~# ethtool -K eth1 tso off gso off         

otherwise same setup as above.

root@banana:~# 
root@banana:~# ethtool -k eth1  | grep -v fixed
Features for eth1:
rx-checksumming: on
tx-checksumming: on
        tx-checksum-ipv4: on
        tx-checksum-ipv6: on
scatter-gather: on
        tx-scatter-gather: on
tcp-segmentation-offload: off
        tx-tcp-segmentation: off
        tx-tcp-ecn-segmentation: off
        tx-tcp-mangleid-segmentation: off
        tx-tcp6-segmentation: off
generic-segmentation-offload: off
generic-receive-offload: on
large-receive-offload: off
tx-vlan-offload: on
tx-nocache-copy: off
hw-tc-offload: on
rx-gro-list: off
rx-udp-gro-forwarding: off
root@banana:~# 

does not reproduce anymore :smiley:

root@banana:~# iperf3 -c 1.1.1.2 -b 2000M -t 30
Connecting to host 1.1.1.2, port 5201
[  5] local 1.1.1.1 port 39740 connected to 1.1.1.2 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   114 MBytes   958 Mbits/sec    0    383 KBytes       
[  5]   1.00-2.00   sec   112 MBytes   938 Mbits/sec    0    402 KBytes       
[  5]   2.00-3.00   sec   112 MBytes   941 Mbits/sec    0    402 KBytes       
[  5]   3.00-4.00   sec   112 MBytes   938 Mbits/sec    6    310 KBytes       
[  5]   4.00-5.00   sec   112 MBytes   935 Mbits/sec    0    361 KBytes       
[  5]   5.00-6.00   sec   113 MBytes   948 Mbits/sec    0    387 KBytes       
[  5]   6.00-7.00   sec   112 MBytes   940 Mbits/sec    0    387 KBytes       
[  5]   7.00-8.00   sec   113 MBytes   945 Mbits/sec    0    489 KBytes       
[  5]   8.00-9.00   sec   112 MBytes   940 Mbits/sec    0    489 KBytes       
[  5]   9.00-10.00  sec   113 MBytes   945 Mbits/sec    0    489 KBytes       
[  5]  10.00-11.00  sec   112 MBytes   936 Mbits/sec    0    489 KBytes       
[  5]  11.00-12.00  sec   112 MBytes   944 Mbits/sec    0    489 KBytes       
[  5]  12.00-13.00  sec   112 MBytes   941 Mbits/sec   84    395 KBytes       
[  5]  13.00-14.00  sec   112 MBytes   935 Mbits/sec    0    484 KBytes       
[  5]  14.00-15.00  sec   113 MBytes   949 Mbits/sec    0    484 KBytes       
[  5]  15.00-16.00  sec   112 MBytes   936 Mbits/sec    0    484 KBytes       
[  5]  16.00-17.00  sec   112 MBytes   942 Mbits/sec    0    491 KBytes       
[  5]  17.00-18.00  sec   112 MBytes   944 Mbits/sec    0    491 KBytes       
[  5]  18.00-19.00  sec   111 MBytes   933 Mbits/sec   59    362 KBytes       
[  5]  19.00-20.00  sec   112 MBytes   941 Mbits/sec    0    403 KBytes       
[  5]  20.00-21.00  sec   113 MBytes   947 Mbits/sec    0    462 KBytes       
[  5]  21.00-22.00  sec   112 MBytes   936 Mbits/sec    0    462 KBytes       
[  5]  22.00-23.00  sec   113 MBytes   946 Mbits/sec    0    462 KBytes       
[  5]  23.00-24.00  sec   111 MBytes   931 Mbits/sec   40    366 KBytes       
[  5]  24.00-25.00  sec   113 MBytes   948 Mbits/sec    0    403 KBytes       
[  5]  25.00-26.00  sec   112 MBytes   935 Mbits/sec    0    403 KBytes       
[  5]  26.00-27.00  sec   113 MBytes   945 Mbits/sec    0    409 KBytes       
[  5]  27.00-28.00  sec   112 MBytes   937 Mbits/sec    0    409 KBytes       
[  5]  28.00-29.00  sec   112 MBytes   944 Mbits/sec    0    414 KBytes       
[  5]  29.00-30.00  sec   112 MBytes   941 Mbits/sec    0    414 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-30.00  sec  3.29 GBytes   941 Mbits/sec  189             sender
[  5]   0.00-30.00  sec  3.29 GBytes   941 Mbits/sec                  receiver

iperf Done.
root@banana:~# 

which driver or chip has a bug?

cc @sinovoip

maybe you could try this?

https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/a06a45e218bd84ac87a8eaae4815d56056f7dad5

any hints on top of what i could apply that on, to retain current functionality of bpi shipped image?

You have to rebuild image from code after applying this patch…either bpi image or just openwrt with mtk feeds

following refs/heads/master - openwrt/feeds/mtk-openwrt-feeds - Gitiles

there is no target profile for BPI-R4-PRO:

Afair there was a special doing for R4Pro, could be different now.

https://wiki.fw-web.de/doku.php?id=en:bpi-r4pro:start#openwrt

not sure if you can add the patch there

Alao you can try my debian and kernel, and change to usxgmii…afair i had tried it,but currently it is base-r

1 Like

@sinovoip Hello, I’m using BPI-R4Pro-8X-BE14-MT76-OpenWRT24.10-DSA-251229 — this issue from the current discussion thread is still relevant for the present version; would it be possible to include this patch in the next release?

BPI-R4Pro-8X-BE14-MT76-OpenWRT24.10-DSA-251229 the version image have already included the patch.

&mmc0 { pinctrl-names = “default”; pinctrl-0 = <&mmc1_pins_default>;

  • max-frequency = <52000000>;
  • max-frequency = <48000000>;

Why should the sdmc speed reduction telated to the mac 1g flapping? But interesting that you also reduce speed too

Then this patch doesn’t solve the issue with the WAN RJ & SFP — the upload speed drops to 100 Mbps.

I ran additional tests, and here’s the issue: the upload speed drops to 100 Mbps when I’m connected via the LAN RJ45 10G port. The ISP connection was tested alternately through the WAN RJ45 10G port and the SFP WAN port. However, once I switch the PC from the 10G LAN port to the 2.5G port, the symmetric 1 Gbps speed is restored.

I’m testing my BPI-R4 Pro with OpenWrt 24.10-SNAPSHOT. I noticed the following behavior:

  • PC NIC: Intel I225-V 2.5G
  • When connecting via LAN 2.5G ports (mxl_lan0–3) → upload/download is normal, full 2.5G/2.5G
  • When connecting the same PC to 10G combo RJ45/SFP+ port → download is fine, but upload drops to ~100 Mbps
  • On Windows, the link shows 2.5G/2.5G, so the PHY negotiation is correct.

I’ve attached the ethtool mxl_lan5 output for reference.

It seems that the 10G MAC + DSA driver in OpenWrt 24.10 cannot handle TX at 2.5G NBASE-T speeds, although the PHY link is established correctly. Using a 1G NIC on the PC works fine.

Settings for mxl_lan5:
        Supported ports: [ TP    MII ]
        Supported link modes:   100baseT/Full
                                1000baseT/Half 1000baseT/Full
                                10000baseT/Full
                                2500baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  100baseT/Full
                                1000baseT/Half 1000baseT/Full
                                10000baseT/Full
                                2500baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 2500Mb/s
        Duplex: Full
        Auto-negotiation: on
        Port: Twisted Pair
        PHYAD: 18
        Transceiver: external
        MDI-X: Unknown
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes

Update:

I’ve confirmed that this issue occurs only when the PC NIC is in auto-negotiation mode. In this case, Windows negotiates 2.5G/2.5G, but ethtool on OpenWrt still shows the partner advertised modes only up to 1G. Despite this, the physical link is established at 2.5G.

Temporary workaround: forcing the Intel I225-V NIC in Windows to 1G Full Duplex restores normal upload speeds.

Ideally, I’d like a solution so that the 10G combo LAN port on the BPI-R4 can handle 2.5G TX reliably, without limiting the PC NIC speed.

Hello friend, could you please tell me which mirror of the official website you used for the test, 20251229 or 251125?

Hi, I used this version — BPI-R4Pro-8X-BE14-MT76-OpenWRT24.10-DSA-251229, taken from here Banana Pi BPI-R4 Pro Wifi7 Router board design with Mediatek MT7988A | BananaPi Docs.

do you experience this only on the lan 10g port?

d16549a1a59d5a93ee5c0011d36f758c11f59773 - openwrt/feeds/mtk-openwrt-feeds - Gitiles

3). Change mxl862xx DSA CPU port to 10GBASE-R and mxl_lan5 to USXGMII, although the mxl862xx DSA driver ignores these settings.

it looks like the DSA driver of the switch where the 10g port is connected ignores USXGMII and is not able to autonegotiate… hence your issue.

also:

2). Change AN8831X interface to USXGMII to avoid low throughput when linking at non-10Gbps, since 10GBASE-R does not support rate adaptation.

This was pushed on the 12th of jan and probably included in the image of the 29th of december from sinovoip

as i said in another thread to me that patch from mediatek corresponds to line 3 in the screenshot from lastes image from sinovoip

@frank-w fyi

1 Like

Yes, only at 10G. For that one, I have to manually set 1G in the network adapter settings in Windows. At the same time, the neighboring 2.5G port works perfectly and doesn’t throttle the uplink speed.

well this clearly matches with " 3). Change mxl862xx DSA CPU port to 10GBASE-R and mxl_lan5 to USXGMII, although the mxl862xx DSA driver ignores these settings."

means that mediatek switched the ports in usxgmii mode to achieve autonegotiation but because the lan 10g port is behind the maxlinear switch it won’t work as DSA driver ignores that settings.

For now there is no solution. The only one could save us is @dangowrt for a DSA driver that supports that :smiley:

1 Like

P5 (cpu port) is really strange as it is changed from usxgmii to 10gbase-r,but gmac2 should be configured as usxgmii (not changed in patch).

I made some tests with Christian (dev from as phy) and we had some issues with the phy when running in usxgmii mode. Afair it was with rate adaption at lower speeds,but not sure.

Apparently, the way out of this situation is to buy a 10G network card for the PC :rofl:

1 Like

or proper sfp+ rj45 transceiver to avoid using the aeonsemi

If there’s any info about a module that supports 1/2.5/10 Gbit/s and works in this port, please let me know ))