UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 66670

Zynq-7000 AP SoC - Linux - Macb performance is not equal/comparable in both directions when using "iperf -d"

Description

Macb performance is not equal/comparable in both directions when using the command iperf -d:

See below Performance numbers from the iperf tool:

Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 127 KByte (default)
------------------------------------------------------------
[ 5] local 192.168.1.11 port 47175 connected with 192.168.1.1 port 5001 [ 4] local 192.168.1.11 port 5001 connected with 192.168.1.1 port 59601
random: nonblocking pool is initialized
[ ID] Interval Transfer Bandwidth
[ 5] 0.0-10.0 sec 622 MBytes 522 Mbits/sec [ 4] 0.0-10.3 sec 27.2 MBytes 22.3 Mbits/sec

Macb driver location:

/drivers/net/ethernet/cadence/macb.c

Solution

This issue can be resolved with the attached patch, which allows you to do the following:

  • Reduce the TX BD count in comparison to RX
  • Avoid using NAPI, Use TX pause frames

The following is an example Log with the attached patch:


x86> iperf -c 192.168.1.5 -I 5 -t 100 -d
----------------------------------------------------------------
zynq> taskset 1 iperf -s -i 5
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.1.5 port 5001 connected with 192.168.1.100 port 60374
------------------------------------------------------------
Client connecting to 192.168.1.100, TCP port 5001 TCP window size:  158 KByte (default)
------------------------------------------------------------
[  6] local 192.168.1.5 port 53040 connected with 192.168.1.100 port 5001
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0- 5.0 sec   158 MBytes   264 Mbits/sec
[  6]  0.0- 5.0 sec   193 MBytes   324 Mbits/sec
[  4]  5.0-10.0 sec   157 MBytes   263 Mbits/sec
[  6]  5.0-10.0 sec   193 MBytes   324 Mbits/sec
[  4] 10.0-15.0 sec   158 MBytes   264 Mbits/sec
[  6] 10.0-15.0 sec   192 MBytes   322 Mbits/sec
[  4] 15.0-20.0 sec   161 MBytes   270 Mbits/sec
[  6] 15.0-20.0 sec   193 MBytes   324 Mbits/sec
[  4] 20.0-25.0 sec   161 MBytes   270 Mbits/sec
[  6] 20.0-25.0 sec   194 MBytes   325 Mbits/sec
[  4] 25.0-30.0 sec   159 MBytes   266 Mbits/sec
[  6] 25.0-30.0 sec   192 MBytes   322 Mbits/sec
[  4] 30.0-35.0 sec   155 MBytes   260 Mbits/sec
[  6] 30.0-35.0 sec   192 MBytes   323 Mbits/sec
[  4] 35.0-40.0 sec   158 MBytes   266 Mbits/sec
[  6] 35.0-40.0 sec   192 MBytes   323 Mbits/sec
[  4] 40.0-45.0 sec   158 MBytes   266 Mbits/sec
[  6] 40.0-45.0 sec   195 MBytes   328 Mbits/sec
[  4] 45.0-50.0 sec   160 MBytes   269 Mbits/sec
[  6] 45.0-50.0 sec   196 MBytes   329 Mbits/sec

 

*Please also note that PS Ethernet overall throughput was less in bi-directional mode than in a single direction in Linux.

The following limitations will further affect the performance in bi-directional mode:

a) The GEM DMA controller is connected over AHB bus interface to DDR, because the AHB bus is shared for TX and RX we are bottlenecked for the performance.

b) There is no indication that receive packet buffer is (almost full), so the only place to send pause frames is the RX overrun interrupt.


Attachments

Associated Attachments

AR# 66670
Date Created 02/20/2016
Last Updated 04/07/2016
Status Active
Type General Article
Devices
  • Zynq-7000