[BPI-R4] how to investigate 10gbe link drops?

I’m noticing something weird about my 10Gbe SFP+ modules in the R4:

  • when connecting the R4 SFP+ module from my PC using a 10Gbe adapter, using a cat 5e cable, the connection is stable (but the cable is less than 2m).
  • when connecting from my PC to switch in the basement (which is at some distance but not sure whether the 30m limit is passed), its stability is OK at 10gbe. even when using EEE. tested using ping -c 1000 192.168.177.1 resulting 0% packet loss. The chip of my 10gbe NIC is AQC107
  • when connecting my R4 to the switch in the basement and rebooting, the connection is poor and unstable. it needs a lot of time to stabilize. 5gbe seems to be the sweet spot for now, but even at 1ghz there are frequent link drops. Fortunately, after waiting for a while, the link connection seems to stabilize.

I have a ethtool cron job running in the background to save power at night:

15 23 * * * /usr/sbin/ethtool -s sfp-lan advertise 0x28
00 7 * * * /usr/sbin/ethtool -s sfp-lan advertise 0x1800000000028

So in order to investigate it, I focused on link drops

i=0;
while read p; do 
r="$(echo $p | cut -d- -f1)"; [[ "$r" =~ '^[0-9]+$' ]] || echo $r is not numeric; 
q="$((${r}/3600)) hours"; 
[[ $((${r}/3600)) == 0 ]] && q="$((${r}/60)) minutes"; 
echo $((($r - $i) / 60)) minutes after ${q} uptime $((($(cat /proc/uptime | cut -f1 -d.) - ${r})/3600)) hours ago, now operating at $(echo $p | cut -d- -f2)gbps;
i=$r; 
done < <(dmesg | grep "sfp-lan: Link is Up" | sed 's/\[\([0-9\ ]\+\).*-\ \([0-9\.]\+\)[MG].*/\1\-\2/')
1 minutes after 1 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 1 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 1 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 2 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 3 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 4 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 4 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 4 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 4 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 5 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 5 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 6 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 6 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 6 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 6 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 7 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 7 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 7 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 8 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 8 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 9 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 9 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 10 minutes uptime 172 hours ago, now operating at 5gbps
1 minutes after 11 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 12 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 12 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 12 minutes uptime 172 hours ago, now operating at 5gbps
1 minutes after 14 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 14 minutes uptime 172 hours ago, now operating at 5gbps
1 minutes after 16 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 16 minutes uptime 172 hours ago, now operating at 10gbps
0 minutes after 16 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 17 minutes uptime 172 hours ago, now operating at 5gbps
1 minutes after 19 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 19 minutes uptime 172 hours ago, now operating at 5gbps
3 minutes after 22 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 22 minutes uptime 172 hours ago, now operating at 5gbps
2 minutes after 25 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 25 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 26 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 26 minutes uptime 172 hours ago, now operating at 5gbps
1 minutes after 28 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 29 minutes uptime 172 hours ago, now operating at 5gbps
1 minutes after 30 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 30 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 31 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 31 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 32 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 32 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 32 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 33 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 33 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 33 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 33 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 34 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 35 minutes uptime 172 hours ago, now operating at 5gbps
0 minutes after 35 minutes uptime 171 hours ago, now operating at 5gbps
0 minutes after 35 minutes uptime 171 hours ago, now operating at 5gbps
0 minutes after 35 minutes uptime 171 hours ago, now operating at 5gbps
0 minutes after 36 minutes uptime 171 hours ago, now operating at 5gbps
0 minutes after 36 minutes uptime 171 hours ago, now operating at 10gbps
0 minutes after 37 minutes uptime 171 hours ago, now operating at 5gbps
0 minutes after 37 minutes uptime 171 hours ago, now operating at 10gbps
0 minutes after 37 minutes uptime 171 hours ago, now operating at 10gbps
0 minutes after 37 minutes uptime 171 hours ago, now operating at 10gbps
1 minutes after 38 minutes uptime 171 hours ago, now operating at 1gbps
0 minutes after 38 minutes uptime 171 hours ago, now operating at 1gbps
1256 minutes after 21 hours uptime 150 hours ago, now operating at 5gbps
335 minutes after 27 hours uptime 145 hours ago, now operating at 5gbps
0 minutes after 27 hours uptime 145 hours ago, now operating at 5gbps
0 minutes after 27 hours uptime 145 hours ago, now operating at 5gbps
5 minutes after 27 hours uptime 145 hours ago, now operating at 5gbps
0 minutes after 27 hours uptime 145 hours ago, now operating at 5gbps
282 minutes after 31 hours uptime 140 hours ago, now operating at 5gbps
216 minutes after 35 hours uptime 136 hours ago, now operating at 5gbps
0 minutes after 35 hours uptime 136 hours ago, now operating at 5gbps
0 minutes after 35 hours uptime 136 hours ago, now operating at 10gbps
3 minutes after 35 hours uptime 136 hours ago, now operating at 2.5gbps
129 minutes after 37 hours uptime 134 hours ago, now operating at 1gbps
465 minutes after 45 hours uptime 126 hours ago, now operating at 5gbps
8 minutes after 45 hours uptime 126 hours ago, now operating at 5gbps
966 minutes after 61 hours uptime 110 hours ago, now operating at 1gbps
465 minutes after 69 hours uptime 102 hours ago, now operating at 5gbps
80 minutes after 70 hours uptime 101 hours ago, now operating at 5gbps
894 minutes after 85 hours uptime 86 hours ago, now operating at 1gbps
465 minutes after 93 hours uptime 78 hours ago, now operating at 5gbps
975 minutes after 109 hours uptime 62 hours ago, now operating at 1gbps
465 minutes after 117 hours uptime 54 hours ago, now operating at 5gbps
0 minutes after 117 hours uptime 54 hours ago, now operating at 5gbps
974 minutes after 133 hours uptime 38 hours ago, now operating at 1gbps
465 minutes after 141 hours uptime 30 hours ago, now operating at 5gbps
974 minutes after 157 hours uptime 14 hours ago, now operating at 1gbps
465 minutes after 165 hours uptime 6 hours ago, now operating at 5gbps
14 minutes after 165 hours uptime 6 hours ago, now operating at 5gbps
54 minutes after 166 hours uptime 5 hours ago, now operating at 5gbps
215 minutes after 170 hours uptime 2 hours ago, now operating at 5gbps
108 minutes after 172 hours uptime 0 hours ago, now operating at 10gbps
root@APBureau4:~# cat /proc/uptime 
621354.23 2470185.23
root@APBureau4:~# date
Mon Oct 20 14:00:29 CEST 2025

I’m not sure how to interprent this, any clues? I’m in doubt whether the cable is bad, or it is simply the SFP+ module not behaving properly. Why does it stabilize after 40m?

EDIT finetuning the script for better data