Jump to content

RK3399 USB 3.0 peripheral mode data throughput?


Ma Tianfu

Recommended Posts

I am considering to buy a RK3399 dev board and use USB 3.0 peripheral mode to transfer data to/from another host PC. It may be used as USB CDC/Eth or RNDIS device, or a MTP device. We hope the transfer rate could be well over 1Gbps, the higher, the better. So has anybody ever benchmarked RK3399 USB in peripheral mode? Such as the highest iperf transfer rate in CDC/Eth or RNDIS mode?

Link to comment
Share on other sites

9 minutes ago, hipboi said:

I can test here for you on RK3399? How to test it?

 

TI has an old document: http://processors.wiki.ti.com/index.php/Networking_over_USB 

 

I don't know if linux kernel driver has changed recently. I have followed the procedure several years ago on beaglebone black. 

 

TI also has also published an extensive benchmarking results for almost all its linux enabled arm cpus.

 

http://processors.wiki.ti.com/index.php/Processor_SDK_Linux_Kernel_Performance_Guide

 

In this page, the performance of peripheral mode USB is not good. For example, CDC performance of their flagship Sitara processor (multi-core cortex A15) is merely around 250Mbits/s, far less than the theoretical 5Gbps USB 3.0 bandwidth. I guess it is due to the MUSB IP used on TI's arm chip. Perhaps it has too few FIFO/buffers in hardware.

 

 

 

 

Link to comment
Share on other sites

I phoned the rockchip engineer who is responsible for kernel usb stack. He said they had tested usb mass storage mode, which gave a promising result: over 200Mbytes speed cound be achieved. I will test it myself in next few days when I have time.

Link to comment
Share on other sites

I'm curious, which development board are you considering ?

 

If the board has a PCIe/Mini-PCIe card slot, then you might have other options in addition (including adding more USB3.0 ports of course).

(I wonder if it's possible to make a full PCIe connection between a board and a computer; some boards are born as PCIe cards, so they'd support it from 'birth', but I don't know if it can be done using some 'board-to-board' cards).

Link to comment
Share on other sites

3 hours ago, Jens Bauer said:

I wonder if it's possible to make a full PCIe connection between a board and a computer

Apparently yes

 

Not sure if it's a matter of a simple PCIe cable or not (it implies that's the case for "local networking" between two PC's, a PCIe switch for a network of more than two) but if you scroll down just past half way here, it mentions it

https://www.onestopsystems.com/blog-post/pcie-over-cable-goes-mainstream

 

The PCI Express bus has direct access to system memory, I don't see why either side of the point-to-point connection can't be the initiator.

Link to comment
Share on other sites

The USB3 controller on RK3328 (Rock64/...) can be more or less saturated with a SSD using UAS. I got about 380MB/s (theoretical maximum for UAS is just over 400MB/s) using iozone, and since RK3399 uses the same DW IP block, I would guess that RK3399 is similar...

Link to comment
Share on other sites

On January 31, 2018 at 8:31 PM, chrisf said:

https://www.onestopsystems.com/blog-post/pcie-over-cable-goes-mainstream

 

The PCI Express bus has direct access to system memory, I don't see why either side of the point-to-point connection can't be the initiator.

I certainly learned a lot from reading this.

My theory was based upon that PCIe is almost 'nothing but' differential pairs. Since there's no GND involved, in theory it wouldn't be difficult to connect a TX+ to RX+, TX- to RX- and the other way round (for direct peer-to-peer connection) - or perhaps making a ring, sending data only clockwise in the 'network'.

 

But as I read on in the article, they mention PCIe over fiber; I think this is an excellent idea, because it'd protect against ESD, lightning and EMI - even if using peer-to-peer between two computers next to eachother, it'd be a good idea to use fiber (compared to copper) - especially if the two PCs (or devices) are protected against lightning.

 

Thank you for sharing the link - it's good food for the brain. :)

Link to comment
Share on other sites

On February 1, 2018 at 1:33 AM, Xalius said:

The USB3 controller on RK3328 (Rock64/...) can be more or less saturated with a SSD using UAS. I got about 380MB/s (theoretical maximum for UAS is just over 400MB/s) using iozone, and since RK3399 uses the same DW IP block, I would guess that RK3399 is similar...

I'm sorry, but you lost me there. I have to ask what UAS stands for in this case. :D

Link to comment
Share on other sites

Hmm, sorry for the kick of this topic. But i trie to connect a USB 3.0 to NVME adapter on the USB 3.0 port. But just after insert it´s detected, But when i trie lsusb -v i got errors and lsusb hangs. After that the nvme disk is not detected anymore. On USB 2.0 it works ok but slow. When i connect on a USB 3.0 hub with external power the same problem happen.

 

When the USB 3.0 lsusb -v hangs:


$ sudo lsusb -v

Bus 004 Device 030: ID 174c:2362 ASMedia Technology Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.20
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         9
  idVendor           0x174c ASMedia Technology Inc.
  idProduct          0x2362
  bcdDevice            1.00
  iManufacturer           2 (error)
  iProduct                3 (error)
  iSerial                 1 (error)
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0079
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           4
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     98
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             32
        Data-in pipe (0x03)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             32
        Data-out pipe (0x04)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             32
        Status pipe (0x02)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               0
        Command pipe (0x01)
can't get debug descriptor: Resource temporarily unavailable

 

On USB 2.0 port:


Bus 002 Device 002: ID 174c:2362 ASMedia Technology Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x174c ASMedia Technology Inc.
  idProduct          0x2362
  bcdDevice            1.00
  iManufacturer           2 Ugreen
  iProduct                3 Ugreen Storage Device
  iSerial                 1
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0020
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x002a
  bNumDeviceCaps          3
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x0000f41e
      BESL Link Power Management (LPM) Supported
    BESL value     1024 us
    Deep BESL value    61440 us
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat          10 micro seconds
    bU2DevExitLat        2047 micro seconds
  SuperSpeedPlus USB Device Capability:
    bLength                20
    bDescriptorType        16
    bDevCapabilityType     10
    bmAttributes         0x00000001
      Sublink Speed Attribute count 1
      Sublink Speed ID count 0
    wFunctionalitySupport   0x1100
    bmSublinkSpeedAttr[0]   0x000a4030
      Speed Attribute ID: 0 10Gb/s Symmetric RX SuperSpeedPlus
    bmSublinkSpeedAttr[1]   0x000a40b0
      Speed Attribute ID: 0 10Gb/s Symmetric TX SuperSpeedPlus
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
  Self Powered

Link to comment
Share on other sites

Oh i found just the solution in this topic: https://unix.stackexchange.com/questions/239782/connection-problem-with-usb3-external-storage-on-linux-uas-driver-problem

 

i need to run


echo "174c:2362:u" | sudo tee /sys/module/usb_storage/parameters/quirks

 

And after reinsert it works and i could mount the drive! :)

 

And for the people who are interested. A small test on the disk:


sudo hdparm -tT /dev/disk/by-label/WinToUSB /dev/disk/by-label/WinToUSB


/dev/disk/by-label/WinToUSB:
 Timing cached reads:   2662 MB in  2.00 seconds = 1331.48 MB/sec
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 Timing buffered disk reads: 1034 MB in  3.00 seconds = 344.54 MB/sec

/dev/disk/by-label/WinToUSB:
 Timing cached reads:   2764 MB in  2.00 seconds = 1382.84 MB/sec
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 Timing buffered disk reads: 1028 MB in  3.01 seconds = 341.88 MB/sec

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines