A method for fiber channel-2 (FC-2) layer communication link negotiation, a fiber channel node and a system

By introducing the FC-2 layer's judgment mechanism into the Fibre Channel communication system, the sender or receiver can actively synchronize when synchronization is lost, thus solving the communication dead loop problem and improving the reliability and adaptability of communication.

CN116155472BActive Publication Date: 2026-02-24BEIJING WATERTEK INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211680063.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-26
Publication Date
2026-02-24
Estimated Expiration
2042-12-26

AI Technical Summary

Technical Problem

In fiber channel communication, when synchronization is lost, the communicating parties cannot self-adjust, leading to a dead loop and unreliable communication.

Method used

Add a judgment mechanism to the FC-2 layer so that the sender or receiver can actively synchronize if bit synchronization and word synchronization are not completed, thus avoiding infinite loops.

Benefits of technology

It improves the adaptability and communication reliability of Fibre Channel nodes and avoids the dead loop of link failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116155472B_ABST
    Figure CN116155472B_ABST
Patent Text Reader

Abstract

The application discloses an FC-2 layer communication link negotiation method, an optical fiber channel node and a system. The method is applied to an optical fiber channel communication system, the communication system comprises a sender and a receiver, and the method comprises the following steps: judging whether the sender loses synchronization based on an FC-2 layer; in the case that the sender loses synchronization, judging whether the receiver re-completes bit synchronization and word synchronization; and in the case that the receiver does not complete bit synchronization and word synchronization, re-performing bit synchronization and word synchronization on the sender or the receiver. In the above method, a judgment mechanism is added to the sender or the receiver in the link negotiation process of the FC communication parties, if it is judged that the receiver fails to complete bit synchronization and word synchronization, the sender or the receiver will be forced to perform bit synchronization and word synchronization, so as to promote the link negotiation process of the two parties to be completed. Therefore, the FC node has stronger adaptability and higher communication reliability, and the FC node is prevented from falling into a dead loop of link failure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to, but is not limited to, optical fiber communication technology, and more specifically, to an FC-2 layer communication link negotiation method, a fiber channel node, and a system. Background Technology

[0002] Fibre Channel (FC) was initially proposed by the American National Standards Institute (ANSI) to address the negative impact of I / O transmission bottlenecks on the entire storage system, resulting in a suite of Fibre Channel standard protocols. Fibre Channel networks offer numerous advantages, including high speed, strong anti-interference capabilities, and flexibility, leading to their widespread application in avionics interconnection and communication. The FC protocol employs a hierarchical structure similar to a network hierarchy model, divided into five layers based on function: FC-0, FC-1, FC-2, FC-3, and FC-4. Specifically, the FC-0 layer describes the specifications of the physical link between two ports; the FC-1 layer describes the 8B / 10B encoding / decoding scheme for bit and word synchronization; the FC-2 layer is the core of the FC protocol, defining the rules and mechanisms for data transmission; the FC-3 layer describes common services such as data encryption and compression; and the FC-4 layer describes the interface between Fibre Channel and upper-layer applications.

[0003] Before data transmission, communication between two parties using a Fibre Channel network requires communication link negotiation at the FC-2 layer until both ports are active and synchronized. During this negotiation, both parties must first achieve bit and word synchronization before primitives can be negotiated for a link. If bit and word synchronization is incomplete, the receiver enters a reset state to re-synchronize them. However, when communication anomalies occur, the sender can only passively wait for the receiver to re-synchronize; the sender cannot adjust itself. Furthermore, if the receiver fails to re-synchronize, the two parties will enter a deadlock, leading to unreliable communication. Summary of the Invention

[0004] In view of this, the present disclosure provides the following solutions.

[0005] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.

[0006] This disclosure provides an embodiment of an FC-2 layer communication link negotiation method applied to a Fibre Channel communication system, the communication system including a sender and a receiver, the method comprising:

[0007] Determine whether the sender has lost synchronization based on the FC-2 layer;

[0008] In the event that the sender loses synchronization, determine whether the receiver has re-completed bit synchronization and word synchronization;

[0009] If the receiver fails to complete bit and word synchronization, the sender or the receiver shall re-synchronize bits and words.

[0010] In an exemplary embodiment of this disclosure, before determining whether the sender has lost synchronization based on the FC-2 layer, the method further includes:

[0011] Bit synchronization and word synchronization are performed on the sender.

[0012] In an exemplary embodiment of this disclosure, the step of determining whether the sender has lost synchronization based on the FC-2 layer includes:

[0013] The sender sends an inoperable primitive sequence NOS, and the current state of the sender's port is NOS sending state LF2;

[0014] If the sender receives an offline primitive sequence, and the sender fails to recognize the offline primitive sequence OLS, and the current state of the sender's port is NOS transmission state LF2, then it is determined that the sender has lost synchronization.

[0015] In an exemplary embodiment of this disclosure, determining whether the receiver has re-completed bit synchronization and word synchronization includes:

[0016] The sender compares the first dwell time T1 with the preset time T0. If the first dwell time T1 is greater than or equal to the preset time T0, it determines that the receiver has not re-completed bit synchronization and word synchronization. The first dwell time T1 is the duration for which the sender's port state remains in the NOS transmission state LF2.

[0017] In an exemplary embodiment of this disclosure, after resynchronizing the bit and word of the sender, the method further includes:

[0018] The sender sends an inoperable primitive sequence NOS, and the current state of the sender's port is NOS sending state LF2;

[0019] The sender receives the offline primitive sequence OLS, and the current state of the sender's port is OLS receiving state OL2;

[0020] The sender transmits a link reset LR and receives a link reset response LRR. The current state of the sender's port is LRR receive state LR3.

[0021] The sender sends an idle IDLE and receives an idle IDLE; the current state of the sender's port is active state AC.

[0022] The sender sends an idle IDLE.

[0023] In an exemplary embodiment of this disclosure, before determining whether the sender has lost synchronization based on the FC-2 layer, the method further includes:

[0024] Bit synchronization and word synchronization are performed on the receiver.

[0025] In an exemplary embodiment of this disclosure, the step of determining whether the sender has lost synchronization based on the FC-2 layer includes:

[0026] The receiver receives the inoperable primitive sequence NOS, and the current state of the receiver's port is NOS reception state LF1; the receiver sends the offline primitive sequence OLS, the receiver receives the inoperable primitive sequence NOS, the sender fails to recognize the offline primitive sequence OLS, and the current state of the receiver's port is NOS reception state LF1, then it is determined that the sender has lost synchronization.

[0027] In an exemplary embodiment of this disclosure, determining whether the receiver has re-completed bit synchronization and word synchronization includes:

[0028] The receiver compares the second dwell time T2 with the preset time T0. If the second dwell time T2 is greater than or equal to the preset time T0, it is determined that the receiver has not re-completed bit synchronization and word synchronization. The second dwell time T2 is the duration for which the receiver's port state remains in the NOS receiving state LF1.

[0029] In an exemplary embodiment of this disclosure, after resynchronizing the bit and word of the receiver, the method further includes:

[0030] The receiver receives the inoperable primitive sequence NOS, and the current state of the receiver's port is NOS reception state LF1;

[0031] The receiver sends the offline primitive sequence OLS, the receive link is reset LR, and the current state of the receiver's port is LR receive state LR2.

[0032] The receiver sends a Link Reset Response (LRR) and receives an Idle Response (IDLE). The current state of the receiver's port is active (AC).

[0033] The receiver sends an idle IDLE and receives an idle IDLE. The current state of the receiver's port is active state AC.

[0034] This disclosure also provides a Fibre Channel node, which serves as the transmitter in a Fibre Channel communication system, and the node includes:

[0035] The first judgment module is set to determine whether the node it is in has lost synchronization based on the FC-2 layer.

[0036] The second judgment module is set to determine whether the receiver has re-completed bit synchronization and word synchronization if the node where it is located loses synchronization.

[0037] The first forced synchronization module is configured to re-synchronize the bit and word of its own node if the receiver fails to complete bit and word synchronization.

[0038] And / or,

[0039] The Fibre Channel node serves as the receiver in the Fibre Channel communication system, and the node includes:

[0040] The third judgment module is set to determine whether the sender has lost synchronization based on the FC-2 layer.

[0041] The fourth judgment module is configured to determine whether its own node has re-completed bit synchronization and word synchronization if the sender loses synchronization.

[0042] The second forced synchronization module is configured to resynchronize the bit and word of its own node if the node itself has not completed bit and word synchronization.

[0043] An embodiment of this disclosure also provides a fiber channel communication system, including:

[0044] At least two Fibre Channel nodes are used as either the sender or receiver in the Fibre Channel communication system.

[0045] In this configuration, at least one Fibre Channel node is configured to: determine whether the sender has lost synchronization based on the FC-2 layer; if the sender has lost synchronization, determine whether the receiver has re-completed bit synchronization and word synchronization; if the receiver has not completed bit synchronization and word synchronization, re-perform bit synchronization and word synchronization for either the sender or the receiver.

[0046] In this embodiment of the disclosure, during the link negotiation process between the two parties in FC communication, a judgment mechanism is added to either the sender or the receiver. If it is determined that the receiver has failed to complete bit synchronization and word synchronization, the sender or receiver will force bit synchronization and word synchronization, prompting both parties to complete the link negotiation process. This avoids the two parties getting stuck in a dead loop of link failure, making the FC node more adaptable and the communication more reliable.

[0047] Other features and advantages of this disclosure will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the disclosure. The objects and other advantages of this disclosure may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description

[0048] The accompanying drawings are provided to further understand the technical solutions of this disclosure and constitute a part of the specification. They are used together with the embodiments of this disclosure to explain the technical solutions of this disclosure and do not constitute a limitation on the technical solutions of this disclosure.

[0049] Figure 1A This is a schematic diagram of a fiber optic channel communication system according to an embodiment of the present disclosure;

