We are seeing an unusually high rate of TCP retries and UDP packet loss when receiving over the AM5728 CPSW interface with Linux and the processor SDK on both the EVM and our own board.
Using iperf3, we can transmit over a dedicated link at well over 800Mb/s without issues (no UDP packet loss or TCP retries), but when receiving we get unexpectedly large UDP losses (>50% sometimes) and hundreds of TCP retries over the same link. Furthermore, network problems appear to get worse when the HDMI output is active; sometimes, large file transfers to the AM5728 can fail an SHA-256 check, suggesting a possible memory corruption issue.
Below is a sample of UDP receive at 100Mb/s (10% link bandwidth) showing 36% packet loss; increasing the buffer size to 1MB (-w 1M) reduces the loss to about 15% but it really should be 0 for this case.
On the TCP side we see hundreds of retries/sec using similar parameters. The TCP retries occur regardless of how much we increase the window size.
Adding a receive coalesce interval of 20uS does not appear to have any effect.
The above tests are with kernel 4.1.13 (SDK 2.0.1.7). Older SDK with kernel 3.14.43 does not exhibit this issue. (3.x SDK does not boot on our EVM.)
Ethtool does not show errors for either scenario, but clearly the packets are dropped.
Is there a fix for this?
----
[ 4] local 172.30.0.30 port 55300 connected to 172.30.0.2 port 5201
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 4] 0.00-1.00 sec 8.49 MBytes 71.2 Mbits/sec 0.406 ms 465/1552 (30%)
[ 4] 1.00-2.00 sec 7.82 MBytes 65.6 Mbits/sec 0.120 ms 523/1524 (34%)
[ 4] 2.00-3.00 sec 7.54 MBytes 63.2 Mbits/sec 0.115 ms 560/1525 (37%)
[ 4] 3.00-4.00 sec 7.59 MBytes 63.6 Mbits/sec 0.419 ms 554/1525 (36%)
[ 4] 4.00-5.00 sec 8.26 MBytes 69.3 Mbits/sec 0.150 ms 476/1533 (31%)
[ 4] 5.00-6.00 sec 7.44 MBytes 62.4 Mbits/sec 0.159 ms 575/1527 (38%)
[ 4] 6.00-7.00 sec 7.20 MBytes 60.4 Mbits/sec 0.424 ms 596/1517 (39%)
[ 4] 7.00-8.00 sec 7.88 MBytes 66.1 Mbits/sec 0.187 ms 526/1535 (34%)
[ 4] 8.00-9.00 sec 7.55 MBytes 63.4 Mbits/sec 0.151 ms 558/1525 (37%)
[ 4] 9.00-10.00 sec 7.78 MBytes 65.3 Mbits/sec 0.401 ms 520/1516 (34%)
[ 4] 10.00-11.00 sec 8.02 MBytes 67.3 Mbits/sec 0.128 ms 509/1536 (33%)
[ 4] 11.00-12.00 sec 7.48 MBytes 62.7 Mbits/sec 0.147 ms 570/1527 (37%)
[ 4] 12.00-13.00 sec 6.94 MBytes 58.2 Mbits/sec 0.520 ms 637/1525 (42%)
[ 4] 13.00-14.00 sec 7.74 MBytes 64.9 Mbits/sec 0.146 ms 536/1527 (35%)
[ 4] 14.00-15.00 sec 7.77 MBytes 65.2 Mbits/sec 0.179 ms 530/1525 (35%)
[ 4] 15.00-16.00 sec 7.55 MBytes 63.3 Mbits/sec 0.431 ms 547/1513 (36%)
^C[ 4] 16.00-16.93 sec 6.95 MBytes 62.4 Mbits/sec 0.120 ms 491/1380 (36%)
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 4] 0.00-16.93 sec 0.00 Bytes 0.00 bits/sec 0.120 ms 9173/25812 (36%)