X3T9.2/92-029.R0 X3T9.2/92-029.R0 X3T9.2/92-029.R0 To: X3T9.2 Members From: Dal Allan Subject: Translation of IPI-3 Command Queueing to SCSI Language Translation of IPI-3 Command Queueing to SCSI Language Translation of IPI-3 Command Queueing to SCSI Language At December's Queuing Working Group, there were complaints about the difficulty in interpreting the language that IPI-3 used to describe Command Queueing. Those who had been unable to hear Ed Grivna's presentation had the greatest difficulty. The following was uploaded to the SCSI Bulletin Board before Christmas but it did not go out on the Reflector until New Year and only about 1/3 of those who attended the January working group had seen it. Hope this helps..... 1. Command Processing 1. Command Processing 1. Command Processing A target that can accept more than one command is capable of command stacking. The number of commands that may be stacked is limited by the design of the target (information on what is supported is provided via Mode Sense). If an initiator attempts to send more commands to a target than can be accepted, they are rejected. Commands that are stacked may be Untagged or Tagged. 1.1 Untagged 1.1 Untagged 1.1 Untagged The target can accept only one I/O process for every LUN under its control (i.e., a queue of one). 1.2 Tagged 1.2 Tagged 1.2 Tagged The initiator can have more than one I/O process for every LUN concurrently active under control of the target, and the target is responsible to execute them. This permits the target the freedom to optimize the sequence of command execution to enhance performance (e.g., seek ordering algorithms). The initiator has the ability to override target optimization via Mode Select. 2. Command Execution Order 2. Command Execution Order 2. Command Execution Order The order in which commands are executed is a function of command type. The command types are: - Untagged - Tagged - Chained - Sequential - Ordered - Head of Queue Commands that are identified as Chained, Sequential, or Ordered cannot be intermixed for a given LUN. The last command of a Chain, Sequence, or Order has no encoding of its identity in order to identify it as being the last one - the target shall be capable of recognizing it as being the last one, rather than treating it as an Untagged or Tagged command. The execution scenarios possible are: 2.1 Untagged/Tagged Commands 2.1 Untagged/Tagged Commands 2.1 Untagged/Tagged Commands Commands other than those labeled by modifier bits as Chained, Sequential, Ordered, or Head of Queue are executed in a target-dependent order or a LUN- dependent order or both. Page 2 of Translation of IPI-3 Command Queueing 2.2 Chained Commands 2.2 Chained Commands 2.2 Chained Commands Commands are executed in the order received by the target if FIFO (First In, First Out order) i.e., a sequence of commands to a single LUN. The LUN is implicitly reserved as long as any command of the Chain is being executed. If a command in the Chain is unsuccessful, the Chain shall be terminated and the remaining commands are not executed. The Chained modifier encoding is not set for the last command in a Chain. The target may multiplex I/O processes for other LUNs during execution of the Chain. 2.3 Sequential Commands 2.3 Sequential Commands 2.3 Sequential Commands Commands are executed in the order received by the target (FIFO order). There may be more than one LUN in a Sequence and the target may multiplex other I/O processes during execution of the Sequence. If a command in the Sequence is unsuccessful, the Sequence shall be terminated and the remaining commands are not executed. The Sequential modifier encoding is not set for the last command in a Sequence. There is no implicit Reserve of the LUN beyond the command being executed. 2.4 Ordered Commands 2.4 Ordered Commands 2.4 Ordered Commands Commands are executed in the order received by the target (FIFO order). There may be more than one LUN in an Order, but the target shall not multiplex other I/O processes during execution of the Order. If a command in the Order is unsuccessful, the Order shall be terminated and the remaining commands are not executed. The Ordered modifier encoding is not set for the last command in an Order. There is no implicit Reserve of the LUN beyond the command being executed. 2.5 Head of Queue Commands 2.5 Head of Queue Commands 2.5 Head of Queue Commands Head of Queue commands and Head of Queue Chains/Sequences/Orders are indicated by the encoding. Only the first command in a Chain/Sequence/Order shall be designated as Head of Queue, but the Head of Queue shall apply to the entire Chain/Sequence/Order. A Head of Queue command causes the target to change the order of execution of stacked commands and also causes changes in interpreting the command transmission for each LUN. When a Head of Queue command is received for an LUN, any Chain/Sequence/Order that was in the process of being received shall be ended (i.e., the last command received is interpreted as the last of the Chain/Sequence/Order regardless of the command modifier settings in that command. This ending applies regardless of whether the target is operating in a tagged or untagged environment. NOTE: This applies only to commands received over the same port. Head of Queue commands, whether Untagged or part of a Chain/Sequence/Order, are executed before non-Head of Queue commands. Head of Queue commands are executed in Last In First Out (LIFO) order. With the exception of individual ABORT commands, the receipt of a Head of Queue command does not affect the I/O process of any Untagged command or commands in a Chain/Sequence/Order, except for the possible ending noted previously. When a Head of Queue, Untagged ABORT command is received, the target shall suspend the command executing (if possible), and process the ABORT. NOTE: In the case of a target that queues commands, the initiator may have to issue no more commands until it can match valid responses with all the issued commands in order to identify the one that was unsuccessful.