[0050] Figure 1B This is a schematic diagram of a fiber optic channel communication system according to yet another embodiment of this disclosure;

[0051] Figure 1C This is a schematic diagram of a fiber optic channel communication system according to yet another embodiment of this disclosure;

[0052] Figure 2 This is a schematic diagram of the port state machine of the FC node in related technologies;

[0053] Figure 3 This is a schematic diagram of port state transition of an FC node according to an embodiment of the present disclosure;

[0054] Figure 4 This is a flowchart of an embodiment of the FC-2 layer communication link negotiation method disclosed herein;

[0055] Figure 5 This is a schematic diagram of port state transition of an FC node according to an embodiment of the present disclosure;

[0056] Figure 6 This is a schematic diagram of port state transition of an FC node according to another embodiment of this disclosure;

[0057] Figure 7 This is a schematic diagram of an FC node according to an embodiment of the present disclosure. Detailed Implementation

[0058] This disclosure describes several embodiments, but these descriptions are exemplary and not limiting, and it will be apparent to those skilled in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with, or may replace, any feature or element of any other embodiment.

[0059] This disclosure includes and contemplates combinations of features and elements known to those skilled in the art. The embodiments, features, and elements disclosed in this disclosure may also be combined with any conventional features or elements to form a unique inventive scheme as defined by the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive schemes to form another unique inventive scheme as defined by the claims. Therefore, it should be understood that any feature shown and / or discussed in this disclosure may be implemented individually or in any suitable combination. Therefore, the embodiments are not limited except by the limitations imposed by the appended claims and their equivalents. Furthermore, various modifications and changes may be made within the scope of the appended claims.

[0060] Furthermore, in describing representative embodiments, the specification may have presented methods and / or processes as a specific sequence of steps. However, the method or process should not be limited to the specific order of steps described herein, to the extent that the method or process does not depend on the specific order of steps described herein. As will be understood by those skilled in the art, other sequences of steps are also possible. Therefore, the specific order of steps set forth in the specification should not be construed as a limitation of the claims. Moreover, the claims relating to the method and / or process should not be limited to the steps performed in the order written, and those skilled in the art will readily understand that these orders can be varied and still remain within the spirit and scope of the embodiments disclosed herein.

[0061] In Fibre Channel communication networks, a Fibre Channel communication system can consist of at least two Fibre Channel nodes. The basic topologies are point-to-point, arbitrated ring, and switched, as shown below. Figure 1A , 1B As shown in Figure 1C.

[0062] A Fibre Channel node can include one or more ports. Each port contains FC-0, FC-1, and FC-2 layer functionalities. FC-2 is the core layer of the FC protocol, defining its basic functions, primarily including: ordered sets, primitive signals and sequences, port state machines, primitive sequence protocols, frame classification and acknowledgment, sequence and switching management, node registration and deregistration, flow control, fragmentation and reassembly, and error handling. Among these functions, the node port state machine is the most fundamental function of FC-2, responsible for primitive sequence protocols and link state detection and control, forming the basis for the implementation of other functions.

[0063] The FC-2 layer protocol specifies that FC node ports must perform corresponding actions and complete corresponding functions when receiving different primitive signals, primitive sequences, and detecting events. Corresponding to different stages of event processing, the FC-2 protocol describes the FC node ports in the form of a finite state machine (FSM). Combining input stimuli and output responses, a complete state machine model is constructed for the FC port, such as... Figure 2 As shown.

[0064] A state machine consists of several parts, including input stimuli (transition conditions), the current state, and the transition path (next state). The stimuli and states in an FC port state machine are explained below:

[0065] 1) Input stimuli: The input stimuli specified in FC-2 include Link Reset (LR), Link Reset Response (LRR), Offline Primitive Sequence (OLS), Inoperable Primitive Sequence (NOS), Idle (IDLE), Signal Loss, Synchronization Loss Period Greater Than Transceiver Timeout Value (R_T_TOV), Transceiver Timeout (R_T_TOV), Error Detection Timeout (E_D_TOV), etc.

[0066] 2) States (Current State and Next State): FC-2 defines a total of 9 states across four main categories: Active State (AC), LR Transmit State (LR1), LR Receive State (LR2), LRR Receive State (LR3), NOS Receive State (LF1), NOS Transmit State (LF2), OLS Transmit State (OL1), OLS Receive State (OL2), and OLS Waiting State (OL3). These are explained below:

[0067] a. AC State: Active state. In AC state, the FC port sends the IDLE primitive signal. The FC port enters the AC state after completing the link initialization protocol or link reset protocol. In AC state, the FC port can send and receive frames and primitive signals. If a frame or primitive signal is received and identified, the FC port will remain in AC state.

[0068] b. LR1 State: LR Transmit State. An FC port enters the LR1 state to execute the link reset protocol. While in the LR1 state, the FC port will transmit an LR primitive sequence and perform state transitions according to the received primitive sequence.

[0069] c. LR2 State: LR Receive State. All FC ports not in OL3 or LF2 states enter the LR2 state upon receiving an LR primitive sequence protocol. In the LR2 state, the port sends an LRR primitive sequence and, according to the rules, performs a state transition upon receiving the primitive sequence.

[0070] d. LR3 State: LRR Receive State. FC ports in AC, LR1, LR2, and OL2 states enter LR3 state upon receiving and recognizing an LRR primitive sequence. FC ports in LR3 state transmit the IDLE primitive signal and perform state transitions according to the received primitive sequence.

[0071] e. LF1 State: NOS Receive State. The FC port enters the LF1 state after receiving the NOS primitive sequence and then sends the OLS primitive sequence. Before entering the LF1 state, the FC port updates the error counter in the link error status block. Each link failure event is recorded as an error.

[0072] f. LF2 State: NOS Transmitting State. The FC port enters the LF2 state when it detects a link failure condition. Similarly, the FC port updates the error counter in the link error status block before entering the LF2 state, and each link failure event is recorded as an error. If the condition causing the link failure persists, the FC port will remain in the LF2 state.

[0073] g. OL1 State: OLS Transmission State. An FC port entering the OL1 state will continuously transmit OLS primitive sequences for at least 5ms. After this period, the FC port will perform state transitions as required based on the received primitive sequences. When an FC port attempts to go online, if it does not receive a primitive sequence or detects any event that could cause the FC port to leave the OL1 state, the FC port will automatically transition to the OL3 state after the R_T_TOV timeout period. When the port executes the online-to-offline protocol, it remains in the OL1 state for an extended period, ignoring all events until it decides to leave the OL1 state. The FC port enters the OL1 state for the following purposes: firstly, to execute the link initialization protocol to leave the offline state; and secondly, to execute the transition from the online state to the offline state using the online-to-offline protocol.

[0074] h. OL2 State: OLS Receive State. An FC port enters the OL2 state after receiving and recognizing an OLS primitive sequence. In the OL2 state, Loss-of-Signal or Loss-of-Synchronization events are not recorded as errors in the link state error block.

[0075] i. OL3 State. Waiting for OLS State. The FC port enters the OL3 state after detecting a loss-of-signal or loss-of-Synchronization greater than R_T_TOV when it is in the OLS transmit or OLS receive state for an appropriate period of time during the link initialization protocol execution.

[0076] Before transmitting data, the two parties communicating in a Fibre Channel network need to negotiate the communication link based on the FC-2 layer until both ports are in the active state (AC) and continuously transmit idle primitive signals (IDLE) to keep the communication link synchronized.

[0077] During the communication link negotiation process, the two communicating parties first achieve bit synchronization and word synchronization. Bit synchronization refers to the process of completing bit alignment through clock recovery, while word synchronization refers to the process of achieving word alignment of received data through K-code detection.

[0078] After completing bit and word synchronization at FC-2 layer, the link negotiation phase between the sender and receiver begins. The port state transitions of the FC node are as follows: Figure 3 As shown, the entire link negotiation process begins with NOS and ends with both parties exchanging IDLEs.

[0079] However, when communication synchronization is lost, if the receiver does not re-synchronize bits and words, the two parties will enter a dead loop where they cannot communicate, thus making the communication unreliable.

[0080] To address the unreliability issues inherent in traditional FC communication, this disclosure proposes an FC-2 layer communication link negotiation method applied to a Fibre Channel communication system, which includes a sender and a receiver. The method is as follows: Figure 4 As shown, it includes:

[0081] Step S101: Determine whether the sender has lost synchronization based on the FC-2 layer;

[0082] Step S102: If the sender loses synchronization, determine whether the receiver has re-completed bit synchronization and word synchronization.

[0083] Step S103: If the receiver has not completed bit synchronization and word synchronization, re-synchronize the bit and word on the sender or receiver.

[0084] In an exemplary embodiment of this disclosure, before step S101, which determines whether the sender has lost synchronization based on the FC-2 layer, the method further includes:

[0085] Perform bit synchronization and word synchronization on the sender.

[0086] In an exemplary embodiment of this disclosure, step S101, which determines whether the sender has lost synchronization based on the FC-2 layer, includes:

[0087] The sender sends an inoperable primitive sequence NOS, and the current state of the sender's port is NOS sending state LF2;

[0088] If the sender receives an offline primitive sequence, fails to recognize the offline primitive sequence OLS, and the current state of the sender's port is NOS transmission state LF2, then it is determined that the sender has lost synchronization.

[0089] In an exemplary embodiment of this disclosure, step S102, determining whether the receiver has re-completed bit synchronization and word synchronization, includes:

[0090] The sender compares the first dwell time T1 with the preset time T0. If the first dwell time T1 is greater than or equal to the preset time T0, it determines that the receiver has not re-completed bit synchronization and word synchronization. The first dwell time T1 is the duration for which the sender's port state remains in the NOS transmission state LF2.

