Source: u-boot Version: 2019.01+dfsg-4 Severity: important -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Dear Maintainer, Olimex team working with FreedomBox team have noticed a significant slowdown in Gigabit Ethernet when transmitting. Original report from Olimex team is attached. This is applicable for hardware Rev.G2 of the A20 OLinuXino Lime2 board. Olimex team have sent a patch that fixes the issue for Rev.G2 (attached). Multiple team members from FreedomBox have confirmed that the patch fixes transmit performance issue for Rev.G2 and yields good transmit/receive performance. However this patch makes the situation worse for Rev.C (my test results attached). I believe this issue is separate from #845128 (will post more information there) which already causes *receive* performance to be bad on Rev.C. ===================================== Report from Olimex team (with Rev.G2) ===================================== Our test shows that speed in TX side is very slow and unstable. The problem is in the wrong clock delay settings. We corrected this settings in our image and recommend you to change the TX delay too. You have to change value of CCM_GMAC_CTRL_TX_CLK_DELAY register on address 0x01c20164 from 0x00000006 to 0x00001006. This should be changed in the u-boot sources and the image should be compiled again. - ------------------------------------------------------------------------------ Tests with original image. Unchaged CCM_GMAC_CTRL_TX_CLK_DELAY value(00000006) - ------------------------------------------------------------------------------ => md.l 0x01c20164 1 01c20164: 00000006 admin@freedombox:~$ iperf3 -c 192.168.0.60 -p 2001 Connecting to host 192.168.0.60, port 2001 [ 5] local 192.168.0.135 port 57448 connected to 192.168.0.60 port 2001 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 375 KBytes 3.07 Mbits/sec 32 4.24 KBytes [ 5] 1.00-2.00 sec 1.67 MBytes 14.0 Mbits/sec 147 9.90 KBytes [ 5] 2.00-3.00 sec 4.49 MBytes 37.6 Mbits/sec 261 2.83 KBytes [ 5] 3.00-4.00 sec 669 KBytes 5.48 Mbits/sec 61 5.66 KBytes [ 5] 4.00-5.00 sec 2.78 MBytes 23.3 Mbits/sec 160 1.41 KBytes [ 5] 5.00-6.00 sec 829 KBytes 6.79 Mbits/sec 88 1.41 KBytes [ 5] 6.00-7.00 sec 1.47 MBytes 12.4 Mbits/sec 94 2.83 KBytes [ 5] 7.00-8.00 sec 1.55 MBytes 13.0 Mbits/sec 98 1.41 KBytes [ 5] 8.00-9.00 sec 2.47 MBytes 20.8 Mbits/sec 169 1.41 KBytes [ 5] 9.00-10.00 sec 700 KBytes 5.73 Mbits/sec 44 2.83 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 16.9 MBytes 14.2 Mbits/sec 1154 sender [ 5] 0.00-10.00 sec 16.8 MBytes 14.1 Mbits/sec receiver iperf Done. admin@freedombox:~$ iperf3 -c 192.168.0.60 -p 2001 -R Connecting to host 192.168.0.60, port 2001 Reverse mode, remote host 192.168.0.60 is sending [ 5] local 192.168.0.135 port 57452 connected to 192.168.0.60 port 2001 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 97.1 MBytes 814 Mbits/sec [ 5] 1.00-2.00 sec 98.2 MBytes 824 Mbits/sec [ 5] 2.00-3.00 sec 98.5 MBytes 826 Mbits/sec [ 5] 3.00-4.00 sec 48.6 MBytes 408 Mbits/sec [ 5] 4.00-5.00 sec 98.2 MBytes 824 Mbits/sec [ 5] 5.00-6.00 sec 97.9 MBytes 821 Mbits/sec [ 5] 6.00-7.00 sec 98.2 MBytes 824 Mbits/sec [ 5] 7.00-8.00 sec 97.7 MBytes 820 Mbits/sec [ 5] 8.00-9.00 sec 98.4 MBytes 826 Mbits/sec [ 5] 9.00-10.00 sec 27.5 MBytes 231 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 861 MBytes 722 Mbits/sec 58 sender [ 5] 0.00-10.00 sec 860 MBytes 722 Mbits/sec receiver iperf Done. - ------------------------------------------------------------------------- Test with CCM_GMAC_CTRL_TX_CLK_DELAY value set to 00001006 - ------------------------------------------------------------------------- => md.l 0x01c20164 1 01c20164: 00001006 .... admin@freedombox:~$ iperf3 -c 192.168.0.60 -p 2001 Connecting to host 192.168.0.60, port 2001 [ 5] local 192.168.0.135 port 53002 connected to 192.168.0.60 port 2001 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 47.5 MBytes 398 Mbits/sec 0 153 KBytes [ 5] 1.00-2.01 sec 53.8 MBytes 448 Mbits/sec 0 206 KBytes [ 5] 2.01-3.00 sec 32.8 MBytes 277 Mbits/sec 1 235 KBytes [ 5] 3.00-4.00 sec 67.5 MBytes 567 Mbits/sec 0 235 KBytes [ 5] 4.00-5.00 sec 56.2 MBytes 471 Mbits/sec 0 235 KBytes [ 5] 5.00-6.02 sec 48.8 MBytes 400 Mbits/sec 0 235 KBytes [ 5] 6.02-7.01 sec 47.5 MBytes 402 Mbits/sec 0 235 KBytes [ 5] 7.01-8.02 sec 48.8 MBytes 406 Mbits/sec 0 235 KBytes [ 5] 8.02-9.00 sec 60.5 MBytes 516 Mbits/sec 0 267 KBytes [ 5] 9.00-10.01 sec 47.5 MBytes 396 Mbits/sec 0 267 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.01 sec 511 MBytes 428 Mbits/sec 1 sender [ 5] 0.00-10.01 sec 511 MBytes 428 Mbits/sec receiver iperf Done. admin@freedombox:~$ iperf3 -c 192.168.0.60 -p 2001 -R Connecting to host 192.168.0.60, port 2001 Reverse mode, remote host 192.168.0.60 is sending [ 5] local 192.168.0.135 port 53006 connected to 192.168.0.60 port 2001 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 46.1 MBytes 387 Mbits/sec [ 5] 1.00-2.00 sec 97.2 MBytes 816 Mbits/sec [ 5] 2.00-3.00 sec 97.2 MBytes 815 Mbits/sec [ 5] 3.00-4.00 sec 97.2 MBytes 815 Mbits/sec [ 5] 4.00-5.00 sec 97.4 MBytes 816 Mbits/sec [ 5] 5.00-6.00 sec 97.1 MBytes 815 Mbits/sec [ 5] 6.00-7.00 sec 97.3 MBytes 817 Mbits/sec [ 5] 7.00-8.00 sec 97.7 MBytes 820 Mbits/sec [ 5] 8.00-9.00 sec 97.5 MBytes 818 Mbits/sec [ 5] 9.00-10.00 sec 97.6 MBytes 818 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 923 MBytes 774 Mbits/sec 48 sender [ 5] 0.00-10.00 sec 922 MBytes 774 Mbits/sec receiver =================================== Test results without patch on Rev.C =================================== root@freedombox:~# iperf3 -c 10.42.1.1 -R Connecting to host 10.42.1.1, port 5201 Reverse mode, remote host 10.42.1.1 is sending [ 5] local 10.42.1.139 port 48228 connected to 10.42.1.1 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 281 KBytes 2.30 Mbits/sec [ 5] 1.00-2.00 sec 60.8 KBytes 498 Kbits/sec [ 5] 2.00-3.00 sec 0.00 Bytes 0.00 bits/sec [ 5] 3.00-4.00 sec 158 KBytes 1.30 Mbits/sec [ 5] 4.00-5.00 sec 235 KBytes 1.92 Mbits/sec [ 5] 5.00-6.00 sec 110 KBytes 903 Kbits/sec [ 5] 6.00-7.00 sec 228 KBytes 1.86 Mbits/sec [ 5] 7.00-8.00 sec 109 KBytes 892 Kbits/sec [ 5] 8.00-9.00 sec 0.00 Bytes 0.00 bits/sec [ 5] 9.00-10.00 sec 112 KBytes 916 Kbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.04 sec 1.38 MBytes 1.15 Mbits/sec 188 sender [ 5] 0.00-10.00 sec 1.26 MBytes 1.06 Mbits/sec receiver iperf Done. root@freedombox:~# iperf3 -c 10.42.1.1 Connecting to host 10.42.1.1, port 5201 [ 5] local 10.42.1.139 port 48232 connected to 10.42.1.1 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.01 sec 65.8 MBytes 545 Mbits/sec 0 468 KBytes [ 5] 1.01-2.01 sec 67.5 MBytes 567 Mbits/sec 0 468 KBytes [ 5] 2.01-3.01 sec 66.5 MBytes 556 Mbits/sec 0 673 KBytes [ 5] 3.01-4.00 sec 67.2 MBytes 570 Mbits/sec 0 841 KBytes [ 5] 4.00-5.01 sec 53.8 MBytes 450 Mbits/sec 0 841 KBytes [ 5] 5.01-6.01 sec 65.0 MBytes 545 Mbits/sec 0 841 KBytes [ 5] 6.01-7.02 sec 46.2 MBytes 384 Mbits/sec 0 841 KBytes [ 5] 7.02-8.02 sec 66.2 MBytes 556 Mbits/sec 0 884 KBytes [ 5] 8.02-9.00 sec 68.6 MBytes 583 Mbits/sec 0 884 KBytes [ 5] 9.00-10.01 sec 63.1 MBytes 525 Mbits/sec 0 1.09 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.01 sec 630 MBytes 528 Mbits/sec 0 sender [ 5] 0.00-10.05 sec 630 MBytes 526 Mbits/sec receiver iperf Done. root@freedombox:~# mii-tool eth0 -A 100BaseTx-FD restarting autonegotiation... root@freedombox:~# iperf3 -c 10.42.1.1 Connecting to host 10.42.1.1, port 5201 [ 5] local 10.42.1.139 port 48236 connected to 10.42.1.1 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 11.5 MBytes 96.0 Mbits/sec 0 119 KBytes [ 5] 1.00-2.00 sec 11.2 MBytes 94.4 Mbits/sec 0 124 KBytes [ 5] 2.00-3.00 sec 11.1 MBytes 92.7 Mbits/sec 0 139 KBytes [ 5] 3.00-4.00 sec 11.2 MBytes 94.3 Mbits/sec 0 139 KBytes [ 5] 4.00-5.00 sec 11.2 MBytes 94.4 Mbits/sec 0 139 KBytes [ 5] 5.00-6.00 sec 11.2 MBytes 93.9 Mbits/sec 0 139 KBytes [ 5] 6.00-7.00 sec 11.3 MBytes 94.9 Mbits/sec 0 139 KBytes [ 5] 7.00-8.00 sec 11.2 MBytes 93.8 Mbits/sec 0 139 KBytes [ 5] 8.00-9.00 sec 11.2 MBytes 93.8 Mbits/sec 0 139 KBytes [ 5] 9.00-10.00 sec 11.2 MBytes 93.8 Mbits/sec 0 139 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 112 MBytes 94.2 Mbits/sec 0 sender [ 5] 0.00-10.04 sec 112 MBytes 93.6 Mbits/sec receiver iperf Done. root@freedombox:~# iperf3 -c 10.42.1.1 -R Connecting to host 10.42.1.1, port 5201 Reverse mode, remote host 10.42.1.1 is sending [ 5] local 10.42.1.139 port 48240 connected to 10.42.1.1 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 11.2 MBytes 94.3 Mbits/sec [ 5] 1.00-2.00 sec 11.2 MBytes 93.7 Mbits/sec [ 5] 2.00-3.00 sec 11.2 MBytes 93.7 Mbits/sec [ 5] 3.00-4.00 sec 11.2 MBytes 93.7 Mbits/sec [ 5] 4.00-5.00 sec 11.2 MBytes 93.7 Mbits/sec [ 5] 5.00-6.00 sec 11.2 MBytes 93.7 Mbits/sec [ 5] 6.00-7.00 sec 11.2 MBytes 93.7 Mbits/sec [ 5] 7.00-8.00 sec 11.2 MBytes 93.7 Mbits/sec [ 5] 8.00-9.00 sec 11.2 MBytes 93.7 Mbits/sec [ 5] 9.00-10.00 sec 11.2 MBytes 93.7 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.04 sec 113 MBytes 94.6 Mbits/sec 0 sender [ 5] 0.00-10.00 sec 112 MBytes 93.7 Mbits/sec receiver iperf Done. ================================ Test results with patch on Rev.C ================================ root@freedombox:~# iperf3 -c 10.42.1.1 Connecting to host 10.42.1.1, port 5201 [ 5] local 10.42.1.139 port 46460 connected to 10.42.1.1 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 63.6 KBytes 521 Kbits/sec 19 1.41 KBytes [ 5] 1.00-2.00 sec 0.00 Bytes 0.00 bits/sec 1 1.41 KBytes [ 5] 2.00-3.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 5] 3.00-4.00 sec 0.00 Bytes 0.00 bits/sec 8 2.83 KBytes [ 5] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec 2 1.41 KBytes [ 5] 5.00-6.00 sec 0.00 Bytes 0.00 bits/sec 1 1.41 KBytes [ 5] 6.00-7.00 sec 0.00 Bytes 0.00 bits/sec 3 1.41 KBytes [ 5] 7.00-8.00 sec 43.8 KBytes 359 Kbits/sec 3 1.41 KBytes [ 5] 8.00-9.00 sec 0.00 Bytes 0.00 bits/sec 5 1.41 KBytes [ 5] 9.00-10.00 sec 0.00 Bytes 0.00 bits/sec 12 2.83 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 107 KBytes 88.0 Kbits/sec 54 sender [ 5] 0.00-10.04 sec 74.9 KBytes 61.1 Kbits/sec receiver iperf Done. root@freedombox:~# iperf3 -c 10.42.1.1 -R Connecting to host 10.42.1.1, port 5201 Reverse mode, remote host 10.42.1.1 is sending [ 5] local 10.42.1.139 port 46464 connected to 10.42.1.1 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 107 KBytes 880 Kbits/sec [ 5] 1.00-2.00 sec 1.41 KBytes 11.6 Kbits/sec [ 5] 2.00-3.00 sec 29.7 KBytes 243 Kbits/sec [ 5] 3.00-4.00 sec 7.07 KBytes 57.9 Kbits/sec [ 5] 4.00-5.00 sec 1.41 KBytes 11.6 Kbits/sec [ 5] 5.00-6.00 sec 0.00 Bytes 0.00 bits/sec [ 5] 6.00-7.04 sec 11.3 KBytes 88.9 Kbits/sec [ 5] 7.04-8.00 sec 5.66 KBytes 48.4 Kbits/sec [ 5] 8.00-9.00 sec 4.24 KBytes 34.7 Kbits/sec [ 5] 9.00-10.00 sec 4.24 KBytes 34.7 Kbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.01 sec 255 KBytes 208 Kbits/sec 54 sender [ 5] 0.00-10.00 sec 173 KBytes 141 Kbits/sec receiver iperf Done. root@freedombox:~# mii-tool eth0 -A 100BaseTx-FD restarting autonegotiation... root@freedombox:~# iperf3 -c 10.42.1.1 -R Connecting to host 10.42.1.1, port 5201 Reverse mode, remote host 10.42.1.1 is sending [ 5] local 10.42.1.139 port 46472 connected to 10.42.1.1 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 11.2 MBytes 94.3 Mbits/sec [ 5] 1.00-2.00 sec 11.2 MBytes 93.7 Mbits/sec [ 5] 2.00-3.00 sec 11.2 MBytes 93.7 Mbits/sec [ 5] 3.00-4.00 sec 11.2 MBytes 93.7 Mbits/sec [ 5] 4.00-5.00 sec 11.2 MBytes 93.7 Mbits/sec [ 5] 5.00-6.00 sec 11.2 MBytes 93.7 Mbits/sec [ 5] 6.00-7.00 sec 5.82 MBytes 48.8 Mbits/sec [ 5] 7.00-8.00 sec 11.2 MBytes 93.5 Mbits/sec [ 5] 8.00-9.00 sec 11.1 MBytes 93.3 Mbits/sec [ 5] 9.00-10.00 sec 11.2 MBytes 93.7 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.04 sec 107 MBytes 89.7 Mbits/sec 1 sender [ 5] 0.00-10.00 sec 106 MBytes 89.2 Mbits/sec receiver iperf Done. root@freedombox:~# iperf3 -c 10.42.1.1 Connecting to host 10.42.1.1, port 5201 [ 5] local 10.42.1.139 port 46476 connected to 10.42.1.1 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 11.4 MBytes 95.9 Mbits/sec 0 116 KBytes [ 5] 1.00-2.00 sec 11.2 MBytes 94.4 Mbits/sec 0 127 KBytes [ 5] 2.00-3.00 sec 11.4 MBytes 95.4 Mbits/sec 0 134 KBytes [ 5] 3.00-4.00 sec 11.2 MBytes 93.8 Mbits/sec 0 134 KBytes [ 5] 4.00-5.00 sec 5.97 MBytes 50.0 Mbits/sec 0 134 KBytes [ 5] 5.00-6.00 sec 10.8 MBytes 90.7 Mbits/sec 0 140 KBytes [ 5] 6.00-7.00 sec 11.2 MBytes 93.8 Mbits/sec 0 140 KBytes [ 5] 7.00-8.00 sec 11.4 MBytes 95.4 Mbits/sec 0 140 KBytes [ 5] 8.00-9.00 sec 11.2 MBytes 93.8 Mbits/sec 0 140 KBytes [ 5] 9.00-10.00 sec 11.2 MBytes 94.3 Mbits/sec 0 140 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 107 MBytes 89.8 Mbits/sec 0 sender [ 5] 0.00-10.04 sec 107 MBytes 89.1 Mbits/sec receiver iperf Done. - -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 4.19.0-4-amd64 (SMP w/4 CPU cores) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_IN.UTF-8, LC_CTYPE=en_IN.UTF-8 (charmap=UTF-8), LANGUAGE=en_IN.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled -----BEGIN PGP SIGNATURE----- iQJFBAEBCgAvFiEE5xPDY9ZyWnWupXSBQ+oc/wqnxfIFAly5C6YRHHN1bmlsQG1l ZGhhcy5vcmcACgkQQ+oc/wqnxfL8XA//ZUafL2tt7IN813ild+134HPKYrygL0LE SCKEJCMSf62rzAyu0MX8+CKLFKY39j9W21SuZ5mdBVFEXY2dOxvSd+JRwqldJZx7 uTjycsAT6pu0tAwgGgAetDXWTiW0WGDuoi+x/g0Pnsa9GQRd77hNRZ70b9rwGzSI Hi/YAAt6MGvKb+SgyxQ+xzVa9wVKnQVs/7/aM7q2GHF7VxAtpKSO/FEEsKPKa0tn YIfQNq7SuiCAIsKDGE6sXN1Vf/uKdxz03G9rdNwMSMAQZpvOwx/e0Tz3jbZWszz9 xXmCl2ZAli0p12sKGzR5J8yh5UGBFaeVx58BNbfrOS1sDdYpuEG0Ynp6F5bliqHR 0vjK2GXyL2rQAtEzm5iuERvm4+5ukf6X7hqbkXfoDcuC5edsJiXoQ3u0gc4r4fbu s8proHISS0cRTGokIl2MW7K++Q+617kxG5FNf0x7Osw7NJ7nY769OqoPJ9MTSQg+ JjjdNJ5H4BahN4vDTz1rAI+NledP5kWaxL1qGUYfWfRtooG27aaU3NS5cWamizbo BmJgaVUYvFX91jtrJoIiAUM/o60AWxNIR8VbZigegRvihcuBgD68Q4Xk6l2C0Oj5 2yIKQVPCAfac4ahVnqKkEeJWaD8MFZ5JzFkHWREU9h218xpf7k5Dopwjy2HMgvJ7 odVoPsw94C4= =uqyK -----END PGP SIGNATURE-----
Index: u-boot/configs/A20-OLinuXino-Lime2_defconfig =================================================================== --- u-boot.orig/configs/A20-OLinuXino-Lime2_defconfig +++ u-boot/configs/A20-OLinuXino-Lime2_defconfig @@ -8,6 +8,7 @@ CONFIG_USB0_VBUS_PIN="PC17" CONFIG_USB0_VBUS_DET="PH5" CONFIG_I2C1_ENABLE=y CONFIG_SATAPWR="PC3" +CONFIG_GMAC_TX_DELAY=4 CONFIG_AHCI=y CONFIG_NR_DRAM_BANKS=1 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set