[BPI-R2] Adding second gmac to 4.14

Hi,

I am also having problems with Banana Pi r2 v1.[12] when it comes to have high loads on multiple interfaces. Example: If there is only forward traffic from wan to lan0 interface (or vice-versa) no problems are note, but if during this traffic I start another traffic, by example, going out from lan1 interface, the output traffic simply does not work.

All these tests were made by using iperf and scp on OpenWrt 18.06.1, r7258-5eb055306f initramfs kernel.

I also compiled the entire openwrt trunk version and the result was the same even making some changes on gmac code on the dts file referenced in this thread but again, no solution.

Well, have we some news on this thread?

Thanks!

i do not know openwrt much, can you try with my 4.14-kernel(s) in debian/ubuntu?

remember, all kernels except 4.14.53+ (from me), 4.9 (from me or banana-pi-openwrt-repo) use single gmac. that means you have 1GbE (imho 2G Burst) lane between SOC and Switch. if you have 1 GB Traffic from 1 Port to another no more Traffic is possible from another Port. 2nd Gmac brings a second cpu-port (eth1) to minimize this effect.

imho all Traffic have to go from switch to CPU and Back (to the other port)

I will try to apply your changes to my openwrt 4.14.68 and 4.14.79 sources.

Thanks Frank

4.14-code is here: https://github.com/frank-w/BPI-R2-4.14/pull/32 or https://github.com/frank-w/BPI-R2-4.14/commit/a293bdb3d53aac4216fb379f84aa25aa65aaa3ef

Currently it does not work on higher kernel-versions

Any update on that? As far as I see the patches have neither landed in openwrt nor in the the mainline kernel.

See current code in 5.4-gmac branch…as you see the difference is minimal, only label-support (that have to be more generic) and dts for enabling second gmac…

https://github.com/frank-w/BPI-R2-4.14/commits/5.4-gmac

So you found the problem with the strange (t)rgmii behavior? Just for my interest, I wondered what exactly the port6 is? I assumed the switch is connected via gmac0.

Are the 4.14 branches up to date with the 5.4 branch? Otherwise I would backport this changes to 4.14 for OpenWRT.

Port 6 is switch side…

Current Patches are based on phylink modifications so it is not enough porting my changes back…

And no,we do not found cause of trgmii-issue…