3.8 Flow Control

To prevent a target device from being overwhelmed with frames, Fibre Channel provides several flow control mechanisms based on a system of credits. Each credit represents a device's ability to accept an additional frame. If the recipient issues no credits to the sender, no frames can be sent. Pacing frame transport on the basis of credits prevents loss of frames and reduces the frequency of entire sequences being retransmitted across the link.

In practice, this credit scheme is based on the number of buffers that an end node maintains for storing incoming data. Memory on-board a host bus adapter, for example, may be allocated as receive buffers to interface between the deserializing and decoding functions of FC-1 and the frame reassembly function of FC-2. The receive buffers are filled as frames are handed up by FC-1, and they are emptied as FC-2's assembly line pulls individual frames for reconstruction into data blocks.

For efficient utilization of the Fibre Channel transport, it is useful if multiple frames can be sent consecutively. This is accomplished by granting sufficient credits before a transaction begins and by using Fibre Channel's full duplex capability to send additional credits while frames are still being received and processed.

Transmission credit is initially established when two communicating nodes log in and exchange communication parameters. End-to-end flow control (EE_Credit) is used by Class 1 and Class 2 service between two end nodes and is monitored by the nodes themselves. An intervening switch does not participate in EE_Credit. After an initial credit level is granted, credits are replenished by acknowledgments issued by the receiver to the sender. The sender decrements the EE_Credit by 1 for each frame issued and increments only when an ACK is received.

Buffer-to-buffer credit (BB_Credit) is used by Class 2 and Class 3 service and relies on the receiver-ready (R_RDY) ordered set to replenish credits. An end node attached to a switch will establish its BB_Credit during login to the fabric. A communicating partner on the far side of the switch will establish its own (and possibly different) BB_Credit to the switch during login. BB_Credit thus has no end-to-end component. The sender decrements the BB_Credit by 1 for each frame sent, and increments BB_Credit by 1 for each R_RDY received. The initial value of the BB_Credit must be nonzero.

In arbitrated loop, an alternative BB_Credit scheme is employed. Alternative BB_Credit assumes that the BB_Credit of a device is zero. The target node does not establish a positive BB_Credit until it is opened for a transaction by an initiator. The target then issues a number of R_RDYs equivalent to the receive buffers it has available. The differentiating feature of alternative BB_Credit is that an initiator does not have to maintain a table of BB_Credit values for potentially more than 100 targets on the same loop. By simply setting the initial value to zero and relying on R_RDYs to establish credit, you dramatically reduce the overhead on loop devices.



Designing Storage Area Networks(c) A Practical Reference for Implementing Fibre Channel and IP SANs
Designing Storage Area Networks: A Practical Reference for Implementing Fibre Channel and IP SANs (2nd Edition)
ISBN: 0321136500
EAN: 2147483647
Year: 2003
Pages: 171
Authors: Tom Clark

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net