Link to home
Start Free TrialLog in
Avatar of liaoo
liaoo

asked on

Multiple streams in UASP(USB Attached SCSI Protocol)

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
ASKER CERTIFIED SOLUTION
Avatar of David
David
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of liaoo
liaoo

ASKER

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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of liaoo

ASKER

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...^_^
USB protocol analyzers are the way to go, and are relatively inexpensive.
Avatar of liaoo

ASKER

I think I have to take time setting up the testing environment and figuring out the logging information...
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
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.