SAS SL_CC handling of CLOSE

Elliott, Robert (Server Storage) Elliott at hp.com
Mon Mar 31 19:44:08 PST 2003


* From the T10 Reflector (t10 at t10.org), posted by:
* "Elliott, Robert (Server Storage)" <Elliott at hp.com>
*
This is a multi-part message in MIME format.

------_=_NextPart_001_01C2F800.F30EE60A
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

While connected, the SL_CC state machine currently only honors an
incoming CLOSE after the protocol-specific link layer (SSP, STP, or =
SMP)
has sent a Request Close message.  In SSP, Request Close is sent after
DONEs are exchanged.  In SMP, Request Close is sent after the RESPONSE
frame is transmitted.  No such time exists for STP and there is no way
to define when Request Close is needed.

This has a few problems:
1. There is no definition for when the STP link layer sends Request
Close, and in fact there is no time similar to SSP or STP where both
sides of a connection can expect the connection to be closed.  Either
side is allowed to request a close when the bus is idle (no R_RDY
granted).  One side's SL_CC can be waiting for its STP link layer to
signal Request Close when a CLOSE arrives.  Per the current standard, =
it
is supposed to ignore the CLOSE - definitely not the intention.  [this
is the issue prompting attention]

2. The XL state machine responds to CLOSE immediately; it has no
protocol-specific knowledge.  If a CLOSE shows up at the wrong time in
an SSP or SMP connection, the XL state machine starts closing down the
connection, but the SL_CC at the end of the connection ignores it.  =
This
eventually leads to 1 ms timeouts and BREAKs; it would be much cleaner
if SL_CC behaved the same as XL.

3. Scenarios that devolve into BREAKs mess up CLOSE (CLEAR AFFILIATION)
usage, since there is no BREAK (CLEAR AFFILIATION).


To solve this, we propose that SL_CC honor CLOSEs without waiting for
protocol-specific link layer permission.  This requires these changes:
1.  SL_CC honors CLOSE in the SL_CC3:Connected state.  If it sees =
CLOSE,
it transitions to a new state SL_CC7:Disconnect.

2. SL_CC7:Disconnect transmits a CLOSE and goes to SL_CC0:Idle.

3. Both SL_CC4:DisconnectWait and SL_CC7:Disconnect send Enable Disable
SSP (Disable), Enable Disable SMP (Disable), and Enable Disable STP
(Disable) messages to disable the protocol-specific link layers.
(rather than waiting for SL_CC0:Idle to do so).

Some other alternatives are:
a) make SL_CC honor CLOSE during STP connections but ignore it during
SSP and SMP connections; or
b) make the STP link layer detect CLOSE and send, in negative or zero
time, an Allow Close message to SL_CC so it also detects the CLOSE.


Specific wording:
7.14.4.5 SL_CC3:Connected state
7.14.4.5.1 State description
This state enables the SSP, STP, or SMP link layer state machine to
transmit dwords during a connection.
If this state is entered from SL_CC1:ArbSel state or the =
SL_CC2:Selected
state with an argument of Open
SMP Connection then this state shall send an Enable Disable SMP =
(Enable)
message to the SMP link layer
state machines (see 7.18.4).

If this state is entered from SL_CC1:ArbSel state or the =
SL_CC2:Selected
state with an argument of Open
SSP Connection then this state shall send an Enable Disable SSP =
(Enable)
message to the SSP link layer
state machines (see 7.16.7).

If this state is entered from SL_CC1:ArbSel state or the =
SL_CC2:Selected
state with an argument of Open
STP Connection then this state shall send an Enable Disable STP =
(Enable)
message to the STP link layer
state machines (see 7.17.7).

This state shall request idle dwords be transmitted by repeatedly
sending Transmit Idle Dword messages to
the SL transmitter until the SSP, SMP, or STP link layer state machine
starts transmitting.

7.14.4.5.2 Transition SL_CC3:Connected to SL_CC4:DisconnectWait
This transition shall occur if a Request Close message is received.

7.14.4.5.3 Transition SL_CC3:Connected to SL_CC5:BreakWait
This transition shall occur if a Request Break message is received and =
a
BREAK Received message has not
been received.

7.14.4.5.4 Transition SL_CC3:Connected to SL_CC6:Break
This transition shall occur if a BREAK Received message is received and
after sending a Connection Closed
(Break Received) confirmation to the port layer.

7.14.4.5.n Transition SL_CC3:Connected to SL_CC7:Disconnect [new]
This transition shall occur if a CLOSE Received message is received.


7.14.4.6 SL_CC4:DisconnectWait state
7.14.4.6.1 State description
This state closes the connection and releases all resources associated
with the connection.

[new paragraph:]
Upon entry to this state, this state shall send Enable Disable SSP
(Disable), Enable Disable SMP (Disable),
and Enable Disable STP (Disable) messages to the SSP, SMP, and STP link
layer state machines.

This state shall:
1) send a Transmit CLOSE (Normal) message or Transmit CLOSE (Clear
Affiliation) message to the SL transmitter;
2) send at least three Transmit Idle Dword messages to the SL
transmitter; and
3) initialize and start the Close Timeout timer.
A CLOSE Received message may be received at any time while in this
state.

7.14.4.6.2 Transition SL_CC4:DisconnectWait to SL_CC0:Idle
This transition shall occur after:
a) sending a Transmit CLOSE message to the SL transmitter;
b) receiving a CLOSE Received message; and
c) sending a Connection Closed (Normal) confirmation to the port layer.
[Editor's note: I hate these implied "shall send Connection Closed"
rules that are not directly stated, but leave them in this proposal.]

7.14.4.6.3 Transition SL_CC4:DisconnectWait to SL_CC5:BreakWait
This transition shall occur if:
a) a BREAK Received message has not been received;
b) no CLOSE Received message is received in response to a Transmit =
CLOSE
message before the Close Timeout timer expires; and
c) after sending a Connection Closed (Close Timeout) confirmation to =
the
port layer.

7.14.4.6.4 Transition SL_CC4:DisconnectWait to SL_CC6:Break
This transition shall occur after receiving a BREAK Received message =
and
after sending a Connection Closed
(Break Received) confirmation to the port layer.


7.14.4.n SL_CC7:Disconnect state [new section]
7.14.4.n.1 State description
This state closes the connection and releases all resources associated
with the connection.

Upon entry to this state, this state shall send Enable Disable SSP
(Disable), Enable Disable SMP (Disable),
and Enable Disable STP (Disable) messages to the SSP, SMP, and STP link
layer state machines.

This state shall:
1) send a Transmit CLOSE (Normal) message or Transmit CLOSE (Clear
Affiliation) message to the SL transmitter; and
2) send at least three Transmit Idle Dword messages to the SL
transmitter; and
3) send a Connection Closed (Normal) confirmation to the port layer.

7.14.4.n.2 Transition SL_CC4:Disconnect to SL_CC0:Idle
This transition shall occur after sending a Connection Closed (Normal)
confirmation.


--
Rob Elliott, elliott at hp.com
Hewlett-Packard Industry Standard Server Storage Advanced Technology
 <https://ecardfile.com/id/RobElliott>
https://ecardfile.com/id/RobElliott






------_=_NextPart_001_01C2F800.F30EE60A
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

Message While connected, the SL_CC state = machine=20 currently only honors an incoming CLOSE after the protocol-specific = link layer=20 (SSP, STP, or SMP) has sent a Request Close message.  In SSP, = Request Close=20 is sent after DONEs are exchanged.  In SMP, Request Close is sent = after the=20 RESPONSE frame is transmitted.  No such time exists for STP and = there is no=20 way to define when Request Close is needed.

This has a few=20 problems:
1. There is no definition for when the STP link layer = sends Request=20 Close, and in fact there is no time similar to SSP or STP where both = sides of a=20 connection can expect the connection to be closed.  Either side is = allowed=20 to request a close when the bus is idle (no R_RDY granted).  One = side's=20 SL_CC can be waiting for its STP link layer to signal Request Close = when a CLOSE=20 arrives.  Per the current standard, it is supposed to ignore the = CLOSE -=20 definitely not the intention.  [this is the issue prompting=20 attention] 2. The XL state machine responds = to CLOSE=20 immediately; it has no protocol-specific knowledge.  If a CLOSE = shows up at=20 the wrong time in an SSP or SMP connection, the XL state machine starts = closing=20 down the connection, but the SL_CC at the end of the connection ignores = it.  This eventually leads to 1 ms timeouts and BREAKs; it would = be much=20 cleaner if SL_CC behaved the same as XL.

3. Scenarios that = devolve into=20 BREAKs mess up CLOSE (CLEAR AFFILIATION) usage, since there is no BREAK = (CLEAR=20 AFFILIATION).


To solve this, we propose that SL_CC honor = CLOSEs=20 without waiting for protocol-specific link layer permission.  This = requires=20 these changes:
1.  SL_CC honors CLOSE in the SL_CC3:Connected=20 state.  If it sees CLOSE, it transitions to a new state=20 SL_CC7:Disconnect.

2. SL_CC7:Disconnect transmits a CLOSE and = goes to=20 SL_CC0:Idle.

3. Both SL_CC4:DisconnectWait and SL_CC7:Disconnect = send=20 Enable Disable SSP (Disable), Enable Disable SMP (Disable), and Enable = Disable=20 STP (Disable) messages to disable the protocol-specific link = layers. =20 (rather than waiting for SL_CC0:Idle to do so).

Some other = alternatives=20 are:
a) make SL_CC honor CLOSE during STP connections but ignore it = during=20 SSP and SMP connections; or
b) make the STP link layer detect CLOSE = and send,=20 in negative or zero time, an Allow Close message to SL_CC so it also = detects the=20 CLOSE.


