Multiple streams in UASP(USB Attached SCSI Protocol)

liaoo
liaoo used Ask the Experts™
on
Dear experts,
I have 1 question about how to process multiple streams in UASP(USB attached SCSI Protocol) and maybe you can help me to clarify it. Thanks in advance...

As we know UASP is based on USB 3.0 Bulk Stream and built on top of it. We can imagine multiple streams with different Stream ID share the same pipe(communication pathway) and streams are transferred via host/device multiplexing...

My question is:Assume there are 2 streams(ID = 1 and 2) then the processing sequence might be: (we can assume these 2 streams are successfully processed without any error !)

Scenario 1:
- stream 1 is selected and then process stream 1 "until all data is processed"...
- then stream 2 is selected and process stream 2 "until all data is processed"...

Scenario 2: stream 1/2 will be divided into multiple sub-streams and the processing sequence is:
- process part of stream 1
- process part of stream 2
- process part of stream 1
- process part of stream 2
- (... multiplexing until all these 2 streams are completed... )

which one is correct ? or there is another scenario ?

* That is, the selected stream is always processed until it is completed then another stream can be selected, it is correct ?
stream.jpg
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
President
Top Expert 2010
Commented:
#1, but it is not quite that simple ... There are 3 round trips for any SCSI command, and each trip must be completed before the next one.    Now I am simplifying everything, and if you were a developer you need to read the full spec at the T10.org or the usb.org site.   But found this summary that may give you enough to answer the question sufficiently...


http://www.usb.org/developers/presentations/pres0410/2-4_SSUSB_DevCon_UASP_Stevens.pdf

Author

Commented:
First thanks for your comments. After reviewing this document I have below questions and maybe you can help me to clarify them...

(1) I think the "3 round-trip" you said means: one round-trip for sending CBW, one for accessing data, and the last is for receiving status. Am I right ?

(2) If (1) is right, then as this doc said, I think: UASP provides a modest increase in bus utilization and eliminates much of the round trip time because this time is hidden behind queuing(storage driver is a queuing model now). Am I right ?

(3) There is only one example in this doc describing the behavior of multiple commands(one Read + one Write). If we consider only the data part then I found below:
- (H2D) IN ACK (for IN)
- (H2D) DP (for OUT)
- (D2H) DP (for IN)
- (H2D) DP (for OUT)
- (H2D) IN ACK (for IN)
- (D2H) ACK (for OUT)
.....

There are 2 streams in above example and it seems that device can:
- select stream ID(for write) and do DMA transfer
- select stream ID(for read)  and do DMA transfer
- select stream ID(for write) and do DMA transfer
- select stream ID(for read)  and do DMA transfer

Thus I can conclude that the Data IN/OUT streams are divided into multiple DPs and these DPs are transferred concurrently and can be interleaved(Stream ID is multiplexed...)

This brings me a question about (One Write+One Write) case:

Can I say that the DPs transferred in this Data-OUT pipe looks like below:
- select stream ID(for write 1) and do DMA transfer
- select stream ID(for write 2)  and do DMA transfer
- select stream ID(for write 1) and do DMA transfer
- select stream ID(for write 2) and do DMA transfer
- ...

Am I correct ?

Thanks !
ex.jpg
DavidPresident
Top Expert 2010
Commented:
#1 & #2 are yes, as for #3, I've never had the need to look at that scenario with a protocol analyzer so can't answer with authority.  The work I do professionally is at the CDB level.  So I suggest downloading the 500+ page official specs at the usb.org site and getting the definitive answer to the last one.   Sorry, don't know that one off top of my head.
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Thanks for your comments ! Maybe the best way is to setup the platform which can activate UASP then use USB protocol analyzer to trace the behavior...^_^
DavidPresident
Top Expert 2010

Commented:
USB protocol analyzers are the way to go, and are relatively inexpensive.

Author

Commented:
I think I have to take time setting up the testing environment and figuring out the logging information...
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
DavidPresident
Top Expert 2010

Commented:
I object - the question was answered, followup was answered, and then the "what is the best way" was answered.  The last comment from author was nothing more than a comment saying, "I think I have to take time setting up the testing environment and figuring out the logging information..."

There were no open issues, question was answered.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial