-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Boards with RK3399 (maybe others, like Rock64) needs TCP/UDP offloading disabled. #2028
Comments
Confirming that the RockPro64 also shares the same device ID from the other boards:
It's just a matter of creating a script
And |
Great work 👍 Ok, I updated our Rock64 image based on ayufan 0.7.9 yesterday. Can confirm the entry already exists:
In terms of adding this to patch during update, we need to be careful not to duplicate the entry, or conflict with a For the sake of stability due to the above, I believe we should leave the installed setting alone (if it exists), to avoid potential conflict? In terms of applying for the RockPro64, I believe I have a failed board, waiting for reply from Pine. Until then, unable to create the image. Regardless, we will use the Ayufan images aswell. |
This does not apply only to RockPro64 but to all RK3399 boards I tested. I think the correct would be creating a second file (not the "rock64-offload" that ayufan uses) that overrides the configuration to all boards that needs this. The setting to Rock64 could stay there since the ethtool command would be ran twice. |
Good point 👍 Ok, lets see if we can patch.
Not efficient. I believe it would be better if we check for pre-existing setting, then only add if it does not exist with?
|
If you check like this, it will match on the line for example for Rock64 board and not apply the command for the RK3399. I don't think Ayufan's file contains the ID for RK3399. I don't see a big problem on running the command twice in the worst case. BTW, I commented on a similar issue on Ayufan's repo to point this out. ayufan-rock64/linux-build#263 |
Yep agree, although, best to avoid it if possible. Ok, we could probably check and remove all file entries for |
Just to add, this behavior doesn't apply only to RockPro64 that Ayufan build. This also happens to the Firefly RK3399 and the FriendlyARM RK3399 SBCs. I believe it's a generic "problem" with Rockchip processors and 1Gbps ethernet. |
+ dietpi-disable_offload: https://github.com/Fourdee/DietPi/issues/2028#issue-352323603
+General | Resolved an issue with RK based network devices, where enabling offloading would cause stability issues. Many thanks to @carlosedp for this fix!: https://github.com/Fourdee/DietPi/issues/2028#issue-352323603
Testing Rock64: @carlosedp Previously (0.7.9 with ayufan's conf installed):
After applying your patch:
|
Check the first parameters (checksumming ones):
|
Appears to be working 👍
You can test on any device with patch:
|
**v6.15** (12/09/18) **Many thanks to PINE64, for becoming our 1st Patreon Legend and supporting our project! As one of their rewards, you will see PINE64 displayed on login via the DietPi-Banner.** **Known issues / In progress:** DietPi-Software | Open Bazaar: Installation updated to server version 2, which now runs via go language. At the current state, client OB connections are failing, still under investigation: https://github.com/Fourdee/DietPi/issues/1090#issuecomment-419613346 **Changes / Improvements / Optimizations:** General | Changed Survey and Bugreport uploads to use ssh.dietpi.com (previously IP): https://github.com/Fourdee/DietPi/issues/2022#issuecomment-415470064 General | 1st run setup and dietpi-update logs are now created in RAM, then copied to disk once completed '/var/tmp/dietpi/logs/dietpi-firstrun-setup.log'. This will speed up 1st run setup installation for slow SBCs and/or rootFS. General | PineA64: Image updated to v6.14, also contains the latest kernel/uboot by Ayufan (0.6.2): https://github.com/Fourdee/DietPi/issues/2026 General | Resolved an isssue where the initial 1st run connection test would fail, if timesync had not yet completed, and, the SSL cert of the connection test site is not valid for current date on system: https://github.com/Fourdee/DietPi/issues/2039 General | SparkySBC: Support for native DSD playback on iFi Pro iDSD. Many thanks @sudeep: https://github.com/sparky-sbc/sparky-test/tree/master/dsd-marantz DietPi-Backup/Sync | rsync transfer: Now shows progress information during the transfer: https://github.com/Fourdee/DietPi/issues/2044#issuecomment-417779406 DietPi-Backup | Added an option to delete the currently selected backup, if it exists. DietPi-Config | Advanced Options: You can now toggle if a real RTC is installed. This adds/removes 'fake-hwclock' package installation as requested: https://github.com/Fourdee/DietPi/issues/2041 DietPi-Config | Added support for setting CPU min/max frequencies on Intel based CPUs. NB: 'cpu' command will always list the min/max frequencies read from kernel values, Intel CPUs do not update these values, however, you can gauge CPU frequency range by running 'cpu' to monitor the current CPU freq (use of stress test in 'dietpi-config' may also help). DietPi-Drive_Manager | Added support to set a global idle duration, before drives are powered down. This feature uses hdparm. Not all drives will support this feature, however, its the best we can do, considering the lack of any standardised system across all drives, compatible with hdparm and visa versa: https://github.com/Fourdee/DietPi/issues/2001 DietPi-Drive_Manager | When mounting drives to existing directories, if the directory is empty, you will given an option to mount regardless. If the directory contains any files or data, mounting will be denied: https://github.com/Fourdee/DietPi/issues/2056 DietPi-Software | MPD: Updated to 0.20.21 and now includes SQL (sticker) support by default: https://github.com/Fourdee/DietPi/issues/2032#issuecomment-415559451 DietPi-Software | myMPD: Now available for installation. A recent fork of YMPD with additional features: https://github.com/Fourdee/DietPi/issues/2032#issuecomment-415559451 DietPi-Software | Emby: Reworked the installation to use standalone .debs, for fresh installations only. Now supports ARMv8 devices. ARMv6 devices are not supported: https://github.com/Fourdee/DietPi/issues/534#issuecomment-416405968 **Bug Fixes:** General | fake-hwclock: is now installed for all systems, due to 'hwclock' detection reporting incorrect results, for those devices without a RTC attached: https://github.com/Fourdee/DietPi/issues/2035#issuecomment-416345155 General | Resolved an issue where enabling the RPi camera (dietpi-config or installed via dietpi-software), would result in concurrent execution error: https://github.com/Fourdee/DietPi/issues/2008#issuecomment-414846353 General | Resolved an issue with RK based network devices, where enabling offloading would cause stability issues. Many thanks to @carlosedp for this fix!: https://github.com/Fourdee/DietPi/issues/2028#issue-352323603 General | Resolved an issue where automatic swapfile generation, would not run a freespace check prior: https://github.com/Fourdee/DietPi/issues/2048#issuecomment-417855645 DietPi-Automation | Resolved an issue where 'AUTO_SETUP_INSTALL_SOFTWARE_ID' would include numbers contained within comments: https://github.com/Fourdee/DietPi/issues/2036#issuecomment-416613903 DietPi-Cloudshell | Resolved incorrect RAM usage readout, and, inability to run from menu on same screen: https://github.com/Fourdee/DietPi/issues/2066 DietPi-Config | Resolved an issue with PineA64 resolution changes, due to updated uEnv.txt on the latest PineA64 image. NB: for this feature to work, you must have an installation of the latest PineA64 v6.14 image from the DietPi site: https://dietpi.com/phpbb/viewtopic.php?f=11&t=4431&p=14010#p14010 DietPi-Drive_Manager | Correctly handles bind mounts, contained within '/etc/fstab': https://github.com/Fourdee/DietPi/issues/2013 DietPi-Process_Tool | Resolved an issue with PIDs no longer existing, causing an apply to fail: https://github.com/Fourdee/DietPi/issues/2059 DietPi-Software | PlexPy/Tautulli: Resolved an issue with recent pre-req changes for this application, required for start functionality: https://github.com/Fourdee/DietPi/issues/2047 DietPi-Update | Resolved an issue where all required EMR patches, would not be applied, in the 1st pass of the patch_file.
Looks like I'm having this issue with large transfers on a NanoPi M4. Made a post about it here: https://unix.stackexchange.com/questions/494290/apache2-ssl-large-download-hangs. |
@TCB13 So if you are on current version (6.19.7), you issue should have a different cause. @carlosedp @Fourdee |
@MichaIng my post is a few days old, not years 🥇 and yes I'm using the latest armbian for the device. I'll test the proposed fix above and see if it also applies. From my experience disabling offloading usually means more CPU load, however I'm not sure how that plays out on a ARM device. |
Update: running |
Ah sorry mixed day and year, which is great since M4 didn't exist in 2013 😄. I should not work that late at night... Thanks for verifying. So this is covered by our script as well:
|
I think only Doing $ diff -rup before.txt after.txt
--- before.txt 2019-03-17 05:49:40.999604753 +0000
+++ after.txt 2019-03-17 05:49:32.222559158 +0000
@@ -1,9 +1,9 @@
Features for rockpro64eth1g:
-rx-checksumming: on
-tx-checksumming: on
- tx-checksum-ipv4: on
+rx-checksumming: off
+tx-checksumming: off
+ tx-checksum-ipv4: off
tx-checksum-ip-generic: off [fixed]
- tx-checksum-ipv6: on
+ tx-checksum-ipv6: off
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on There are no issues with v4 checksums as far as I can tell. |
@DavidOn-356 |
Both i think, but i am only verifying at Rock64. |
But before we start efforts to hack some fix inside, is this actually still an issue from kernel 5.X on or has it been fixed in Linux upstream? We aim to create Buster images with Linux 5.X kernel for RK3399 and all Pine64 boards. |
@MichaIng I can't speak for everyone but in Armbian with a 5.X kernel this issue still happens in NanoPI M4 and NanoPi M4v2 board with RK3399 so I believe it should also happen in DietPi. Disabling offload fixes the issue as usual. Maybe this can be useful for you as well? armbian/build#1736. Apparently it looks like the issue is related to setting the MTU to 1500. |
@TCB13 |
Armbian kernel patch only applies to RK3399, hence Rock64 requires testing it this works now without disabling offloading: #3051 (comment) |
@carlosedp |
Hey @MichaIng .. sorry about the delay. I need to grab one of my boards to test this (they are all turned off now). I'll let you know. |
BTW, are you building the images for these boards using the Kernel built from Armbian? The DT fix is not in mainline for the boards but applied as a patch by Armbian on build. |
For reference, I've submitted a patch to the upstream DTs fixing this so patching on each distro won't be needed if accepted. |
Jep, all current/beta RK3399 images, but Odroid N1, are build with Armbian kernel.
Great step, overdue. Can't believe that such a major (IMO) issue has never been addressed by RockChip, Pine64 or any other manufacturer who uses those SoCs across their SBC lineup, especially the very famous and widely used RK3399. |
@rugalash The current NanoPC T4 image seems to boot on M4, although the one we created was based on one kernel version earlier. The Ethernet fix has really nothing to do with the boot issue, that is what I can say for sure since we have many fine booting images with this fix in place. |
I also think it's nothing to do with the Ethernet fix. The Kernel patch is already in the for-next branch... will go in 5.7. https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/log/?h=for-next |
Well, we are in the ethernet checksumming issue thread and the patch is exactly to fix that. That's why I mentioned it. |
Good to know 👍. |
@rugalash
This is the workaround we had in place for the issue we are writing in here, which is not required anymore with Armbian kernels 😉. |
I've said this countless times. The issue only happens with the integrated Ethernet. |
@rugalash Dropbear does not include any file transfer protocol, but it automatically invokes OpenSSH SFTP and SCP binaries, if present. AFAIK after the authentication has been done, the actual file transfer should then work exactly the same as with OpenSSH server, as long as the same protocol and same binaries are used. E.g. to enable OpenSSH SFTP+SCP via Dropbear:
Yeah, I guess you might only see a slightly reduced CPU usage on onboard Ethernet load. And yes the patch is part of the Armbian 5.X kernel which we ship with current RK3399+Rock64 beta images. |
@rugalash I'll see if I can replicate the higher CPU load > limited transfer rate on Dropbear compared to OpenSSH. |
Hi all, the patch has been merged into Linus tree and will be on 5.7. |
Hi @carlosedp, This also affects RK3288 based ARM boards. I've applied a similar patch to I know I'm late to the game but may I ask if you have/had a reproducible way to test the fix you proposed? I'd be thrilled to submit a patch to the kernel but would like to be 100% sure it solves the problem. Slightly unrelated, how did you find the Cheers! |
After a lot (I mean, a lot) of investigation on TCP resets, Ack errors and Dups, I found the problem that I describe while pushing a Docker image to DockerHub here: moby/moby#37642
The boards like RK3399 need TCP/UDP offloading disabled to avoid the retransmissions and reset errors. This was already implemented by Ayufan on Rock64 and RockPro64 Rootfs and DietPi needs this too.
The configuration file below should go to
/etc/network/if-up.d
to disable offloading on this boards.This file above I got from Ayufan's repo but the device "ff540000" is for Rock64 SBC. For RK3399 boards (I checked Firefly NanoPC-T4 and FriendlyArm RK3399) the identifier is:
/sys/devices/platform/fe300000.ethernet/net/$IFACE
. I believe both should be there.I will check if RockPro64 ID also changed later.
The text was updated successfully, but these errors were encountered: