Solved

Multiple streams in UASP(USB Attached SCSI Protocol)

Posted on 2012-12-26
11
613 Views
Last Modified: 2014-03-31
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
0
Comment
Question by:liaoo
  • 4
  • 3
11 Comments
 
LVL 47

Accepted Solution

by:
dlethe earned 500 total points
ID: 38722680
#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
0
 

Author Comment

by:liaoo
ID: 38722994
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
0
 
LVL 47

Assisted Solution

by:dlethe
dlethe earned 500 total points
ID: 38723725
#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.
0
 

Author Comment

by:liaoo
ID: 38725707
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...^_^
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 47

Expert Comment

by:dlethe
ID: 38725726
USB protocol analyzers are the way to go, and are relatively inexpensive.
0
 

Author Comment

by:liaoo
ID: 38730875
I think I have to take time setting up the testing environment and figuring out the logging information...
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 39958736
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
0
 
LVL 47

Expert Comment

by:dlethe
ID: 39958737
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.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Does your iMac really need a hardware upgrade? Will upgrading RAM speed-up your computer? If yes, then how can you proceed? Upgrading RAM in your iMac is not as simple as it may seem. This article will help you in getting and installing right RA…
I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now