Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 889218 - Add support for bulk in buffering to the usb-redir device
Summary: Add support for bulk in buffering to the usb-redir device
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Hans de Goede
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2012-12-20 14:36 UTC by Hans de Goede
Modified: 2014-06-18 03:19 UTC (History)
8 users (show)

Fixed In Version: 1.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-06-13 12:48:32 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Hans de Goede 2012-12-20 14:36:19 UTC
USB <-> serial converters use bulk transfers to send / receive data. When such a converter is receiving data at 115200 bps without flowcontrol, it needs to be read at a certain minimum frequency to avoid its internal data buffer to overflow.

And the number of bulk in transfer packets / second is limited to 1 second / round-trip-time. With the latencies involved in usb-redirection over the network the round-trip-time becomes so large that
we do not reach the minimum frequency and data gets lost.

Upstream qemu has a new usb-redir feature called bulk in buffering, which treats the bulk in endpoints
of these devices as if they were isoc endpoints (which would have been a much better choice, as the usb spec gives no bandwidth guarentees for bulk endpoints), Employing the same latency hiding techniques as isoc endpoints for these endpoints allows receiving data with USB <-> serial adapters without data loss.

Comment 3 Hans de Goede 2014-01-16 10:42:42 UTC

Testing instructions:

1) Run a serial null-modem cable from a serial port to a usb <-> serial converter 
2) Set both ports to 115200 bps, no flow-control using stty
3) Do cat somefile.gz > /dev/ttyXXX in one terminal
4) Do cat /dev/ttyYYY > newfile.gz in another terminal
5) Once the cat from 3 is done, do ctrl+c for the cat in 4).
6) Do gzip -t newfile.gz ,  this should succeed. Serial data transfer is not without errors, but if you use a not too large file (say 1 MB), then it should come over to the otherside without errors most of the time

Do this on physical hardware first! Once you've this working do the test with the usb <-> serial converter as the receiver, and with the usb <-> serial converter redirected to a vm, and the cat /dev/ttyYYY > newfile.gz running inside the vm.

The bulk-buffering is necessary to allow the usb ,-> serial converter to keep up when receiving data at 115200 bps, so if this works, then the buffering is working.



Comment 4 Shaolong Hu 2014-03-14 06:41:08 UTC
Test on qemu-kvm-rhev-1.5.3-50.el7.x86_64 with steps in Comment 3:

file transfer success through usb-redirected usb-serial converter cable from source host to vm.

Comment 5 Ludek Smid 2014-06-13 12:48:32 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

Note You need to log in before you can comment on or make changes to this bug.