comment on 00-410r0 SRP scatter gather lists

Elliott, Robert Robert.Elliott at COMPAQ.com
Tue Nov 21 16:15:14 PST 2000


* From the T10 Reflector (t10 at t10.org), posted by:
* "Elliott, Robert" <Robert.Elliott at compaq.com>
*
I suggest including two data segment descriptors (address/memory handle/data
length) in the CMND IU with separate "indirect" bits for each.  

This has two benefits:
1.  Bidirectional commands are not forced to use scatter/gather.  The first
data segment descriptor would be the write address (or point to a write SG
table) and the second would be the read address (or point to a read SG
table).

2.  Unidirectional commands using scatter gather can include the first
address in the CMND IU along with a pointer to the SG list.  This lets the
target start transferring data immediately (possibly reading the SG list
|from the initiator at the same time it returns read data to the initiator,
if the transport is full-duplex).  The 1394 community felt this sort of
"fast start" optimization was important enough that an SBP-3 project was
formed.


I also suggest making the scatter gather table chainable.  The current
definition requires the table to be contiguous in the RDMA address space.
If an initiator is using scatter gather because it does not want to provide
virtual memory mapping, it may have trouble locking down a sufficiently
large contiguous space for the SG table.  

This can be done by merging the "indirect" bit functionality with the Buffer
Length fields.  In the CMND IU, provide a field corresponding to each of the
data segment descriptors:
    TotalNumberOfEntries0[15:0]
    TotalNumberOfEntries1[15:0]
    DataSegmentDescriptor0
    DataSegmentDescriptor1

The fields are interpreted as:

TotalNumberOfEntries    Data Segment Descriptor interpretation
    0                   unused
    1                   address of data (i.e. not "indirect")
    2 or more           address of a SG table (i.e. "indirect")

Start each SG table with a field indicating the number of entries in that
table.  If TotalNumberOfEntries (from the CMND IU) has not been reached, the
last entry contains an address of a SG table rather than a data address.

SG table:
    NumberOfTableEntries[15:0]
    DataSegmentDescriptor
    DataSegmentDescriptor
    ...
    DataSegmentDescriptor (last one; points to another SG table if
cumulative NumberOfTableEntries is less than TotalNumberOfEntries)

---
PC: Robert.Elliott at compaq.com
UNIX: relliott at unixmail.compaq.com
 
*
* For T10 Reflector information, send a message with
* 'info t10' (no quotes) in the message body to majordomo at t10.org




More information about the T10 mailing list