[0091] In an exemplary embodiment of this disclosure, step S103, after resynchronizing the bit and word of the sender, further includes:

[0092] The sender transmits the inoperable primitive sequence NOS, and the current state of the sender's port is NOS transmission state LF2; the sender receives the offline primitive sequence OLS, and the current state of the sender's port is OLS reception state OL2; the sender transmits Link Reset LR and receives Link Reset Acknowledgment LRR, and the current state of the sender's port is LRR reception state LR3; the sender transmits Idle IDLE and receives Idle IDLE, and the current state of the sender's port is active state AC; the sender transmits Idle IDLE.

[0093] In an exemplary embodiment of this disclosure, the port negotiation state transition of the FC node is as follows: Figure 5As shown. After the FC nodes of both parties in FC communication are powered on, they continuously send NOS signals to each other. The bit stream of NOS is converted into a continuous "on" and "off" signal transmitted through the optical fiber to drive the FC node to adjust its clock according to the frequency and phase of the signal to achieve bit synchronization. The received bit stream is serialized and parallelized into characters in groups of 10 bits. The FC node continuously searches for the K28.5 character in these characters. When the character is detected, its first bit is marked as the boundary of a byte and a word. Every 10th bit after the character marks the beginning of a coded byte, and every 40th bit marks the beginning of a coded word, thus completing word synchronization.

[0094] After bit synchronization and word synchronization are completed, the party that first identifies the NOS in FC communication becomes the receiver. The sender sends the NOS, and the current state of the sender's port is LF2; if the sender receives the OLS but fails to identify it, and the current state of the sender's port remains LF2, then it is determined that the sender has lost synchronization.

[0095] The sender continues to send NOS and receive OLS, and the current state of the sender's port remains LF2.

[0096] The duration for which the sender's port remains in LF2 is recorded as the first dwell time T1. The first dwell time T1 is compared with the preset duration T0. The preset duration T0 can be set according to the FC node startup time. For example, if the FC node startup time is 2 seconds, the preset duration T0 can be set to 4 seconds to ensure that link negotiation occurs after the FC node starts up.

[0097] When the first dwell time T1 is greater than or equal to the preset dwell time T0, it indicates that the receiver re-synchronizes bits and words during this process, but fails to complete bit and word synchronization, thus causing the sender's current state to remain at LF2.

[0098] If the sender continues to wait for the receiver to complete bit and word synchronization, it will cause the two communicating parties to fall into a dead loop of link failure. In this case, the sender should proactively re-complete bit and word synchronization.

[0099] After completing bit and word synchronization, both parties continue the link negotiation process until they successfully complete the FC-2 layer link handshake negotiation. Specifically: The sender sends NOS, and the current state of the sender's port is LF2; the sender receives OLS, and the current state of the sender's port is OL2; the sender sends LR, receives LRR, and the current state of the sender's port is LR3; the sender sends IDLE, receives IDLE, and the current state of the sender's port is AC; the sender sends IDLE again.

[0100] In this embodiment of the disclosure, during the link negotiation process between the two parties in FC communication, a judgment mechanism is added to the sender. If it is determined that the receiver has failed to complete bit synchronization and word synchronization, the sender will actively perform bit synchronization and word synchronization, prompting both parties to complete the link negotiation process. This avoids the two parties getting stuck in a dead loop of link failure, making the FC node as the sender more adaptable and the communication more reliable.

[0101] In an exemplary embodiment of this disclosure, before step S101, which determines whether the sender has lost synchronization based on the FC-2 layer, the method further includes:

[0102] Bit synchronization and word synchronization are performed on the receiver.

[0103] In an exemplary embodiment of this disclosure, step S101, which determines whether the sender has lost synchronization based on the FC-2 layer, includes:

[0104] The receiver receives the inoperable primitive sequence NOS, and the current state of the receiver's port is NOS reception state LF1; the receiver sends the offline primitive sequence OLS, the receiver receives the inoperable primitive sequence NOS, the sender fails to recognize the offline primitive sequence OLS, and the current state of the receiver's port is NOS reception state LF1, then it is determined that the sender has lost synchronization.

[0105] In an exemplary embodiment of this disclosure, step S102, determining whether the receiver has re-completed bit synchronization and word synchronization, includes:

[0106] The receiver compares the second dwell time T2 with the preset time T0. If the second dwell time T2 is greater than or equal to the preset time T0, it is determined that the receiver has not re-completed bit synchronization and word synchronization. The second dwell time T2 is the duration for which the receiver's port state remains in the NOS receiving state LF1.

[0107] In an exemplary embodiment of this disclosure, step S103, after resynchronizing the bit and word of the receiver, further includes:

[0108] The receiver receives the inoperable primitive sequence NOS, and the current state of the receiver's port is NOS receiving state LF1; the receiver sends the offline primitive sequence OLS, receives the link reset LR, and the current state of the receiver's port is LR receiving state LR2; the receiver sends the link reset acknowledgment LRR, receives the idle IDLE, and the current state of the receiver's port is active state AC; the receiver sends the idle IDLE, receives the idle IDLE, and the current state of the receiver's port is active state AC.

[0109] In an exemplary embodiment of this disclosure, the port negotiation state transition of the FC node is as follows: Figure 6 As shown.

[0110] In FC communication, the receiver converts the NOS bit stream into a continuous "on" and "off" signal transmitted via optical fiber to drive the FC node to adjust its clock according to the frequency and phase of the signal to achieve bit synchronization. The received bit stream is serialized and parallelized into characters in groups of 10 bits. The FC node continuously searches for the K28.5 character among these characters. When the character is detected, its first bit is marked as the boundary of a byte and a word. Every 10th bit after the character marks the beginning of a coded byte, and every 40th bit marks the beginning of a coded word, thus completing word synchronization.

[0111] If the receiver receives a NOS, the current state of the receiver port is LF1; if the receiver sends an OLS and receives a NOS, it means that the sender failed to recognize the OLS, and the current state of the receiver port remains LF1, then it is determined that the sender has lost synchronization.

[0112] The receiver continues to send OLS and receive NOS, and the current state of the receiver port remains LF1.

[0113] The duration for which the receiver port remains in LF1 is recorded as the second dwell time T2. The second dwell time T2 is compared with the preset time T0. The preset time T0 can be set according to the FC node startup time. For example, if the FC node startup time is 2 seconds, the preset time T0 can be set to 4 seconds to ensure that link negotiation occurs after the FC node starts up.

[0114] If the second dwell time T2 is greater than or equal to the preset duration T0, it indicates that the receiver attempted to resynchronize bits and words during this process, but failed to complete the synchronization. This causes the receiver's current state to remain at LF1, resulting in a dead loop where the communication between the two parties fails to establish a link connection. In this case, the receiver is responsible for resynchronizing bits and words.

[0115] After completing bit and word synchronization, both parties continue the link negotiation process until they successfully complete the FC-2 layer link handshake negotiation. Specifically: The receiver receives NOS, and the current state of the receiver port is LF1; the receiver sends OLS, receives LR, and the current state of the receiver port is LR2; the receiver sends LRR, receives IDLE, and the current state of the receiver port is AC; the receiver sends IDLE, receives IDLE, and the current state of the receiver port is AC.

[0116] In this embodiment of the disclosure, a judgment mechanism is added to the receiving side during the link negotiation process between the two parties in FC communication. If it is determined that the receiving side has failed to complete bit synchronization and word synchronization, the receiving side will force a re-synchronization of bits and words, prompting both parties to complete the link negotiation process. This avoids the two parties getting stuck in a dead loop of link failure, making the FC node as the receiving side more adaptable and the communication more reliable.

[0117] This disclosure also proposes an embodiment of a Fibre Channel node, which acts as a transmitter in a Fibre Channel communication system, the node being as follows: Figure 7 As shown, it includes:

[0118] The first judgment module is set to determine whether the node it is in has lost synchronization based on the FC-2 layer.

[0119] The second judgment module is set to determine whether the receiver has re-completed bit synchronization and word synchronization if the node where it is located loses synchronization.

[0120] The first forced synchronization module is configured to re-synchronize the bit and word of its own node if the receiver fails to complete bit and word synchronization.

[0121] And / or,

[0122] The Fibre Channel node serves as the receiver in the Fibre Channel communication system, and the node includes:

[0123] The third judgment module is set to determine whether the sender has lost synchronization based on the FC-2 layer.

[0124] The fourth judgment module is configured to determine whether its own node has re-completed bit synchronization and word synchronization if the sender loses synchronization.

[0125] The second forced synchronization module is configured to resynchronize the bit and word of its own node if the node itself has not completed bit and word synchronization.

[0126] The hardware circuitry that can be used in a Fibre Channel node according to an embodiment of this disclosure includes, but is not limited to, FPGA chips or SOC chips.

[0127] In an exemplary embodiment of this disclosure, the first determination module is specifically configured as follows:

[0128] The sender sends an inoperable primitive sequence NOS, and the current state of the sender's port is NOS sending state LF2;

[0129] If the sender receives an offline primitive sequence, fails to recognize the offline primitive sequence OLS, and the current state of the sender's port is NOS transmission state LF2, then it is determined that the sender has lost synchronization.

[0130] In an exemplary embodiment of this disclosure, the second determination module is specifically configured as follows:

[0131] The sender compares the first dwell time T1 with the preset time T0. If the first dwell time T1 is greater than or equal to the preset time T0, it determines that the receiver has not re-completed bit synchronization and word synchronization. The first dwell time T1 is the duration for which the sender's port state remains in the NOS transmission state LF2.

[0132] In an exemplary embodiment of this disclosure, the third determination module is specifically configured as follows:

[0133] The receiver receives the inoperable primitive sequence NOS, and the current state of the receiver's port is NOS reception state LF1; the receiver sends the offline primitive sequence OLS, the receiver receives the inoperable primitive sequence NOS, the sender fails to recognize the offline primitive sequence OLS, and the current state of the receiver's port is NOS reception state LF1, then it is determined that the sender has lost synchronization.

[0134] In an exemplary embodiment of this disclosure, the fourth determination module is specifically configured as follows:

[0135] The receiver compares the second dwell time T2 with the preset time T0. If the second dwell time T2 is greater than or equal to the preset time T0, it is determined that the receiver has not re-completed bit synchronization and word synchronization. The second dwell time T2 is the duration for which the receiver's port state remains in the NOS receiving state LF1.

[0136] In this embodiment of the FC node, a judgment mechanism is added to the sender or receiver. If it is determined that the receiver has failed to complete bit synchronization and word synchronization, the sender or receiver's own node forces bit synchronization and word synchronization, prompting both parties to complete the link negotiation process. This avoids the two parties getting stuck in a dead loop of link failure, making the FC node more adaptable and the communication more reliable.

[0137] One embodiment of this disclosure also proposes a fiber optic channel communication system, such as Figure 1A As shown in 1B or 1C, it includes:

[0138] At least two Fibre Channel nodes are used as either the sender or receiver in the Fibre Channel communication system.

[0139] In this configuration, at least one Fibre Channel node is configured to: determine whether the sender has lost synchronization based on the FC-2 layer; if the sender has lost synchronization, determine whether the receiver has re-completed bit synchronization and word synchronization; if the receiver has not completed bit synchronization and word synchronization, re-perform bit synchronization and word synchronization for either the sender or the receiver.

[0140] The FC communication system of this disclosure includes an FC node with an added judgment mechanism. During the link negotiation process between the two parties in FC communication, this FC node with the added judgment mechanism, whether acting as a sender or a receiver, can ensure that both parties complete the link negotiation process. This avoids the two parties getting stuck in a dead loop of link connection failure, making the FC communication system more adaptable and the communication more reliable.

[0141] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

Claims

1. An FC-2 layer communication link negotiation method, applied to a fiber channel communication system, the communication system including a sender and a receiver, the method comprising: Based on the FC-2 layer, it is determined whether the sender has lost synchronization; In the event that the sender loses synchronization, the sender or the receiver determines whether the receiver should re-complete bit synchronization and word synchronization; If the sender determines that the receiver has not completed bit synchronization and word synchronization, it shall actively perform bit synchronization and word synchronization; or if the receiver determines that the receiver has not completed bit synchronization and word synchronization, it shall re-perform bit synchronization and word synchronization. The process by which the sender determines whether the receiver has re-completed bit synchronization and word synchronization includes: the sender comparing a first dwell time T1 with a preset time T0; if the first dwell time T1 is greater than or equal to the preset time T0, the sender determines that the receiver has not re-completed bit synchronization and word synchronization; wherein, the first dwell time T1 is the duration during which the sender's port state remains in the inoperable primitive sequence NOS transmission state LF2; The receiver determines whether it has re-completed bit synchronization and word synchronization by comparing the second dwell time T2 with the preset time T0. If the second dwell time T2 is greater than or equal to the preset time T0, it is determined that the receiver has not re-completed bit synchronization and word synchronization. The second dwell time T2 is the duration during which the receiver's port state remains in the inoperable primitive sequence NOS receive state LF1.

2. The FC-2 layer communication link negotiation method according to claim 1, before determining whether the sender has lost synchronization based on the FC-2 layer, further comprising: Bit synchronization and word synchronization are performed on the sender.

3. The FC-2 layer communication link negotiation method according to claim 2, wherein, The method for determining whether the sender has lost synchronization based on the FC-2 layer includes: The sender sends an inoperable primitive sequence NOS, and the current state of the sender's port is NOS sending state LF2; If the sender receives an offline primitive sequence (OLS), and the sender fails to recognize the offline primitive sequence (OLS), and the current state of the sender's port is the NOS transmission state LF2, then it is determined that the sender has lost synchronization.

4. The FC-2 layer communication link negotiation method according to claim 1, further comprising, after the sender actively performs bit synchronization and word synchronization when it determines that the receiver has not completed bit synchronization and word synchronization, the method further includes: The sender sends an inoperable primitive sequence NOS, and the current state of the sender's port is NOS sending state LF2; The sender receives the offline primitive sequence OLS, and the current state of the sender's port is OLS receiving state OL2; The sender transmits a link reset LR and receives a link reset response LRR. The current state of the sender's port is LRR receive state LR3. The sender sends an idle IDLE and receives an idle IDLE; the current state of the sender's port is active state AC. The sender sends an idle IDLE.

5. The FC-2 layer communication link negotiation method according to claim 1, further comprising, before determining whether the sender has lost synchronization based on the FC-2 layer: Bit synchronization and word synchronization are performed on the receiver.

