You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an Orange Pi 4 running official ubuntu_bionic_desktop_linux4.4.179_v1.3 system. Recently I connected it to wired ethernet, it turns out that a server on it, which is implemented by myself with Java, fails to transmit data over HTTPS. I've tried different Java packages like SSLServerSocket, SSLEngine and HttpsServer, only to find none of them works. So I did some other tests and packet captures, it seems that the TCP checksum offload of the wired ethernet interface doesn't work correctly under certain circumstance.
Here are some infomation if necessary
The server runs on the Orange Pi 4 4GB with official ubuntu_bionic_desktop_linux4.4.179_v1.3 system image
Orange Pi 4 is connected to a LAN port of my router Asus RT-AC86U
I start packet capturing with WireShark and request the server, soon a packet with incorrect checksum 0xec39 (No. 2405) is sent from Orange Pi 4 (192.168.50.176).
Then a large number (up to 88) of duplicate ACKs are sent from the client device (192.168.50.106).
However all retransmission packets (like No. 2543) from Pi 4 still have the same incorrect checksum 0xec39, making the communication unable to continue.
More interestingly, if I do more tests, no matter what client device I use, the incorrect checksum will always be 0xec39, so I also capture packets with tcpdump on Orange Pi 4, the outputs are
We can easily figure out that the checksums are 0xe685 plus the length of packet, e.g. 0xe6df - 0xe685 == 90 and 0xec39 - 0xe685 == 1460. Because of TCP checksum offload, these checksums should be replaced with the actual checksums calculated by NIC before being sent. So obviously the packets with incorrect checksum 0xec39 received by client devices are transmitted by Orange Pi 4 without replacing checksum. Since retransmission packets are simply cached in the send window, they still have the incorrect checksum.
Now I have to turn off checksum offload with ethtool -K eth0 tx off. However this may increase CPU usage and temperature.
This will only happen to wired ethernet. If Orange Pi 4 is connected to WiFi instead of wired ethernet, everything works fine. And it is even stranger because if I turn off HTTPS, everything will work well too (and the transmission will be much faster). Probably it has something to do with CPU load.
I haven't seen any similar issuse, I wonder if it is a system or driver bug or something.
The text was updated successfully, but these errors were encountered:
I have an Orange Pi 4 running official ubuntu_bionic_desktop_linux4.4.179_v1.3 system. Recently I connected it to wired ethernet, it turns out that a server on it, which is implemented by myself with Java, fails to transmit data over HTTPS. I've tried different Java packages like SSLServerSocket, SSLEngine and HttpsServer, only to find none of them works. So I did some other tests and packet captures, it seems that the TCP checksum offload of the wired ethernet interface doesn't work correctly under certain circumstance.
Here are some infomation if necessary
I start packet capturing with WireShark and request the server, soon a packet with incorrect checksum
0xec39
(No. 2405) is sent from Orange Pi 4 (192.168.50.176).Then a large number (up to 88) of duplicate ACKs are sent from the client device (192.168.50.106).
However all retransmission packets (like No. 2543) from Pi 4 still have the same incorrect checksum
0xec39
, making the communication unable to continue.More interestingly, if I do more tests, no matter what client device I use, the incorrect checksum will always be
0xec39
, so I also capture packets withtcpdump
on Orange Pi 4, the outputs areWe can easily figure out that the checksums are
0xe685
plus the length of packet, e.g.0xe6df - 0xe685 == 90
and0xec39 - 0xe685 == 1460
. Because of TCP checksum offload, these checksums should be replaced with the actual checksums calculated by NIC before being sent. So obviously the packets with incorrect checksum0xec39
received by client devices are transmitted by Orange Pi 4 without replacing checksum. Since retransmission packets are simply cached in the send window, they still have the incorrect checksum.Now I have to turn off checksum offload with
ethtool -K eth0 tx off
. However this may increase CPU usage and temperature.This will only happen to wired ethernet. If Orange Pi 4 is connected to WiFi instead of wired ethernet, everything works fine. And it is even stranger because if I turn off HTTPS, everything will work well too (and the transmission will be much faster). Probably it has something to do with CPU load.
I haven't seen any similar issuse, I wonder if it is a system or driver bug or something.
The text was updated successfully, but these errors were encountered: