SK-AM64B: AM64 Network Bridge Performance issue with USB-Ethernet adapter

Part Number: SK-AM64B
Other Parts Discussed in Thread: AM6442

Tool/software:

Hello,

I am using the network bridge on the SK-AM64, when I use two native CPSW ports eth0 and eth1 there is no problem with the bandwidth, it's working seamlessly. But when I use a USB-Ethernet adapter with a CPSW port in the same bridge, the transmit bandwidth significantly decreases to ~470 MBps. This issue only happens with the combination of a USB-Ethernet adapter and CPSW port on the same bridge, otherwise, there is no performance issue with two USB-Ethernet adapters or two CPSW ports with the bridge as I described before. I tried different USB-Ethernet adapters but the results were the same. Here are some iperf3 values;

PC1 <-> *AM64X-DEV-KIT* USB-ETH(LAN7800)-BRIDGE-CPSW <-> PC2

dogancan@dogancan-laptop:~$ iperf3 -c 192.168.2.2 -t 20 -R

Connecting to host 192.168.2.2, port 5201
Reverse mode, remote host 192.168.2.2 is sending
[ 5] local 192.168.2.42 port 55592 connected to 192.168.2.2 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 58.5 MBytes 490 Mbits/sec
[ 5] 1.00-2.00 sec 58.0 MBytes 487 Mbits/sec
[ 5] 2.00-3.00 sec 58.5 MBytes 491 Mbits/sec
[ 5] 3.00-4.00 sec 58.5 MBytes 491 Mbits/sec
[ 5] 4.00-5.00 sec 58.2 MBytes 488 Mbits/sec
[ 5] 5.00-6.00 sec 58.3 MBytes 489 Mbits/sec
[ 5] 6.00-7.00 sec 57.8 MBytes 485 Mbits/sec
[ 5] 7.00-8.00 sec 57.4 MBytes 482 Mbits/sec
[ 5] 8.00-9.00 sec 58.2 MBytes 489 Mbits/sec
[ 5] 9.00-10.00 sec 58.5 MBytes 491 Mbits/sec
[ 5] 10.00-11.00 sec 57.9 MBytes 486 Mbits/sec
[ 5] 11.00-12.00 sec 58.2 MBytes 488 Mbits/sec
[ 5] 12.00-13.00 sec 58.1 MBytes 487 Mbits/sec
[ 5] 13.00-14.00 sec 58.1 MBytes 487 Mbits/sec
[ 5] 14.00-15.00 sec 58.2 MBytes 488 Mbits/sec
[ 5] 15.00-16.00 sec 58.4 MBytes 490 Mbits/sec
[ 5] 16.00-17.00 sec 57.8 MBytes 485 Mbits/sec
[ 5] 17.00-18.00 sec 58.3 MBytes 489 Mbits/sec
[ 5] 18.00-19.00 sec 58.1 MBytes 487 Mbits/sec
[ 5] 19.00-20.00 sec 58.3 MBytes 489 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-20.04 sec 1.14 GBytes 488 Mbits/sec 57 sender
[ 5] 0.00-20.00 sec 1.14 GBytes 488 Mbits/sec receiver

iperf Done.
dogancan@dogancan-laptop:~$ iperf3 -c 192.168.2.2 -t 20
Connecting to host 192.168.2.2, port 5201
[ 5] local 192.168.2.42 port 52996 connected to 192.168.2.2 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 113 MBytes 951 Mbits/sec 0 901 KBytes
[ 5] 1.00-2.00 sec 112 MBytes 944 Mbits/sec 0 991 KBytes
[ 5] 2.00-3.00 sec 112 MBytes 944 Mbits/sec 0 991 KBytes
[ 5] 3.00-4.00 sec 110 MBytes 923 Mbits/sec 0 1.56 MBytes
[ 5] 4.00-5.00 sec 112 MBytes 944 Mbits/sec 0 1.73 MBytes
[ 5] 5.00-6.00 sec 111 MBytes 933 Mbits/sec 0 1.81 MBytes
[ 5] 6.00-7.00 sec 112 MBytes 944 Mbits/sec 0 2.18 MBytes
[ 5] 7.00-8.00 sec 111 MBytes 933 Mbits/sec 0 2.41 MBytes
[ 5] 8.00-9.00 sec 112 MBytes 944 Mbits/sec 0 2.55 MBytes
[ 5] 9.00-10.00 sec 111 MBytes 933 Mbits/sec 0 2.95 MBytes
[ 5] 10.00-11.00 sec 112 MBytes 944 Mbits/sec 0 2.95 MBytes
[ 5] 11.00-12.00 sec 111 MBytes 933 Mbits/sec 0 3.10 MBytes
[ 5] 12.00-13.00 sec 112 MBytes 944 Mbits/sec 0 3.10 MBytes
[ 5] 13.00-14.00 sec 111 MBytes 933 Mbits/sec 0 3.10 MBytes
[ 5] 14.00-15.00 sec 111 MBytes 933 Mbits/sec 0 3.10 MBytes
[ 5] 15.00-16.00 sec 110 MBytes 923 Mbits/sec 0 3.10 MBytes
[ 5] 16.00-17.00 sec 112 MBytes 944 Mbits/sec 0 3.10 MBytes
[ 5] 17.00-18.00 sec 112 MBytes 943 Mbits/sec 0 3.10 MBytes
[ 5] 18.00-19.00 sec 111 MBytes 933 Mbits/sec 0 3.10 MBytes
[ 5] 19.00-20.00 sec 111 MBytes 933 Mbits/sec 0 3.10 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-20.00 sec 2.18 GBytes 938 Mbits/sec 0 sender
[ 5] 0.00-20.06 sec 2.18 GBytes 935 Mbits/sec receiver

iperf Done.

PC1 <-> *AM64X-DEV-KIT* USB-ETH(LAN7800)-BRIDGE-CPSW <-> PC2


root@am64xx-evm:~# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.f2364915b81c       no              eth0
                                                       eth2




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





PC1 <-> *AM64X-DEV-KIT* CPSW(eth0)-BRIDGE-CPSW(eth1) <-> PC2

dogancan@dogancan-laptop:~$ iperf3 -c 192.168.2.2 -t 10
Connecting to host 192.168.2.2, port 5201
[ 5] local 192.168.2.42 port 35920 connected to 192.168.2.2 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 112 MBytes 937 Mbits/sec 0 2.46 MBytes
[ 5] 1.00-2.00 sec 108 MBytes 902 Mbits/sec 0 3.00 MBytes
[ 5] 2.00-3.00 sec 110 MBytes 923 Mbits/sec 0 3.00 MBytes
[ 5] 3.00-4.00 sec 109 MBytes 912 Mbits/sec 0 3.00 MBytes
[ 5] 4.00-5.00 sec 109 MBytes 912 Mbits/sec 0 3.00 MBytes
[ 5] 5.00-6.00 sec 106 MBytes 891 Mbits/sec 0 3.00 MBytes
[ 5] 6.00-7.00 sec 108 MBytes 902 Mbits/sec 0 3.00 MBytes
[ 5] 7.00-8.00 sec 109 MBytes 912 Mbits/sec 0 3.00 MBytes
[ 5] 8.00-9.00 sec 109 MBytes 912 Mbits/sec 0 3.00 MBytes
[ 5] 9.00-10.00 sec 109 MBytes 912 Mbits/sec 0 3.00 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.06 GBytes 912 Mbits/sec 0 sender
[ 5] 0.00-10.06 sec 1.06 GBytes 905 Mbits/sec receiver

iperf Done.
dogancan@dogancan-laptop:~$ iperf3 -c 192.168.2.2 -t 10 -R
Connecting to host 192.168.2.2, port 5201
Reverse mode, remote host 192.168.2.2 is sending
[ 5] local 192.168.2.42 port 55910 connected to 192.168.2.2 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 106 MBytes 885 Mbits/sec
[ 5] 1.00-2.00 sec 106 MBytes 891 Mbits/sec
[ 5] 2.00-3.00 sec 107 MBytes 901 Mbits/sec
[ 5] 3.00-4.00 sec 106 MBytes 890 Mbits/sec
[ 5] 4.00-5.00 sec 106 MBytes 889 Mbits/sec
[ 5] 5.00-6.00 sec 105 MBytes 884 Mbits/sec
[ 5] 6.00-7.00 sec 107 MBytes 898 Mbits/sec
[ 5] 7.00-8.00 sec 104 MBytes 874 Mbits/sec
[ 5] 8.00-9.00 sec 108 MBytes 903 Mbits/sec
[ 5] 9.00-10.00 sec 109 MBytes 910 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.04 sec 1.04 GBytes 892 Mbits/sec 9 sender
[ 5] 0.00-10.00 sec 1.04 GBytes 893 Mbits/sec receiver

iperf Done.