6. The FC-2 layer communication link negotiation method according to claim 5, wherein, The method for determining whether the sender has lost synchronization based on the FC-2 layer includes: The receiver receives an inoperable primitive sequence (NOS), and the current state of the receiver's port is NOS reception state LF1; the receiver sends an offline primitive sequence (OLS), the receiver receives an inoperable primitive sequence (NOS), the sender fails to recognize the offline primitive sequence (OLS), and the current state of the receiver's port is NOS reception state LF1, then it is determined that the sender has lost synchronization.

7. The FC-2 layer communication link negotiation method according to claim 1, further comprising, after the receiver re-synchronizes bit and word synchronization when it determines that the receiver has not completed bit synchronization and word synchronization, the method further comprises: The receiver receives the inoperable primitive sequence NOS, and the current state of the receiver's port is NOS reception state LF1. The receiver sends the offline primitive sequence OLS, the receive link is reset LR, and the current state of the receiver's port is LR receive state LR2. The receiver sends a Link Reset Response (LRR) and receives an Idle Response (IDLE). The current state of the receiver's port is active (AC). The receiver sends an idle IDLE and receives an idle IDLE. The current state of the receiver's port is active state AC.

8. A Fibre Channel node, the Fibre Channel node serving as the transmitter in a Fibre Channel communication system, the node comprising: The first judgment module is set to determine whether the node it is on has lost synchronization based on the FC-2 layer. The second judgment module is set to determine whether the receiver has re-completed bit synchronization and word synchronization if the node where it is located loses synchronization. The first forced synchronization module is configured to actively perform bit and word synchronization on its own node if the receiver fails to complete bit and word synchronization. The second judgment module is specifically configured to: compare the first dwell time T1 with the preset time T0; when the first dwell time T1 is greater than or equal to the preset time T0, determine that the receiver has not re-completed bit synchronization and word synchronization; wherein, the first dwell time T1 is the duration for which the sender's port state remains in the inoperable primitive sequence NOS transmission state LF2. And / or, The Fibre Channel node serves as the receiver in the Fibre Channel communication system, and the node includes: The third judgment module is set to determine whether the sender has lost synchronization based on the FC-2 layer. The fourth judgment module is configured to determine whether its own node has re-completed bit synchronization and word synchronization if the sender loses synchronization. The second forced synchronization module is configured to re-synchronize the bit and word of its own node if the node itself has not completed bit and word synchronization. The fourth judgment module is specifically configured to: compare the second dwell time T2 with the preset time T0, and if the second dwell time T2 is greater than or equal to the preset time T0, determine that the receiver has not re-completed bit synchronization and word synchronization; wherein, the second dwell time T2 is the duration for which the receiver's port state remains in the inoperable primitive sequence NOS receive state LF1.

9. The fiber channel node according to claim 8, wherein, The first judgment module is specifically configured as follows: The sender sends an inoperable primitive sequence (NOS), and the current state of the sender's port is NOS sending state LF2; the sender receives an offline primitive sequence (OLS), and if the sender fails to recognize the offline primitive sequence (OLS) and the current state of the sender's port is NOS sending state LF2, then it is determined that the sender has lost synchronization.

10. The Fibre Channel node according to claim 8, wherein, The third judgment module is specifically configured as follows: The receiver receives an inoperable primitive sequence (NOS), and the current state of the receiver's port is NOS reception state LF1; the receiver sends an offline primitive sequence (OLS), the receiver receives an inoperable primitive sequence (NOS), the sender fails to recognize the offline primitive sequence (OLS), and the current state of the receiver's port is NOS reception state LF1, then it is determined that the sender has lost synchronization.

11. A fiber optic channel communication system, comprising: At least two Fibre Channel nodes are used as either the sender or receiver in the Fibre Channel communication system. In this configuration, at least one Fibre Channel node is configured to: determine whether the sender has lost synchronization based on the FC-2 layer; if the sender has lost synchronization, determine whether the receiver has re-completed bit and word synchronization; if this Fibre Channel node is the sender and it is determined that the receiver has not completed bit and word synchronization, actively perform bit and word synchronization, or if this Fibre Channel node is the receiver and it is determined that the receiver has not completed bit and word synchronization, re-perform bit and word synchronization. The fiber channel node determines whether the receiver has re-completed bit synchronization and word synchronization, including: When the Fibre Channel node acts as the sender, a first dwell time T1 is compared with a preset time T0. If the first dwell time T1 is greater than or equal to the preset time T0, it is determined that the receiver has not re-completed bit synchronization and word synchronization. Here, the first dwell time T1 is the duration for which the sender's port state remains in the inoperable primitive sequence NOS transmission state LF2; or When the fiber channel node acts as the receiver, the second dwell time T2 is compared with the preset time T0. If the second dwell time T2 is greater than or equal to the preset time T0, it is determined that the receiver has not re-completed bit synchronization and word synchronization. The second dwell time T2 is the duration for which the receiver's port state remains in the inoperable primitive sequence NOS receive state LF1.

Citation Information

Patent Citations

  • Method for realizing fiber channel link recovery protocol and link recovery module

    CN106385281A

  • Rate adaptive algorithm of optical fiber channel protocol

    CN111669672A