Strange packet loss

I thought 5.3-phylink was working…So 5.4 should work too

Yes 5.3.0-rc1-bpi-r2-phylink-2.5 was working,
but 5.3-main and above just stopped working. I don’t understand this :frowning:

Mhm maybe 5.3-phylink has routed wan over gmac2…will add patches tomorrow

1 Like

have added second gmac-patches here: https://github.com/frank-w/BPI-R2-4.14/tree/5.4-gmac

But have not yet tested it due to missing time…

have now tried 5.4-gmac-branch and run dhclient on both gmacs (wan+lan2)

both are working and giving good traffic (lan2=940Mbit/s,wan~915-940Mbit/s) with iperf3 without retransmitts

Zusammenfassung
root@bpi-r2:~# ip link set wan up
[ 433.276386] mtk_soc_eth 1b100000.ethernet wan: PHY [mdio-bus:00] driver [Generic PHY]
[ 433.284343] mtk_soc_eth 1b100000.ethernet wan: configuring for phy/rgmii link mode
root@bpi-r2:~# [ 437.448610] mtk_soc_eth 1b100000.ethernet wan: Link is Up - 1Gbps/Full - flow control off
[ 437.456820] IPv6: ADDRCONF(NETDEV_CHANGE): wan: link becomes ready

root@bpi-r2:~#
root@bpi-r2:~#
root@bpi-r2:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 62:16:69:7e:d6:fc brd ff:ff:ff:ff:ff:ff
inet6 fe80::6016:69ff:fe7e:d6fc/64 scope link
valid_lft forever preferred_lft forever
3: wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 5a:8b:a4:e6:11:dc brd ff:ff:ff:ff:ff:ff
inet6 fe80::588b:a4ff:fee6:11dc/64 scope link
valid_lft forever preferred_lft forever
4: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
5: lan0@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
link/ether 08:00:00:00:00:01 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.11/24 brd 192.168.0.255 scope global lan0
valid_lft forever preferred_lft forever
inet6 fe80::a00:ff:fe00:1/64 scope link
valid_lft forever preferred_lft forever
6: lan1@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 62:16:69:7e:d6:fc brd ff:ff:ff:ff:ff:ff
7: lan2@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 62:16:69:7e:d6:fc brd ff:ff:ff:ff:ff:ff
8: lan3@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 62:16:69:7e:d6:fc brd ff:ff:ff:ff:ff:ff
root@bpi-r2:~# ip add del 192.168.0.11/24 dev lan0
root@bpi-r2:~# dhclient wan
root@bpi-r2:~# ip addr show wan
3: wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 5a:8b:a4:e6:11:dc brd ff:ff:ff:ff:ff:ff
inet 192.168.0.105/24 brd 192.168.0.255 scope global dynamic wan
valid_lft 172791sec preferred_lft 172791sec
inet6 fe80::588b:a4ff:fee6:11dc/64 scope link
valid_lft forever preferred_lft forever
root@bpi-r2:~#

made same for lan2 (to use the other gmac)...also works in my test, only see a strange vlan-message on bringing up

root@bpi-r2:~# ip link set lan2 up
[ 594.156547] mt7530 mdio-bus:1f lan2: configuring for phy/gmii link mode
[ 594.163658] 8021q: adding VLAN 0 to HW filter on device lan2
root@bpi-r2:~# [ 598.328964] mt7530 mdio-bus:1f lan2: Link is Up - 1Gbps/Full - flow control off
[ 598.336307] IPv6: ADDRCONF(NETDEV_CHANGE): lan2: link becomes ready

root@bpi-r2:~#
root@bpi-r2:~# ip addr show lan2
7: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 62:16:69:7e:d6:fc brd ff:ff:ff:ff:ff:ff
inet6 fe80::6016:69ff:fe7e:d6fc/64 scope link
valid_lft forever preferred_lft forever
root@bpi-r2:~# dhclient lan2
root@bpi-r2:~# ip addr show lan2
7: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 62:16:69:7e:d6:fc brd ff:ff:ff:ff:ff:ff
inet 192.168.0.118/24 brd 192.168.0.255 scope global dynamic lan2
valid_lft 172798sec preferred_lft 172798sec
inet6 fe80::6016:69ff:fe7e:d6fc/64 scope link
valid_lft forever preferred_lft forever
1 Like

Yes! Everything is working fine. Cloudflare is running, dnscrypt-proxy have all servers avaliable and I can use git.

Thank you @frank-w! :grinning:

Best regards.

as far as we know now, trgmii seems to be broken for gmac1, after setting to rgmii or moving wan to the rgmii-configured gmac2 it’s reported to be fixed…

@bialy39 can you please try this branch?

maybe change trgmii to rgmii in older kernel-versions without phylink (i guess the problem is also there, and rene took some values from the existing code)

Could you try latest openwrt-snapshot?

http://downloads.openwrt.org/snapshots/targets/mediatek/mt7623/

Mhm…it is still 4.14 and should work like my 4.14 if dql-patch is dropped…