Author Topic: What throughput can I expect through a USB 2.0 using the ethernet gadget?  (Read 5848 times)

st2000

  • Member
  • ***
  • Posts: 44
Hi,

I have 2 embedded Linux boards connected by a USB 2.0 High Speed link.  If I install the Ethernet gadget (the g_ether module) on one, the other will respond saying there is a high-speed USB device connected.  Before I get this working (I really don't know how much more work is necessary to start sending data from one board to another) I thought I would ask if people already had a handle on how fast data would flow over this connection.

I need to achieve a data rate of about 100,000,000 bits/second or about 12,500,000 bytes/second.

-thanks


Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
A high speed link is a raw 480Mb/s, and somewhere in the region of 40-50MB/s (320-400Mb/s) is practical from a bulk pipe. I don't know how efficient USB Ethernet is, the ethernet frames don't coincide with use packets very well which can slow things down.

I just tried with a 100Mb/s USB Ethernet adapter and managed to get 90Mb/s out of it. If you had a Gigabit adapter it should be capable of going that fast. I don't know whether Linux would cooperate with you though.

st2000

  • Member
  • ***
  • Posts: 44
Quote
ethernet frames don't coincide with use packets very well which can slow things down
Yes, I was thinking this too - but was hoping it was not true.  Rats.

Quote
I just tried with a 100Mb/s USB Ethernet adapter and managed to get 90Mb/s
Thanks for checking!

Quote
I don't know whether Linux would cooperate with you though.
Or, for that matter, if g_ether will.  Still trying to figure out which kernel modules are needed to implement this setup on the host side.  Maybe I should try a real Ethernet to USB dongle first.  But I thought the embedded Linux board would simply add another item to the ifconfig list of interfaces.   So far - nothing.  And usbnet is compiled in.

-thansks

st2000

  • Member
  • ***
  • Posts: 44
Ug, I can't get the the embedded linux board to create a Ethernet network interface when the g_ether embedded linux board is connected to it!  Do any know what modules are needed by the linux kernel to support g_ether.  Or, for that matter, probably to support any USB to Ethernet dongle?

To keep my sanity (and to check that my g_ether enabled linux board actually works), I plugged the g_ether board into my Ubuntu laptop and verified that a new network interface (called usb0) is listed by ifconfig.

-thanks

Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
I don't know much about the linux kernel, but I'd be looking for something which mentions CDC and ECM. CDC is the communications device class, which deals with USB and comms in general. ECM is the Ethernet Control Model, which is for Ethernet dongles.

On the other hand, it may be something else entirely. The USB Ethernet dongle I have is Vendor Specific (from Apple).