Specific wording:
7.14.4.5 SL_CC3:Connected=20 state
7.14.4.5.1 State description
This state enables the SSP, = STP, or SMP=20 link layer state machine to transmit dwords during a connection.
If = this=20 state is entered from SL_CC1:ArbSel state or the SL_CC2:Selected state = with an=20 argument of Open
SMP Connection then this state shall send an Enable = Disable=20 SMP (Enable) message to the SMP link layer
state machines (see=20 7.18.4).

If this state is entered from SL_CC1:ArbSel state or = the=20 SL_CC2:Selected state with an argument of Open
SSP Connection then = this state=20 shall send an Enable Disable SSP (Enable) message to the SSP link = layer
state=20 machines (see 7.16.7).

If this state is entered from = SL_CC1:ArbSel state=20 or the SL_CC2:Selected state with an argument of Open
STP Connection = then=20 this state shall send an Enable Disable STP (Enable) message to the STP = link=20 layer
state machines (see 7.17.7).

This state shall request = idle=20 dwords be transmitted by repeatedly sending Transmit Idle Dword = messages=20 to
the SL transmitter until the SSP, SMP, or STP link layer state = machine=20 starts transmitting.

7.14.4.5.2 Transition SL_CC3:Connected to=20 SL_CC4:DisconnectWait
This transition shall occur if a Request Close = message=20 is received.

7.14.4.5.3 Transition SL_CC3:Connected to=20 SL_CC5:BreakWait
This transition shall occur if a Request Break = message is=20 received and a BREAK Received message has not
been=20 received.

7.14.4.5.4 Transition SL_CC3:Connected to = SL_CC6:Break
This=20 transition shall occur if a BREAK Received message is received and = after sending=20 a Connection Closed
(Break Received) confirmation to the port=20 layer.

7.14.4.5.n Transition = SL_CC3:Connected to=20 SL_CC7:Disconnect [new]
This transition shall occur if a CLOSE = Received=20 message is received.


7.14.4.6 SL_CC4:DisconnectWait=20 state
7.14.4.6.1 State description
This state closes the = connection and=20 releases all resources associated with the connection.

[new paragraph:]
Upon entry to this state, this = state shall=20 send Enable Disable SSP (Disable), Enable Disable SMP (Disable),
and = Enable=20 Disable STP (Disable) messages to the SSP, SMP, and STP link layer = state=20 machines.

This state shall:
1) send a Transmit CLOSE = (Normal)=20 message or Transmit CLOSE (Clear Affiliation) message to the SL=20 transmitter;
2) send at least three Transmit Idle Dword messages to = the SL=20 transmitter; and
3) initialize and start the Close Timeout = timer.
A CLOSE=20 Received message may be received at any time while in this=20 state.

7.14.4.6.2 Transition SL_CC4:DisconnectWait to = SL_CC0:Idle
This=20 transition shall occur after:
a) sending a Transmit CLOSE message to = the SL=20 transmitter;
b) receiving a CLOSE Received message; and
c) = sending a=20 Connection Closed (Normal) confirmation to the port layer.
[Editor's = note: I=20 hate these implied "shall send Connection Closed" rules that are not = directly=20 stated, but leave them in this proposal.]

7.14.4.6.3 Transition=20 SL_CC4:DisconnectWait to SL_CC5:BreakWait
This transition shall = occur=20 if:
a) a BREAK Received message has not been received;
b) no = CLOSE=20 Received message is received in response to a Transmit CLOSE message = before the=20 Close Timeout timer expires; and
c) after sending a Connection = Closed (Close=20 Timeout) confirmation to the port layer.

7.14.4.6.4 Transition=20 SL_CC4:DisconnectWait to SL_CC6:Break
This transition shall occur = after=20 receiving a BREAK Received message and after sending a Connection=20 Closed
(Break Received) confirmation to the port = layer.


7.14.4.n SL_CC7:Disconnect state [new = section]
7.14.4.n.1 State=20 description
This state closes the connection and releases all = resources=20 associated with the connection.

Upon entry to this state, this = state=20 shall send Enable Disable SSP (Disable), Enable Disable SMP = (Disable),
and=20 Enable Disable STP (Disable) messages to the SSP, SMP, and STP link = layer state=20 machines.

This state shall:
1) send a Transmit CLOSE (Normal) = message=20 or Transmit CLOSE (Clear Affiliation) message to the SL transmitter; = and
2)=20 send at least three Transmit Idle Dword messages to the SL transmitter; = and
3) send a Connection Closed (Normal) confirmation to the port=20 layer.

7.14.4.n.2 Transition SL_CC4:Disconnect to = SL_CC0:Idle
This=20 transition shall occur after sending a Connection Closed (Normal)=20 confirmation.


--
Rob Elliott,=20 elliott at hp.com
Hewlett-Packard Industry Standard Server Storage = Advanced=20 Technology
https://ecardfile.com/id/RobElliott




------_=_NextPart_001_01C2F800.F30EE60A--




More information about the T10 mailing list