PC1 <-> *AM64X-DEV-KIT* CPSW(eth0)-BRIDGE-CPSW(eth1) <-> PC2

 

  • Hi,

    As you have pointed out the USB interface will be limited to around 480Mbits per second. This is the limit of the USB interface on the device. The CPSW ports are capable of connecting at 1Gbps. Since the network topology is not symmetric the throughput will be limited anytime the USB interface is in the network path. 

    Best Regards,

    Schuyler 

  • Hi,

    I think there is a misunderstanding about the question, AM64x has a USB 3.1 interface and is way more than capable of 480MBps.

    With 2.5 Gbps USB-Ethernet adapter (r8152), I get around 1.2 Gbps;  

    root@am64xx-evm:~# iperf3 -s
    -----------------------------------------------------------
    Server listening on 5201 (test #1)
    -----------------------------------------------------------
    Accepted connection from 192.168.1.200, port 40544
    [  5] local 192.168.1.5 port 5201 connected to 192.168.1.200 port 40560
    [ ID] Interval           Transfer     Bitrate         Retr  Cwnd
    [  5]   0.00-1.00   sec   157 MBytes  1.31 Gbits/sec    0    469 KBytes        
    [  5]   1.00-2.01   sec   148 MBytes  1.23 Gbits/sec    0    704 KBytes        
    [  5]   2.01-3.01   sec   142 MBytes  1.20 Gbits/sec    0    704 KBytes        
    [  5]   3.01-4.00   sec   131 MBytes  1.11 Gbits/sec    0    704 KBytes        
    [  5]   4.00-5.00   sec   132 MBytes  1.11 Gbits/sec    0    742 KBytes        
    [  5]   5.00-6.00   sec   131 MBytes  1.10 Gbits/sec    0    742 KBytes        
    [  5]   6.00-7.00   sec   132 MBytes  1.11 Gbits/sec    0    742 KBytes        
    [  5]   7.00-8.00   sec   132 MBytes  1.11 Gbits/sec    0    742 KBytes        
    [  5]   8.00-9.00   sec   132 MBytes  1.11 Gbits/sec    0    782 KBytes        
    [  5]   9.00-10.00  sec   134 MBytes  1.12 Gbits/sec    0    782 KBytes        
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bitrate         Retr
    [  5]   0.00-10.00  sec  1.34 GBytes  1.15 Gbits/sec    0             sender
    -----------------------------------------------------------

    That result shows the USB3.1 bandwidth in the AM64x. As I described before, the problem occurs when the USB and CPSW are used in the same bridge. 

    Best regards

    Dogancan

  • Schuyler & Dogancan ,

    Dogancan has fallacies in his statement:

    "AM64x has a USB 3.1 interface and is way more than capable of 480MBps."

    I went over this with Bin Liu a few months ago (see  (+) AM6442: Checked the AM64X TRM - can an A53 core controlled USB interface be only a USB 3.0 host, not a USB 3.0 device at the 5Gbps rate? - Processors forum - Processors - TI E2E support forums ) 

    AM64x ONLY SUPPORTS USB 3.0 5Gbps IF AM6442 is configured as a USB 3.0 HOST

    AM64x support of USB DEVICE is limited to a USB 2.0 maximum 480Mbps.

    Dogancan must have the AM6442 configured as a USB DEVICE.

    fyi

    Jim Mrowca

  • Hi,

    I don't think my statement contains "fallacies". I am already using USB as a "host" device, and you can see the throughput in my last reply, which is already 1.2 Gbps.

    So I am using a USB-Ethernet adapter with SK-AM64, and it has a 940MBps throughput standalone (depending on the USB adapter; LAN7800: ~940 MBps / R8152: ~1.2GBps). So, standalone USB usage already has sufficient performance. As I described before the problem is the same bridge usage with CPSW port.

    Example USB-Ethernet adapter: 

    USB 3.1 info:
    software-dl.ti.com/.../CDNS3.html

    B
    est regards
    Dogancan

  • Hi,

    Apologies, I misunderstood which interface was being used. But Jim has pointed out a consideration. I will need to consult with colleagues on this question. We are both out of the office until next week. Also please note that traffic in the bridge will need to be handled by the A53. If there is significant system loading this would impact throughput as well.

    Best Regards,

    Schuyler

  • Schuyler: suugest you let (32) Bin Liu's Profile - Bin Liu - TI E2E support forums know that SDK v10 link 3.2.2.20. USB — Processor SDK AM64X Documentation  is calling out the text "USB subsystem has a SuperSpeed (SS) USB3.1 Gen1 Dual-Role-Device (DRD) controller " is misleading as the AM64x clearly only supports up to a USB 3.0 HOST (as clearly stated in the spruim2h TRM section 12.2.4.1  ). There are 3.0 & 3.1 inconsistencies in that TRM.

    Jim