-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Transfer packaging not using microframes #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Making it very clear that the "frames" are in fact 1ms frames and not microframes.
Making it very clear that the "frames" are in fact 1ms frames and not microframes.
Making it very clear that the "frames" are in fact 1ms frames and not microframes.
Making it very clear that the "frames" are in fact 1ms frames and not microframes.
|
Hi Bill. Let me know if you can't OK this one. |
|
@paamand : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
| If the caller submits multiple read requests to stream data from the device, the transfer size should be a multiple of the maximum bytes per interval (as returned by <a href="https://docs.microsoft.com/windows/desktop/api/winusb/nf-winusb-winusb_querypipeex">WinUsb_QueryPipeEx</a>) * 8 / interval. | ||
|
|
||
|
|
||
| Because of the transfer packaging, <b>only full 1ms USB frames are available</b> and low-latency applications requiring microframe transfers must use a kernel mode driver instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand this statement. Regardless of whether WinUsb or a kernel-mode driver is used, the underlying kernel-mode interface only allows isochronous transfers to be scheduled on a 1ms frame boundary. For high-speed/SuperSpeed devices which microframes are scheduled is determined by the interval of the endpoint.
Whether a developer needs to use a kernel-mode driver versus WinUSB for low-latency applications is determined by the latency between completion of the isoch transfer on the bus and when the driver or app is notified of that completion. It has nothing to do with frames versus micro-frames.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with both statements. But the critical point here is that lowest latency notification of the driver/app is only done at the 1ms interval regardless of the bInterval of the endpoint. How about:
| Because of the transfer packaging, <b>only full 1ms USB frames are available</b> and low-latency applications requiring microframe transfers must use a kernel mode driver instead. | |
| Because of the transfer packaging used in the underlying kernel-mode interface, the lowest latency notification to an application or driver is 1ms intervals. This also applies to high-speed/SuperSpeed devices regardless of the interval specified by the endpoint. Applications requiring sub-millisecond latency must implement a custom kernel-mode driver. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would only take the typo fixes for these changes. Discussion about the need for a user-mode app versus kernel-mode driver should not be part of the API documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, but details about the imposed limitations of the implementation is definitely useful for anyone using the API in latency critical applications.
| If the caller submits multiple write requests to stream data to the device, the transfer size should be a multiple of the maximum bytes per interval (as returned by <a href="https://docs.microsoft.com/windows/desktop/api/winusb/nf-winusb-winusb_querypipeex">WinUsb_QueryPipeEx</a>) * 8 / interval. | ||
|
|
||
|
|
||
| Because of the transfer packaging, <b>only full 1ms USB frames are available</b> and low-latency applications requiring microframe transfers must use a kernel mode driver instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment to previous comment.
|
|
||
|
|
||
| <b>WinUsb_ReadIsochPipeAsap</b> packetizes the transfer buffer so that in each interval, the host can send the maximum bytes allowed per interval. The maximum bytes is as specified by the endpoint descriptor for full and high-speed endpoints, and endpoint companion descriptor for SuperSpeed endpoints. | ||
| <b>WinUsb_ReadIsochPipeAsap</b> packetizes the transfer buffer so that in each 1ms interval, the host can send the maximum bytes allowed per interval. The maximum bytes is as specified by the endpoint descriptor for full and high-speed endpoints, and endpoint companion descriptor for SuperSpeed endpoints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Packetization is at the micro-frame (125us) level for high-speed/SuperSpeed endpoints, so saying "1ms interval" is not really accurate.
- Should say the host can receive the maximum bytes allowed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Agree that this is not accurate. Intention is to document the consequence of packetization for low-latency applications. This is done by the insertion at line 113. Remove this change.
- True. Fixed in PR Fixed ambiguity of "read" vs "write". #33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <b>WinUsb_ReadIsochPipeAsap</b> packetizes the transfer buffer so that in each 1ms interval, the host can send the maximum bytes allowed per interval. The maximum bytes is as specified by the endpoint descriptor for full and high-speed endpoints, and endpoint companion descriptor for SuperSpeed endpoints. | |
| <b>WinUsb_ReadIsochPipeAsap</b> packetizes the transfer buffer so that in each interval, the host can send the maximum bytes allowed per interval. The maximum bytes is as specified by the endpoint descriptor for full and high-speed endpoints, and endpoint companion descriptor for SuperSpeed endpoints. |
sdk-api-src/content/winusb/nf-winusb-winusb_writeisochpipeasap.md
Outdated
Show resolved
Hide resolved
billlattimer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paamand can you please amend your commit to include the just the correction lines? Thanks!
Trying to keep the amendment accurate and helpful for developers.
|
@paamand : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
Trying to keep the amendment accurate and helpful for developers
Trying to keep the amendment accurate and helpful for developers
|
@paamand : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
Trying to keep the amendment accurate and helpful for developers
@billlattimer The minor typo corrections are fixed in PR #33. This is about clarifying the constraints of the packetization for low-latency applications. I've done my best to do this as accurate as possible. Updated with commits. |
Making it very clear that the USB "frames" are in fact 1ms frames and not microframes.