New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide adjustment of TX/RX delay on sun50i*/sun8iw11p1 through boot script? #546
Comments
These are the results of a normal 2GB Pine64+ and a pre-release 1GB dev sample against a MacBook Pro connected to the same switch:
|
Next round of tests. This is exactly the same setup (cables, PSU, switch, SD card) than before but now testing against a virtualized Ubuntu Xenial running in ESXi on a Mac Mini connected to same switch. Only difference: script now always correctly reports throughput in
I fail to interpret the results (partially better 'performance' and also higher count of re-transmits). Needs more testing. |
Almost forgot: The main 'consumer' of this stuff might be Banana Pi M2 Ultra since also using 3.10 Allwinner BSP kernel and most probably shipping with broken settings. |
Did you have any issues with the pine64 hitting the the 'call trace' errors that are documented in #502 when running this script? Could it be related to the jessie build rather than the xenial? (I had intended to run the xenial build but it looks like my nice new evo SD is a fake and is knackered, so fell back to a reliable sandisk w/ jessie). I keep hitting them every couple of reboots, and a manual reset seems to kick it along again... Oh, and good thing you never claimed this would improve performance... I don't like the "[ 5] 9.00-10.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes" type results :-P Battery + clean 5v input, no serial or peripherals connected, pine64+ 1GB |
Nope. While testing the two Pine64+ rebooted a few hundred times but never ran into this issue. I used a Xenial build from 2 days ago but I don't think this is distro specific. Might sound like a lame excuse but when our support for a board leaves beta state most problems from then on are related to SD card or insufficient power supply. This whole testing is more about getting an idea how to support new GbE boards but it might also help with Pine64+ since the defaults we now use (3/0 TX/RX) might not be the best for all board revisions. But for this more numbers are needed. |
@pfeerick |
@ThomasKaiser : No, not lame as it's the most common reason... but I don't beleive it to be the case this time - I was using good power and good microSD, so was wondering if there was something that could be distro specific else I was thinking it's a glitch with the board or something I'd done with the jessie image :-/ @zador-blood-stained I'd run an apt-get update && apt-get upgrade just before running this, so as far as I knew I was running the latest 'release' kernel. I'll try the beta one to see if that makes any difference. |
@zador-blood-stained Well, I moved to the beta repo and let that update the kernel and a couple other packages, and only had one manual reset intervention... so I can also report that the newer kernel seems much less hang-prone-at-boot. @ThomasKaiser Here is of that lovely data you like ;) The only variation I made from your testing schedule was to increase the delay before the script ran... the ethernet appear to be not always be up when the script was run.
|
Just a quick note: with latest beta image I ran today already two times into this 'call trace' issue and booting failed. And old OS image is overwritten :( |
Some results with the 1GB dev sample against the virtualized Linux (compared with these results before) and Pine Inc's gmactxonly 'fix':
So this 'fix' is nothing to be considered since performance gets horribly low compared to above numbers. Maybe only for those defective boards. But I still consider defective hardware defective and not software should fix it but replacement or a refund. |
If this here has any meaning then Olimex' A64 board will use 6/0 TX/RX delay. OTOH the dmesg file in the same dir shows only Fast Ethernet negotiation. |
So we may add 2 environment variables to pine64 boot script, so if This will leave default values in DT, but will give end users a relatively easy way to adjust things. |
@zador-blood-stained yes, this would be great. If I understood @apritzel correctly then same parameters also help improving GbE performance/stability with mainline kernel. Finding optimal default values can be postponed for now and maybe this tweak will help here too. |
Once we have final or close to final Ethernet driver and DT bindings for it we will be able to handle it. For now let's deal with legacy stuff that won't be changed anytime soon. |
U-boot part was implemented in 99d50c6, and if you think that this is enough (I mean no extra userspace scripts or |
Thank you very much! Closed since armbian/documentation@287affb |
Btw, if you need to do more tests with the RX/TX delay, I can provide you with some magic runes to change the delays at runtime from Linux userland, so without the need to tweak DT & reboot. Just let me know and I can work out the commands. |
This would be great! Since I would assume it's the same for H5 please ping also ErwinH in IRC and point to the discussion/commands. :) |
So I hacked my "peekpoke" tool yesterday and it really worked that way: |
Alright, I created https://github.com/apritzel/peekpoke, which is my version of devmem2. I found the latter broken for 64-bit, also I wanted to issue multiple requests in one go (to access devices), so I came up with this. No README so far, but calling it with -h gives some info. DISCLAIMER: Please use at your own risk, as this is open-heart surgery, poking in physical memory and accessing devices directly. Watch for typos, they could be fatal. Make sure you saved all your precious data. The EMAC's driver open() routine resets the delay values to the one from the DT, I believe @tkaiser: if you are really sick, you can even tweak the CPU clock with this tool, by adapting the magic runes I gave you once for U-Boot. |
@apritzel Thanks for this, did Small note on measurements: I didn't go through all possible values but only tested worst case (rx-delay=7 -- immediately lost network connectivity) and then tx-delay from 0 to 6 while rx-delay was set to 0. With 2/0 or 3/0
Every |
Just to save others some time. It should read instead (and works as expected!):
|
Something for the future, what I'm using on RK3328: https://github.com/ayufan-rock64/linux-build/blob/master/recipes/gmac-delays-test/range-test |
I'm sorry but it shows segfault (no additional info) when called on a target device (AW T113 with Tina-cloned buildroot). Original memtool works ok. Where shall i dig? |
Based on current testing it seems different Pine64+ hardware revisions might work better with different TX/RX delay settings. Since we're able to set custom values via
fdt set
command from boot script I thought I create this issue to provide a script to test boards and to collect results.Based on results collected we could then allow individual settings in
/boot/armbianEnv.txt
or maybe auto detect board revisions and set up things accordingly.The script as follows:
It requires another GbE capable host preferrable on the same switch running
iperf3 -s
and IP address or name has to be adjusted in$TestPartner
variable. This other host must exceed 930 Mbits/sec when testing withiperf3
so first test is always with 2 other GbE capable devices to ensure$TestPartner
is capable of saturating a GbE link.Also both
$SourceDTS
and$TargetDTB
variables have to be adjusted and both delay values have to be set to these defaults (otherwise replacement throughsed
will fail):The text was updated successfully, but these errors were encountered: