Jump to content

Recommended Posts

Posted

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,

 

 

 

 

 

 

 

 

Posted

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

 

Posted

On a second thought though these properties may not be available in legacy :(

If so then going with the ethtool may indeed be the only option.

Posted
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?

Posted
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).

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines