Re: Optimising cdc-acm throughput (problems interpreting usbmon output)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add to the usbmon documentation to clarify how much of the packet text-mode
users can expect to see. This is useful if packet lengths are not what they
were expected to be.

Signed-off-by: Richard Ash <richard@xxxxxxxxxxxxxxxx>
---

On Fri, Apr 15, 2011 at 3:17 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 15 Apr 2011, Richard Ash wrote:
>> [...]
>> Once it's got going, the usbmon trace looks like this:
>>
>> f5146880 554152969 C Bi:4:002:1 0 128 = e6232508 0020e72e 3afcf03a
>> 03933424 250800b0 e72e3afc f03a030e 83242508
>> f5146880 554152997 S Bi:4:002:1 -115 128 <
>> f5146500 554153005 C Bi:4:002:1 0 128 = 260800f0 e72e3afc f03a0326
>> cf4e2608 00d0e72e 3afcf03a 03a21d4f 260800e0
>
> ...
>
>> This is where I get confused - my device is apparently being asked for
>> 128 bytes of data, and replying with 128 bytes, but only 32 bytes end
>> up in the output. This is for a 64 byte endpoint ...
>>
>> The last two replies (with reported lengths of 19 and 23 bytes) do
>> have 19 and 23 bytes of output data respectively.
>>
>> Can anyone explain when a length in usbmon output is not a length, and
>> separately why a device with 64byte max packet size is doing 128 byte
>> reads?
>
> Read the Documentation/usb/usbmon.txt file.  Briefly, usbmon's text
> interface displays only the first 32 bytes of each transfer.  If you
> want to see the complete data for each transfer, you need to use the
> binary interface.  The easiest way to do that is to run Wireshark,
> although Pete Zaitcev has written a command-line program to do the same
> thing:
>
>        http://people.redhat.com/zaitcev/linux/usbmon-5.4.tar.gz

I did read that file, but because it didn't say how much of the data you might
get, missed the existence of the limit (and anyway, was concerned that
64 / 2 = 32).

diff -u usb-2.6-vanilla/Documentation/usb/usbmon.txt
usb-2.6-patched/Documentation/usb/usbmon.txt
--- usb-2.6-vanilla/Documentation/usb/usbmon.txt	2011-04-13
20:17:14.000000000 +0100
+++ usb-2.6-patched/Documentation/usb/usbmon.txt	2011-04-15
16:18:30.016288637 +0100
@@ -165,12 +165,12 @@
 - Data words follow, in big endian hexadecimal format. Notice that they are
   not machine words, but really just a byte stream split into words to make
   it easier to read. Thus, the last word may contain from one to four bytes.
-  The length of collected data is limited and can be less than the data length
-  reported in the Data Length word. In the case of an Isochronous input (Zi)
-  completion where the received data is sparse in the buffer, the length of
-  the collected data can be greater than the Data Length value (because Data
-  Length counts only the bytes that were received whereas the Data words
-  contain the entire transfer buffer).
+  The length of collected data is limited to 32 bytes and can be less than
+  the data length reported in the Data Length word.
+  In the case of an Isochronous input (Zi) completion where the received data
+  is sparse in the buffer, the length of the collected data can be greater than
+  the Data Length value (because Data Length counts only the bytes that were
+  received whereas the Data words contain the entire transfer buffer).

 Examples:
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux