Nanopi M4 and other RK3399 need TCP/UDP offloading disabled


Recommended Posts

Hi all,

 

I'd just like to share a problem I experienced and what solved after a bit of Googling. Basically, I have Nextcloud installed on my Nanopi M4 (v1) with Armbian:

$ uname -a

Linux nanopim4 4.4.192-rk3399

 

When I sync files from my Android phone via local wifi, often the transfers were just failed. Not always but usually, it's when a directory contains lot of large files. After a bit of Googling and came across this: https://unix.stackexchange.com/questions/494290/nanopi-m4-rk3399-apache2-ssl-large-download-hangs/495378#495378

 

It works. The problem's solved after:

 

ethtool -K eth0 rx off tx off

 

and put the command in /etc/network/if-up.d/ethtool

 

Just wondering if anyone knows the root cause and have better solution than disabling things. 

 

Thanks,

 

 

 

 

 

 

 

 

Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

Yes, TCP/UDP offloading MUST be disabled for NanoPi, NanoPC.

 

With offloading enabled, Samba becomes completely useless, as you will find that transfers to a Windows PC freeze randomly (usually on large files).

 

Disabling offloading should be the default for RK3399 Armbian builds, as I spent months thinking there existed a bug with Samba/ARM64 before finding this post.

 

For the record, this is what I added to my NanoPC Armbian installation as /etc/network/if-up.d/disable-rk3399-eth-offloading:

 

#!/bin/bash

[ "$IFACE" == "eth0" ] || exit 0
ETHTOOL=/sbin/ethtool
[ -f $ETHTOOL ] || exit 2

[ -d /sys/devices/platform/fe300000.ethernet/net/$IFACE ] || exit 6
$ETHTOOL -K eth0 rx off tx off

exit 0

 

Link to post
Share on other sites
15 minutes ago, piter75 said:

I did not try to fix it in legacy as I thought it was not a problem there ;-)


I also don't tend to use / pay much attention to / legacy anymore ... So we add one more IF sentence to check kernel version so that it won't touch modern kernels ... since there, its not needed, right?

Link to post
Share on other sites
4 minutes ago, Igor said:

So we add one more IF sentence to check kernel version so that it won't touch modern kernels ... since there, its not needed, right?

I think I would go this route.

In modern kernel it's not needed in standard environments (MTU 1500).

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...