AnsweredAssumed Answered

IMX6 Ethernet packet loss with SATA write operation

Question asked by Giovanni Malfarà on Aug 1, 2016
Latest reply on Oct 10, 2016 by Yuri Muhin

Hello,

 

We have an issue with Ethernet connection when performing write operation on external SATA drive.

 

Here's our configuration:

 

 

- Freescale IMX6 QUAD (MCIMX6Q7CVT08AD)

- Linux kernel 3.16.7

- Embedded module TQMa6x

- Linux BSP with YOCTO dizzy toolchain (kernel patch from Linux BSP for TQMa6x rev 0105 with OSELAS toolchain)

 

 

 

 

Our system has a constant incoming traffic on ethernet interface of raw frames at 30Mbit/s.

This works fine except when we ha a write operation on SATA. In that case we experience a packet loss up to 14%.

 

 

We can reproduce the problem using iperf with UDP packet.

 

 

Here's the test:

 

 

- On the IMX6 target board we start iperf:

$ iperf -u -s

 

- On the host we start iperf:

$ iperf -u -c 192.168.2.1  -t28800 -b 30M -i10

   

Results:

------------------------------------------------------------

Server listening on UDP port 5001

Receiving 1470 byte datagrams

UDP buffer size:  160 KByte (default)

------------------------------------------------------------

[  3] local 192.168.2.1 port 5001 connected with 192.168.2.88 port 47808

[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams

[  3]  0.0-10.0 sec  35.8 MBytes  30.0 Mbits/sec   0.006 ms    0/25513 (0%)

[  3] 10.0-20.0 sec  35.8 MBytes  30.0 Mbits/sec   0.007 ms    0/25512 (0%)

[  3] 20.0-30.0 sec  35.8 MBytes  30.0 Mbits/sec   0.017 ms    0/25512 (0%)

[  3] 30.0-40.0 sec  35.8 MBytes  30.0 Mbits/sec   0.008 ms    0/25512 (0%)

[  3] 40.0-50.0 sec  35.8 MBytes  30.0 Mbits/sec   0.013 ms    0/25512 (0%)

[  3] 50.0-60.0 sec  35.8 MBytes  30.0 Mbits/sec   0.011 ms    0/25512 (0%)

[  3] 60.0-70.0 sec  35.8 MBytes  30.0 Mbits/sec   0.008 ms    0/25512 (0%)

 

 

When performing a write operation on SATA disk (e.g.  writing a 1GB sample file with dd)

 

------------------------------------------------------------

Server listening on UDP port 5001

Receiving 1470 byte datagrams

UDP buffer size:  160 KByte (default)

------------------------------------------------------------

[  3] local 192.168.2.1 port 5001 connected with 192.168.2.88 port 57920

[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams

[  3]  0.0-10.0 sec  33.3 MBytes  27.9 Mbits/sec   0.425 ms 1777/25511 (7%)

[  3] 10.0-20.0 sec  30.8 MBytes  25.9 Mbits/sec   0.044 ms 3524/25515 (14%)

[  3] 20.0-30.0 sec  31.9 MBytes  26.8 Mbits/sec   0.008 ms 2734/25512 (11%)

[  3] 30.0-40.0 sec  33.5 MBytes  28.1 Mbits/sec   0.009 ms 1619/25512 (6.3%)

 

 

We tried to change in kernel source SATA DMA mode to:

 

 

mdma0

mdma1

mdma2

udma0

udma1

udma2

udma3

udma4

udma5

udma6 (was the default)

 

With no improvements.

If we try the same test writing on MMC we experience no packet loss at all.

 

 

Thanks in advance!

Giovanni Malfarà

Outcomes