[SAS] Frame Credit Managmeent

Elliott, Robert (Server Storage) Elliott at hp.com
Mon Nov 11 09:01:23 PST 2002


* From the T10 Reflector (t10 at t10.org), posted by:
* "Elliott, Robert (Server Storage)" <Elliott at hp.com>
*
All of these are covered by the SSP link layer state machines.  I'll
give a quick response to each below.

> -----Original Message-----
> From: Seto, Pak-lung [mailto:pak-lung.seto at intel.com] 
> Sent: Friday, November 08, 2002 11:55 AM
> To: 't10 at t10.org'
> Subject: [SAS] Frame Credit Managmeent
> 
> 
> * From the T10 Reflector (t10 at t10.org), posted by:
> * "Seto, Pak-lung" <pak-lung.seto at intel.com>
> *
> It is unclear that how frame credit should be managed in SAS.
> 
> First, a couple terms may need to be defined in the standard 
> or at least for this discussion.
> 
> Outstanding Credit - The number of R_RDY sent by the port 
> minus the number of frame received after connection has been 
> established Available Credit - The number of R_RDY received 
> minus hte number of frame sent after connection has been established
> 
> I don't believe there is a clause in the standard to describe 
> all the Frame Credit Management issues:

That's what the state machines are for.

> - Both Outstanding Credit and Available Credit must be 
> initialized to zero after connection has been established - 
> when? After OPEN Address Frame has been sent? or after 
> connection has been accepted?

There' no connection until OPEN_ACCEPT is sent.  Dest to source
RRDYs may follow OPEN_ACCEPT.  Source to dest RRDYs need to wait
for OPEN_ACCEPT (the time between OPEN and OPEN_ACCEPT is just
for idle dwords).

> - If a transmitting frame encountered an internal error 
> within the port and the port will need to force the frame CRC 
> error since partial frame has been sent (since we did not 
> accept the EOFa proposal).  Does this errored frame used one 
> Available Credit?

Yes.

> - If the receiving port received a frame with Outstanding 
> Credit = 0, what should the port do, especially it has 
> buffers to store the frame (Missing R_RDY?)?  Is the received 
> frame OK if an R_RDY is sent before the EOF is received/detected?

It's completely ignored.  An R_RDY sent during the frame is
too late to be honored; there must be credit at SOF time.

We debated in the group whether an R_RDY sent during the frame
needs to be specifically dishonored, and the group didn't want
to make that clearer.

> - When does the Outstanding Credit count should be 
> decremented? After EOF has been detected?

Yes (see the RCM1 state).

> - When should the Available Credit count be decremented? 
> After receive a frame SOF-EOF, valid CRC, the right 
> destination SAS address, etc?

See the RCM1 and RF1 states.

> - If a received frame does not have the matching destination 
> SAS address, does it used up one Outstanding Credit?

Yes, credit is a link layer phenomenon, addresses are a transport
level construct.

> - If a received frame does not belong to one of the active 
> outstanding IO, does it used up one Outstanding Credit?

Yes.  Link layer knows nothing about tags et al.

> - If a frame has more than 1024 bytes of payload, does it 
> used up one Outstanding Credit?

No (notice that the RCM1 state uses Frame Received, which
is not sent if the frame is discarded by the link layer due
to seeing 1052 bytes after SOF).

> - If a frame is terminated by the receiving port, does it 
> used up one Outstanding Credit?

Depends what "terminated" means.

> - If a frame is received with the wrong protocol (SMP frame 
> in SSP connection), does it used up one Outstanding Credit?

Sure.  The link layer knows nothing about frame types.

> - Any errored frame with good CRC or no decoding error, does 
> it used up one Outstanding Credit?

What is an errored frame with good CRC?  If you detect an
invalid character or a disparity error I think you should 
treat it as a CRC error even if the CRC checker happens to
work.

> - Does any of the above conditions - especially credit 
> unbalance - received a frame without outstanding credit, 
> should it cause the connection to be terminated?

Not directly.  ACK/NAK timeouts are likely, though, which will
result in closing the connection.

> Any other situations?
> 
> Pak 

--
Rob Elliott, elliott at hp.com
Industry Standard Server Storage Advanced Technology
Hewlett-Packard

*
* 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