tcpdump mailing list archives

Re: Speed specific Link-Layer Header Types for USB 2.0


From: Tomasz Moń via tcpdump-workers <tcpdump-workers () lists tcpdump org>
Date: Mon, 9 May 2022 07:47:45 +0200

--- Begin Message --- From: Tomasz Moń <desowin () gmail com>
Date: Mon, 9 May 2022 07:47:45 +0200
On Sun, May 8, 2022 at 8:53 PM Guy Harris <gharris () sonic net> wrote:
At least from a quick look at section 5.2.3 "Physical Bus Topology" of the USB 2.0 spec, a given bus can either be a 
high-speed bus or a full/low-speed bus.

The full/low-speed bus applies only to upstream link from full speed hub.

The idea, then, is presumably that a capture tool is capturing on a single bus (single wire), so it's either 
capturing on a high-speed bus or a full/low-speed bus.

I assume that by single wire you meant "single wire pair"
(differential pair). USB 2.0 has only single differential pair, formed
by D+ and D- signal wires, so the high/full/low speed communication
always occurs on the same wire pair.

It looks as if a high-speed bus will always run at 480 Mb/s, so that capture would be a LINKTYPE_USB_2_0_HIGH_SPEED 
capture.  Is that correct?

Yes. If you connect high-speed hub to high-speed host (or super-speed
host, but super-speed host essentially contains high-speed host, aka
dual-bus) the communication on the connecting wires will be at high
speed (480 Mb/s). Similarly if high-speed device is connected to
high-speed host (or hub) then the communication will be at high speed.

For full/low-speed buses, will those also always run at full peed or low speed, so that there would never be a 
mixture of full-speed and low-speed transactions?

If you capture at the connection between low speed device and
host/hub, there will only ever be low speed packets. It would be a
LINKTYPE_USB_2_0_LOW_SPEED capture.

The problematic case (and the reason why full/low-speed bus is
mentioned) is the LINKTYPE_USB_2_0_FULL_SPEED. It is the case when you
capture at the connection between full speed hub and the host (and
possibly full speed device connected to a full speed hub if there are
low speed devices connected to the full speed hub). If there is low
speed device connected to downstream hub port, then when the host
wants to send packets to the low speed device, these will be sent at
low speed to the hub. However, there will be PRE packet (sent at full
speed) before every low speed transaction.

Hopefully I have recently found full-speed only hub (thanks to Linux
kernel bug report [1]), so I have all the equipment necessary to check
how the OpenVizsla deals with the problematic case.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=213839

--- End Message ---
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers

Current thread: