On 13.03.2018 21:58, Adrian Bocaniciu wrote:
On Tue, 13 Mar 2018 17:27:21 +0200 Mathias Nyman <[email protected]> wrote:Example for clarification: Gen 1x1 = 5Gbps, SuperSpeed, one lane, same as USB3.0, and USB 3.1 Gen1 Gen 2x1 = 10Gbps, SuperSpeedPlus, one lane, same as USB 3.1 Gen2 Gen 1x2 = 10Gbps, SuperSpeed, Dual-lane (2 x 5Gbps) Gen 2x2 = 20Gbps, SuperSpeedPlus, Dual-lane (2 x 10Gbps) 4. Should the "speed" sysfs entry be more accurate? USB 3.1 and later can list different supported lane speeds other than the 5Gbps or 10Gbps. actual port speed would be lane count * current lane speed in use. Or do we just keep it simple and show the maximum signaling rate * lane count, i.e. 5000, 10000 or 20000? and show "SSIC" instead of "Gen XxY" for asymetric lane SSIC devices, skipping details on rx and tx lane counts.Please do not compute "signaling rate * count", because it is very misleading and that value cannot be used to verify whether the hardware works at its maximum available speed or not. Gen 1x2 is not 5 * 2 = 10 Gbps, but only 8 Gbps (like Gb Ethernet is 1 Gbps, not 1.25 Gbps), while Gen 2x1 is very close to 10 Gbps, i.e. significantly faster (due to a different encoding), so it would be wrong to display them as equivalent.
Good point, There is a collision where both Gen 1x2 and and Gen 2x1 both would show 10Gbps as "speed" as it so far is based on signaling rate. But I think this boils down to a compromise between usability, complexity and amount of people we are misleading. The USB "speeds" are commonly known as 1.5Mbps, 12Mbps, 480Mbps, 5Gbps, and 10Gbps. That's what people remember and are probably written on boxes and in wikipedia. If we take the line Encoding into account the speeds will be: Gen 1x1 = 4Gbps (8b/10b) Gen 1x2 = 8Gbps Gen 2x1 = 9.697Gbps (128b/132b) Gen 2x2 = 19.394Gbps Or if we take into account flow control, packet framing and protocol overhead the effective bandwidth is even less. I think we will get far more people concerned about their USB 3 device working only at 4Gbps in Linux when it should be 5Gbps, than we get complaints about someone actually comparing throughputs of Gen 2x1 and Gen 1x2 devices, not being aware of different encodings and overhead. To verify if the hardware works at it maximum available speed It would be important to show either the lane count or Gen XxY version to the user. One option is to not show 10Gbps (10000) as the sysfs "speed" for Gen 1x2, but instead something like "Dual5000" or "5000x2", but that again can hit scrips and userspace programs expecting "speed" to be numerical. And it feels like adding unnecessary complexity -Mathias -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
