Return to Home --> Modules --> Fibre Channel Layers


FC-2 Layer


FC-2 basically is a signaling protocol layer, playing the most important role in the Fibre Channel protocol. In SimSANs, the FC-2 layer covers: a) Frames, Sequences, and Exchanges; b) Class-3 and Class-F services; c) segmentation and reassembly; and d) Buffer-to-Buffer flow control. End-to-End flow control and Class-2 service are not implemented considering the fact that most Fibre Channel systems (HBA and Switch, etc) are usually running Class-3/F with Buffer-to-Buffer flow control (using BB_Credit). FC-2 module is composed of one FC-2 Controller module and one or more EE_Pair modules.  


Mouse over the boxes to view specific modules.


Click to view "End-to-End Pair Module" Click to view "FC-2 Controller Module" Click to view "FC-1 Module" Click to view "FC-4 Module" Click to view "Switch Transport Module"

FC-2 Layer

Click here to see its VML version (requiring IE)



Each EE_Pair creates an End-to-End Communication Channel between the local FC_Port and a remote FC_Port. Fibre Channel Exchanges / Sequences / Frames are communicated between such an End-to-End port pair. Multiple EE_Pairs may exist in the FC-2 module, each of which is associated with a separate remote FC_Port identified by its Address_ID. In SimSANs, EE_Pair.0 is reserved for the communication of  Exchanges regarding Extended Link Services (FC-ELS), Generic Service (FC-GS), and Switch Internal Link Service (SW-ILS), most of which use a WKA as the Exchange Originator's Address_ID. EE_Pair.x (where x>0) is created and used for N_Port pair communications when the N_Port Login (PLOGI) is completed between them. Different from EE_Pair.0, EE_Pair.x must present a valid N_Port Address_ID to identify the remote N_Port that participates in the communication. SCSI over Fibre Channel (FCP) uses the N_Port pair to fulfill SCSI IOs. FC-4 tells more about how the N_Port pair communication channel is created.


EE_Pair maintains an ESB (Exchange State Block) for each open Exchange - OESB for the Exchange Originator and RESB for the Exchange Responder.  The states of the active Sequences within an Exchange are monitored and recorded by SSBs (Sequence State Block), which is maintained by the ESB. Each Sequence is segmented into multiple Frames by the Sequence Initiator and finally reassembled at the Sequence Recipient. Note although Frame is the basic transmission unit between FC_Port communication pair, the error recovery is Sequence-basis, i.e., if a Frame is lost, the whole Sequence containing that Frame must be re-transmitted or discarded.


Parameter Maximum Concurrent Sequence (MAX_CON_CURR_SEQ) is exchanged and negotiated between N_Port login pair. SimSANs only allows Class-3 Frames transferred between N_Ports so the MAX_CON_CURR_SEQ is same as Maximum Class-3 Concurrent Sequence (MAX_C3_CON_CURR_SEQ) -  the maximum number of sequences that can be opened at the same time between a N_Port login pair. Since SimSANs uses FCP mapping SCSI IOs to FC-2 Exchanges while FCP internally is simplex (one-way communication), the value of MAX_C3_CON_CURR_SEQ is same as MAX_CON_CURR_EXCH - Maximum Concurrent Exchange.


In SimSANs, a Frame is divided into three parts: Frame Head, Frame Payload, and Frame Tail. The reason why I use multi-part Frame instead of one-packet Frame is that the former can get us a more Accurate Frame Transmission. The Fibre Channel Switch uses cut-through Frame forwarding mechanism, i.e., Frame’s destination address (D_ID) in the header is read at the incoming port and the data is immediately forwarded to the proper outgoing port. In this case, the whole Frame may never actually in the receiver buffer at the same time. With one-packet Frame, the Frame will not be received until the whole Frame reaches to the receiver buffer. You can image the more Switches a Frame passes through, the less accurately the Frame transmission time is simulated. With three-part Frame, the Switch Control Centre can be able to process and forward a Frame right after receiving the Frame Head from the incoming port while the Frame Payload and Frame Tail may still on their way here. Besides, using three-part Frame, the simulation of Frame loss is closer to the real-world situation because in reality any part of a Frame can be lost or encounter errors during its transmission.


Each part of a Frame is formed by these formulas: Frame Head = 2 x IDLEs + SOF + Header; Frame Payload = Payload; Frame Tail = CRC + EOF + 2 x IDLEs. User may refer to FC-FS for more detail about Fibre Channel Frame format. Note the optional header is not used by SimSANs.


FC-2 Controller

This module is a transportation junction of FC-4 IUs (between FC-2 and FC-4) and Frames (between FC-1 and FC-2, or between this FC_Port and other FC_Ports within a Switch). Each FC-4 IU (Information Unit) initiated from FC-4 Layer is mapped to a Fibre Channel Sequence and segmented by EE_Pair into Frames that are transmitted through FC-1 onto the link. At the destination port those Frames are re-assembled into a Sequence and then the original FC-4 IU is transferred to this port's FC-4 Layer. During the transmission, a Frame may travel through one or more Switches, and be routed from incoming FC_Ports (F_Ports or E_Ports within Switches) to outgoing FC_Ports along its way to the destination port.


SimSANs implements non-blocking Switch, which allows multiple concurrent connections to travel through its internal infrastructure without delay. A connection is defined as forwarding a given Frame from the incoming port to the outgoing port.  Note a given incoming link may generate connections to different outgoing ports, and on the other hand, multiple incoming links may generate connections to the same outgoing port. It is possible that an outgoing link, which (1) has used up all its BB_Creidt or (2) has lower outgoing link speed than its incoming link speed for a given connection, may block the connections to other outgoing links - we call this Head-of-Line Blocking. To minimize this problem, SimSANs setup Transmitter Buffer (TxBuf) for each FC_Port (Note: TxBuf is optional in FC-FS but RxBuf is mandatory).  User is able to customize the size of TxBuf (see How-To section about setting up the configuration files). Note very large TxBuf may cause more Frame losses if the link associated with that FC_Port fails. Another way to deal with the Head-of-Line blocking is to setup large BB_Credit value that is especially useful to the long distance link where significant propagation delay presents - User can try the Samples to get a real experience.


FC-2 Controller is a hardware controller. A good example of such a controller is HBA processor, say, Qlogic ISP2300. Six timing elements are defined: FC_SEQ_SEG, FC_FRM_TXU, FC_FRM_RXU, FC_SEQ_ASM, FC4_IU_SEND, and FC4_IU_RECV. Note the last two are used for timing FC-4 Layer in a Switch Port (E_Port or F_Port) and the rest are for EE_Pair. Please refer to Timing Elements about their definitions and configurations.



This page was last updated 2003.10.15