Automatic testing method for identifying and handling correctness of fiber channel timeout faults

By designing automatic testing methods in fiber channel communication, establishing link timeout and fault timeout scenarios, and automatically testing the correctness of the protocol, the problem of incorrect identification and processing of fiber channel timeout faults is solved, and the accurate identification and correct processing of links is achieved, and communication stability is improved.

CN115833932BActive Publication Date: 2025-05-16XIAN AVIATION COMPUTING TECH RES INST OF AVIATION IND CORP OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211384358.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-07
Publication Date
2025-05-16
Estimated Expiration
2042-11-07

AI Technical Summary

Technical Problem

In Fibre Channel communication, when a link timeout or a link failure is detected, if the identification and processing are incorrect, the link may not be restored to a valid state, affecting the communication stability.

Method used

Design an automatic testing method to automatically test the correctness of the Fibre Channel link reset protocol and link failure protocol by establishing link timeout and link failure timeout scenarios between the test port and the port under test. This method includes steps such as initialization, enable testing and protocol testing to ensure the accuracy of the test results.

Benefits of technology

Through automated detection and testing, we ensure the correctness of identification and handling of fiber channel timeout failures, avoid the problem of link failure and improve communication stability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115833932B_ABST
    Figure CN115833932B_ABST
Patent Text Reader

Abstract

The present invention provides an automatic testing method for the correctness of fiber channel timeout fault identification and processing. By defining a fiber channel FC port timeout fault testing mechanism, an independent link timeout fault detection state machine is designed according to the primitive sequence execution under the link timeout (E_D_TOV timeout) and link timeout fault timeout (R_T_TOV timeout) states. The corresponding control logic automatically tests the FC port link timeout fault identification and processing under the control of the state machine to ensure that it can recover normally when it identifies the link timeout fault. The method of the present invention can automatically detect the correctness of fiber channel timeout fault identification and processing, which is the core function of fiber channel port fault testing. The state machine control is clear and the standard logic design can be applied to various fiber channel test equipment to meet the automatic testing requirements for the execution of various types of FC port link timeout faults.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of computer communications, and in particular to an automatic testing method for optical fiber channel timeout fault identification and processing correctness. Background Art

[0002] As the backbone network of the new generation of aircraft, Fiber Channel provides high-speed interconnection communication support for various onboard subsystems. When the link timeout signal (i.e., E_D_TOV timeout signal) of the Fiber Channel communication port of the device under test is detected, the link reset protocol needs to be executed; when the link fault timeout signal (i.e., R_T_TOV timeout signal) of the Fiber Channel communication port is detected, the link fault protocol needs to be executed. At this time, if the detection equipment does not correctly identify and handle the link timeout related faults of the communication port in the Fiber Channel, it will cause the link to be unable to recover to a valid state. Summary of the invention

[0003] In order to ensure that when a fiber channel communication port detects a link timeout, link fault timeout or other related faults, they can be accurately identified and properly handled, and to ensure that the fiber channel is restored normally and in a timely manner, the present invention designs an automatic testing method for the correctness of fiber channel timeout fault identification and handling.

[0004] The technical solution for achieving the purpose of the invention is as follows: an automatic testing method for the correctness of fiber channel timeout fault identification and processing, connecting a test port PORT_TEST to a tested port N / F_Port, allowing the test port PORT_TEST to interact and control data frames and primitives with the tested port N / F_Port, and using a link timeout scenario established between the test port PORT_TEST and the tested port N / F_Port to automatically test the correctness of the execution of the fiber channel link reset protocol; and / or using a link failure timeout scenario established between the test port PORT_TEST and the tested port N / F_Port to automatically test the correctness of the execution of the fiber channel link failure protocol.

[0005] In a first embodiment, a method for automatically testing the correctness of the execution of a Fibre Channel link reset protocol using an established link timeout scenario comprises the following steps:

[0006] S1, the test port PORT_TEST enters the initialization state when it is powered on or reset, and is initialized;

[0007] S2. After initialization is completed, the test selection state enters the test enable state, performs an enable test on the link timeout, and outputs the enable test result;

[0008] S21, when the link timeout enable test is normal, enter the corresponding link reset protocol test and output the link reset protocol test result;

[0009] S211, if the link reset protocol test is normal, the link timeout test completion flag is set to valid;

[0010] S212: If the link reset protocol test fails, a link timeout test error signal is output;

[0011] S22, if the link timeout enable test error occurs, a link timeout test error signal is output to the test selection state;

[0012] S3. Outputting the execution result of the Fibre Channel link reset protocol according to the link timeout test result.

[0013] Further, in step S2, the link timeout enabling test method is: controlling the tested port N / F_Port to send N Class 3 data frames to the test port PORT_TEST according to the maximum credit value N, and after PORT_TEST receives the N Class 3 data frames, it does not return the R_RDY primitive within the E_D_TOV (i.e., error detection timeout value) time;

[0014] If the tested port N / F_Port detects a link timeout error and sends the LR primitive (i.e., link reset primitive sequence), the link timeout is enabled correctly; otherwise, the link timeout is enabled incorrectly, the test enable state is returned, and a link timeout test error signal is reported to the test selection state.

[0015] Further, in step S21, The link reset protocol test method is:

[0016] The tested port N / F_Port sends the LR primitive and controls the test port PORT_TEST to send the LRR primitive (i.e., the link reset response primitive sequence). If the N / F_Port port sends the IDLE primitive (i.e., the link valid primitive), the link timeout test normal signal is reported, the link timeout test completion flag is set to valid, and the PORT_TEST port returns to the test selection state; otherwise, the link reset protocol test abnormal signal is reported, the link timeout test completion flag is set to valid, and the PORT_TEST port returns to the test enable state.

[0017] In a second embodiment, a method for automatically testing the correctness of the execution of a Fibre Channel link failure protocol using an established link failure timeout scenario comprises the following steps:

[0018] Step 1: When the test port PORT_TEST is powered on or reset, it enters the initialization state and is initialized;

[0019] Step 2: After the initialization is completed, enter the link fault timeout test selection state, perform an enable test and a link fault protocol test on the link fault timeout, and output the link fault timeout test result;

[0020] Step 3: Output the Fibre Channel link failure protocol execution result according to the link failure timeout test result.

[0021] Further, in step 2, the link failure timeout includes five states: signal loss state, synchronization loss state, port in LR1 enabled state (i.e. LR sending state), port in LR2 enabled state (i.e. LR receiving state), and port in LR3 enabled state (i.e. LRR receiving state);

[0022] The link fault timeout enable test and link fault protocol test include:

[0023] Step 21, enter the enable state corresponding to each state in the five states, and perform enable tests on the five states respectively;

[0024] Step 211: If the enabling tests of the port in the LR1 enabling state, the port in the LR2 enabling state, and the port in the LR3 enabling state are all normal, a link fault timeout enabling correct signal is output, and the link fault protocol test state in the link fault timeout state in each state is entered to perform a link fault protocol test;

[0025] Step 2111: If the link fault protocol test is normal, output a link fault protocol execution correct signal;

[0026] Step 2112: If the link failure protocol test fails, a link failure protocol execution error signal is output;

[0027] Step 212: If an enable test error occurs in one of the following: the port is in the LR1 enable state, the port is in the LR2 enable state, and the port is in the LR3 enable state, a link failure timeout enable error signal of the corresponding state is output;

[0028] Step 22: If there is an error in the enable test under the five states, a link fault timeout enable error signal is output.

[0029] Further, in step 211, under the link failure timeout state Link Fault Protocol Testing The method is:

[0030] The N / F_Port port keeps sending NOS primitives, and the PORT_TEST port of the test equipment sends OLS primitives. After the N / F_Port port returns the LR primitive, the PORT_TEST port sends the LRR primitive. If the N / F_Port port sends the IDLE primitive after receiving the LRR primitive, the PORT_TEST port returns to the link fault timeout test selection state, and reports the link fault protocol execution correct signal in the link fault timeout state; otherwise, the PORT_TEST port returns to the return test enable state, reports the link fault protocol execution error correct signal in the link fault timeout state, and sets the link fault timeout test completion flag to valid.

[0031] In a third embodiment, a method for automatically testing the correctness of the execution of a Fibre Channel link reset protocol using an established link timeout scenario and automatically testing the correctness of the execution of a Fibre Channel link failure protocol using a link failure timeout scenario established between a test port PORT_TEST and a tested port N / F_Port comprises the following steps:

[0032] Step 1: Initialize the test port PORT_TEST when it is powered on or reset;

[0033] Step 2: After initialization is completed, the test port PORT_TEST enters the test selection state and tests the link timeout and link failure timeout respectively;

[0034] Step 21: Perform an enable test and a Fibre Channel link reset protocol test on a link timeout, and output a link timeout test result;

[0035] Step 22: Perform an enable test and a fiber channel link fault protocol test on the link fault timeout, and output the link fault timeout test result;

[0036] Step 3: Based on the link timeout test result and the link fault timeout test result, output the fiber channel timeout fault identification and processing correctness result.

[0037] In an improved embodiment, after completing the initialization and before entering the enable test, and when returning to the test enable state from any sub-state after the initialization state, the test port PORT_TEST and the port under test need to be restored. The implementation method for restoring the test port PORT_TEST and the port under test to the test enable state is: making the test port PORT_TEST and the port under test N / F_Port reach the Active state, restoring E_D_TOV (error detection timeout value) to the default value, and restoring R_T_TOV (receive transmission timeout value) to the default value.

[0038] Compared with the prior art, the beneficial effects of the present invention are as follows: the automatic testing method for optical fiber channel timeout fault identification and processing correctness designed by the present invention has the following advantages:

[0039] Automatically detect the correctness of fiber channel timeout fault identification and processing;

[0040] The core function of the Fibre Channel port fault test is applicable to the test of the execution of FC port link timeout faults of various types of equipment;

[0041] The state machine control is clear and easy to implement in hardware logic;

[0042] Standard logic design can be applied to various FC port test equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only for the purpose of more clearly illustrating the technical solutions of the embodiments of the present invention or the prior art. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0044] Figure 1 The figure is a schematic diagram of logic jumps during fault identification and processing when detecting link timeout and link fault timeout of a fiber channel in a specific implementation manner. DETAILED DESCRIPTION

[0045] The present invention will be further described below in conjunction with specific embodiments, and the advantages and features of the present invention will become clearer as the description proceeds. However, these embodiments are exemplary only and do not constitute any limitation to the scope of the present invention. It should be understood by those skilled in the art that the details and forms of the technical solution of the present invention may be modified or replaced without departing from the spirit and scope of the present invention, but these modifications and replacements all fall within the scope of protection of the present invention.

[0046] In the description of this embodiment, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the invention.

[0047] In addition, the terms "first", "second", "third", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more.

[0048] This specific implementation method designs an automatic testing method for the correctness of fiber channel timeout fault identification and processing, connects the test port PORT_TEST to the tested port N / F_Port, enables the test port PORT_TEST and the tested port N / F_Port to interact and control data frames and primitives, and adopts a link timeout scenario established between the test port PORT_TEST and the tested port N / F_Port to automatically test the correctness of the execution of the fiber channel link reset protocol; and / or adopts a link failure timeout scenario established between the test port PORT_TEST and the tested port N / F_Port to automatically test the correctness of the execution of the fiber channel link failure protocol.

[0049] In a first embodiment, a method for automatically testing the correctness of the execution of a Fibre Channel link reset protocol using an established link timeout scenario comprises the following steps:

[0050] S1. The test port PORT_TEST enters the initialization state when it is powered on or reset, and is initialized.

[0051] S2. After the initialization is completed, the test selection state enters the test enable state, the link timeout is enabled and the enable test result is output.

[0052] S21. When the link timeout enable test is normal, the corresponding link reset protocol test is entered and the link reset protocol test result is output.

[0053] S211. If the link reset protocol test is normal, the link timeout test completion flag is set to valid.

[0054] S212: If a link reset protocol test error occurs, a link timeout test error signal is output.

[0055] S22, if a link timeout enable test error occurs, a link timeout test error signal is output to the test selection state.

[0056] S3. Outputting the execution result of the Fibre Channel link reset protocol according to the link timeout test result.

[0057] Further, in step S2, the link timeout enabling test method is: controlling the tested port N / F_Port to send N Class 3 data frames to the test port PORT_TEST according to the maximum credit value N, and after PORT_TEST receives N Class 3 data frames, it does not return the R_RDY primitive within the E_D_TOV time.

[0058] If the tested port N / F_Port can detect the link timeout error and send the LR primitive, the link timeout is enabled correctly; otherwise, the link timeout is enabled incorrectly, the test enable state is returned, and a link timeout test error signal is reported to the test selection state.

[0059] Further, in step S21, The link reset protocol test method is:

[0060] The tested port N / F_Port sends the LR primitive, and controls the test port PORT_TEST to send the LRR primitive. If the N / F_Port sends the IDLE primitive, the link timeout test normal signal is reported, the link timeout test completion flag is set to valid, and the PORT_TEST port returns to the test selection state; otherwise, the link reset protocol test abnormal signal is reported, the link timeout test completion flag is set to valid, and the PORT_TEST port returns to the test enable state.

[0061] In a second embodiment, a method for automatically testing the correctness of the execution of a Fibre Channel link failure protocol using an established link failure timeout scenario comprises the following steps:

[0062] Step 1: When the test port PORT_TEST is powered on or reset, it enters the initialization state and is initialized.

[0063] Step 2: After the initialization is completed, enter the link fault timeout test selection state, perform an enable test and a link fault protocol test on the link fault timeout, and output the link fault timeout test result.

[0064] Step 3: Output the Fibre Channel link failure protocol execution result according to the link failure timeout test result.

[0065] Furthermore, in step 2, the link failure timeout includes five states: signal loss state, synchronization loss state, port in LR1 enabled state, port in LR2 enabled state, and port in LR3 enabled state.

[0066] The link fault timeout enable test and link fault protocol test include:

[0067] Step 21: Enter the enable state corresponding to each state in the five states, and perform enable tests on the five states respectively.

[0068] Step 211: If the enablement tests of the port being in the LR1 enablement state, the port being in the LR2 enablement state, and the port being in the LR3 enablement state are all normal, a link fault timeout enable correct signal is output and a link fault protocol test is performed.

[0069] Step 2111: If the link fault protocol test is normal, output a link fault protocol execution correct signal.

[0070] Step 2112: If the link failure protocol test fails, a link failure protocol execution error signal is output.

[0071] Step 212: If an enable test error occurs in one of the following: the port is in the LR1 enable state, the port is in the LR2 enable state, and the port is in the LR3 enable state, a link failure timeout enable error signal of the corresponding state is output.

[0072] Step 22: If there is an error in the enable test under the five states, a link fault timeout enable error signal is output.

[0073] Specifically, in step 21, The signal loss enable test method is: Control the PORT_TEST of the test equipment to stop sending signals, and the duration is longer than the R_T_TOV limit value. If the N / F_Port port can detect the link fault timeout error and send the NOS primitive, the signal loss link fault timeout enable correct signal is reported, and the PORT_TEST port enters the link fault protocol test state under the link fault timeout state; otherwise, the PORT_TEST port returns to its test enable state, reports the signal loss test error signal, and sets the signal loss test completion flag to valid.

[0074] The synchronization loss enable test method is: The PORT_TEST of the control test equipment changes the port rate and maintains this state for a duration greater than the R_T_TOV limit value. If the N / F_Port port can detect the link fault timeout error and send the NOS (i.e., non-operable primitive sequence) primitive, the PORT_TEST port enters the link fault protocol test state under the link fault timeout state and reports the synchronization loss link fault timeout enable correct signal; otherwise, the PORT_TEST port returns to its test enable state, reports the synchronization loss test error signal, and sets the synchronization loss test completion flag to valid.

[0075] The port is in LR1 enabled state. The test method is:: Control the N / F_Port port to send N Class 3 data frames to the PORT_TEST port of the test equipment according to the maximum credit value N. After receiving N Class 3 data frames, PORT_TEST does not return the R_RDY primitive within the E_D_TOV time. If it is detected that the N / F_Port port of the DUT can detect the link timeout error and send the LR primitive, the PORT_TEST port enters the port in LR1 test state and reports the port in LR1 enable correct signal; otherwise, the PORT_TEST port returns to its test enable state, reports the port in LR1 enable error signal, and sets the port in LR1 state test completion flag to valid.

[0076] The port is in LR2 enabled state. The test method is as follows: The N / F_Port port sends N Class 3 data frames to the PORT_TEST port of the test equipment according to the maximum credit value N. After receiving N Class 3 data frames, PORT_TEST does not return the R_RDY primitive within the E_D_TOV time. After receiving the LR primitive sent by N_Port, PORT_TEST sends the LR primitive. If the LRR primitive sent by N_Port is detected, the PORT_TEST port enters the port in LR2 test state and reports the port in LR2 enable correct signal; otherwise, the PORT_TEST port returns to its test enable state, reports the port in LR2 enable error signal, and sets the port in LR2 state test completion flag to valid.

[0077] The port is in LR3 enabled state. The test method is as follows: The N / F_Port port sends N Class 3 data frames to the PORT_TEST port of the test equipment according to the maximum credit value N. After receiving N Class 3 data frames, PORT_TEST does not return the R_RDY primitive within the E_D_TOV time. PORT_TEST sends the LRR primitive after receiving the LR primitive sent by N_Port. If the IDLE primitive sent by N_Port is detected, the PORT_TEST port enters the port in LR3 test state and reports the port in LR3 enable correct signal; otherwise, the PORT_TEST port returns to its test enable state, reports the port in LR3 enable error signal, and sets the port in LR3 state test completion flag to valid.

[0078] Specifically, in step 211, The link fault protocol test method for the port in LR1 is:Control the N / F_Port port to send the LR primitive, and control the duration of keeping this state to be greater than the R_T_TOV limit value. During this period, the test equipment PORT_TEST port does not send any primitive signal. If the N / F_Port port can detect the port in the LR1 state timeout error and send the NOS primitive, the PORT_TEST port enters the link fault protocol test state under the link fault timeout state, and reports the port in the LR1 state timeout enable correct signal; otherwise, the PORT_TEST port returns to its test enable state, reports the port in the LR1 state test error signal, and sets the port in the LR1 state test completion flag to valid.

[0079] The link fault protocol test method for the port in LR2 is: The N / F_Port port sends the LRR primitive and controls the state to be maintained for a duration greater than the R_T_TOV limit value. During this period, the test equipment PORT_TEST port does not send any primitive signal. If the N / F_Port port can detect the port is in the LR2 state timeout error and sends the NOS primitive, the PORT_TEST port enters the link fault protocol test state under the link fault timeout state, and reports the port is in the LR2 state timeout enable correct signal; otherwise, the PORT_TEST port returns to its test enable state, reports the port is in the LR2 state test error signal, and sets the port in the LR2 state test completion flag to valid.

[0080] The link fault protocol test method for the port in LR3 is: The N / F_Port port sends the IDLE primitive and controls the state to remain longer than the R_T_TOV limit value. During this period, the test equipment PORT_TEST port does not send any primitive signal. If the N / F_Port port can detect the port is in the LR3 state timeout error and sends the NOS primitive, the PORT_TEST port enters the link fault protocol test state under the link fault timeout state, and reports the port is in the LR3 state timeout enable correct signal; otherwise, the PORT_TEST port returns to its test enable state, reports the port is in the LR3 state test error signal, and sets the port in the LR3 state test completion flag to valid.

[0081] Furthermore, Step 211 Link failure timeout state The method of link fault protocol testing is:

[0082] The N / F_Port port keeps sending NOS primitives, and the PORT_TEST port of the test equipment sends OLS primitives. After the N / F_Port port returns the LR primitive, the PORT_TEST port sends the LRR primitive. If the N / F_Port port sends the IDLE primitive after receiving the LRR primitive, the PORT_TEST port returns to the link fault timeout test selection state, and reports the link fault protocol execution correct signal in the link fault timeout state; otherwise, the PORT_TEST port returns to the return test enable state, reports the link fault protocol execution error correct signal in the link fault timeout state, and sets the link fault timeout test completion flag to valid.

[0083] In a third embodiment, a method for automatically testing the correctness of the execution of a Fibre Channel link reset protocol using an established link timeout scenario and automatically testing the correctness of the execution of a Fibre Channel link failure protocol using a link failure timeout scenario established between a test port PORT_TEST and a tested port N / F_Port comprises the following steps:

[0084] Step 1: Initialize the test port PORT_TEST when it is powered on or reset;

[0085] Step 2: After initialization is completed, the test port PORT_TEST enters the test selection state and tests the link timeout and link failure timeout respectively;

[0086] Step 21: Perform an enable test and a Fibre Channel link reset protocol test on a link timeout, and output a link timeout test result;

[0087] Step 22: Perform an enable test and a fiber channel link fault protocol test on the link fault timeout, and output the link fault timeout test result;

[0088] Step 3: Based on the link timeout test result and the link fault timeout test result, output the fiber channel timeout fault identification and processing correctness result.

[0089] In this embodiment, the purpose of this embodiment is to simultaneously judge the timeout and fault timeout in the fiber channel timeout fault. The difference between this embodiment and the first embodiment and the second embodiment is that after the initialization is completed, the timeout and fault timeout are selected first, and then they are detected and judged one by one.

[0090] In this embodiment, the link timeout enabling test and the Fibre Channel link reset protocol test in step 21 are the same as those in the first embodiment; the link fault timeout enabling test and the Fibre Channel link fault protocol test in step 22 are the same as those in the second embodiment.

[0091] In the first to third embodiments described above, after completing the initialization and before entering the enable test, as well as when returning to the test enable state from any sub-state after the initialization state, the test port PORT_TEST and the port under test need to be restored. The implementation method for restoring the test port PORT_TEST and the port under test to the test enable state is: making the test port PORT_TEST and the port under test N / F_Port reach the Active state, restoring E_D_TOV (error detection timeout value) to the default value, and restoring R_T_TOV (receive transmission timeout value) to the default value.

[0092] See also Figure 1 As shown, the automatic test of the above-mentioned fiber channel timeout fault identification and processing correctness is described below through a specific example:

[0093] Perform "initialization": This state is entered when the power is turned on or reset. In this state, the FC test port PORT_TEST of the test equipment and the FC port N / F_Port of the DUT are operated synchronously. If the Active state is reached, the PORT_TEST port enters the "test enable state"; otherwise, it stays in the "initial state".

[0094] To enable the test: Reset the PORT_TEST port of the test equipment and the N / F_Port port of the DUT and reach the Active state, restore E_D_TOV (error detection timeout value) to the default value, restore R_T_TOV (receive transmission timeout value) to the default value, and the PORT_TEST port enters the "test selection state".

[0095] To do a "test selection": Determine the test completion flags corresponding to the link timeout (E_D_TOV timeout) and link fault timeout (R_T_TOV timeout) states, and carry out tests in the two states in turn; if the link timeout state test is not performed, the PORT_TEST port enters the "link timeout test state"; if the link fault timeout state test is not performed, the PORT_TEST port enters the "link fault timeout test selection state"; if both the link timeout and link fault timeout state tests are completed, the PORT_TEST port enters the "test completion state".

[0096] Enter "Link Timeout Test State":Control the N / F_Port port of DUT to send N Class 3 data frames to the PORT_TEST port of the test equipment according to the maximum credit value N. After receiving N Class 3 data frames, PORT_TEST does not return the R_RDY primitive within the E_D_TOV time. If it is detected that the N / F_Port port of DUT can detect the link timeout error and send the LR primitive, the PORT_TEST port enters the "link reset protocol test state" and reports that the link timeout is enabled correctly. Otherwise, the PORT_TEST port returns to the "test enable state", reports the link timeout test error, and sets the link timeout test completion flag to valid.

[0097] To perform a "Link Reset Protocol Test": The N / F_Port port of DUT sends the LR primitive, and controls the PORT_TEST port of the test equipment to send the LRR primitive. If the N / F_Port port of DUT sends the IDLE primitive, the PORT_TEST port returns to the "test selection state", reports that the link timeout test is normal, and sets the link timeout test completion flag to valid; otherwise, the PORT_TEST port returns to the "test enable state", reports that the link reset protocol test is abnormal, and sets the link timeout test completion flag to valid.

[0098] To select "Link Fault Timeout Test Selection": Determine the test completion flags corresponding to the signal loss, synchronization loss, port in LR1 state, port in LR2 state, and port in LR3 state tests, and carry out tests in the five states in turn. If the signal loss test is not performed, the PORT_TEST port enters the "signal loss test state"; if the synchronization loss test is not performed, the PORT_TEST port enters the "synchronization loss test state"; if the port in LR1 state test is not performed, the PORT_TEST port enters the "port in LR1 enabled state"; if the port in LR2 state test is not performed, the PORT_TEST port enters the "port in LR2 enabled state"; if the port in LR3 state test is not performed, the PORT_TEST port enters the "port in LR3 enabled state"; if the five tests of signal loss, synchronization loss, port in LR1 state, port in LR2 state, and port in LR3 state are all completed, the PORT_TEST port returns to the "test selection state" and sets the link failure timeout test completion flag to valid.

[0099] To perform a "signal loss test":Control the PORT_TEST of the test equipment to stop sending signals, and the duration is longer than the R_T_TOV limit value. If the N / F_Port port can detect the link fault timeout error and send the NOS primitive, the PORT_TEST port enters the "link fault protocol test state under link fault timeout state" and reports that the signal loss link fault timeout is enabled correctly; otherwise, the PORT_TEST port returns to the "test enable state", reports the signal loss test error, and sets the signal loss test completion flag to valid.

[0100] To perform a "loss of sync test": The PORT_TEST of the control test equipment changes the port rate and maintains this state for a duration greater than the R_T_TOV limit value. If the N / F_Port port can detect the link fault timeout error and send the NOS primitive, the PORT_TEST port enters the "link fault protocol test state under link fault timeout state" and reports that the synchronization loss link fault timeout is enabled correctly; otherwise, the PORT_TEST port returns to the "test enable state", reports the synchronization loss test error, and sets the synchronization loss test completion flag to valid.

[0101] To enable the port in LR1: Control the N / F_Port port of DUT to send N Class 3 data frames to the PORT_TEST port of the test equipment according to the maximum credit value N. After receiving N Class 3 data frames, PORT_TEST does not return the R_RDY primitive within the E_D_TOV time. If it is detected that the N / F_Port port of DUT can detect the link timeout error and send the LR primitive, the PORT_TEST port enters the "port in LR1 test state" and reports that the port is in LR1 enable correctly; otherwise, the PORT_TEST port returns to the "test enable state", reports that the port is in LR1 enable error, and sets the port in LR1 state test completion flag to valid.

[0102] To perform the "Port in LR1 test": Control the N / F_Port port of DUT to send LR primitive, and control the duration of keeping this state to be greater than the R_T_TOV limit value. During this period, the test equipment PORT_TEST port does not send any primitive signal. If the N / F_Port port can detect the port in LR1 state timeout error and send the NOS primitive, the PORT_TEST port enters the "link fault protocol test state under link fault timeout state" and reports that the port is in LR1 state timeout enable is correct; otherwise, the PORT_TEST port returns to the "test enable state", reports the port is in LR1 state test error, and sets the port in LR1 state test completion flag to valid.

[0103] To enable the port in LR2:The N / F_Port port of the DUT sends N Class 3 data frames to the PORT_TEST port of the test equipment according to the maximum credit value N. After receiving N Class 3 data frames, PORT_TEST does not return the R_RDY primitive within the E_D_TOV time. PORT_TEST sends the LR primitive after receiving the LR primitive sent by N_Port. If the LRR primitive sent by N_Port is detected, the PORT_TEST port enters the "port is in LR2 test state" and reports that the port is in LR2 enable correctly; otherwise, the PORT_TEST port returns to the "test enable state", reports that the port is in LR2 enable error, and sets the port in LR2 state test completion flag to valid.

[0104] To perform the "Port in LR2 test": The N / F_Port port of DUT sends the LRR primitive and controls the duration of maintaining this state to be greater than the R_T_TOV limit value. During this period, the test equipment PORT_TEST port does not send any primitive signal. If the N / F_Port port can detect the port in the LR2 state timeout error and send the NOS primitive, the PORT_TEST port enters the "link fault protocol test state under the link fault timeout state" and reports that the port is in the LR2 state timeout enable is correct; otherwise, the PORT_TEST port returns to the "test enable state", reports the port is in the LR2 state test error, and sets the port in the LR2 state test completion flag to valid.

[0105] To perform "Port is in LR3 enabled state": The N / F_Port port of the DUT sends N Class 3 data frames to the PORT_TEST port of the test equipment according to the maximum credit value N. After receiving N Class 3 data frames, PORT_TEST does not return the R_RDY primitive within the E_D_TOV time. PORT_TEST sends the LRR primitive after receiving the LR primitive sent by N_Port. If the IDLE primitive sent by N_Port is detected, the PORT_TEST port enters the "port in LR3 test state" and reports that the port is in LR3 enable correctly; otherwise, the PORT_TEST port returns to the "test enable state", reports that the port is in LR3 enable error, and sets the port in LR3 state test completion flag to valid.

[0106] To perform the "Port in LR3 test":The N / F_Port port of DUT sends the IDLE primitive and controls the duration of maintaining this state to be greater than the R_T_TOV limit value. During this period, the test equipment PORT_TEST port does not send any primitive signal. If the N / F_Port port can detect the port in LR3 state timeout error and send the NOS primitive, the PORT_TEST port enters the "link fault protocol test state under link fault timeout state" and reports that the port is in LR3 state timeout enable is correct; otherwise, the PORT_TEST port returns to the "test enable state", reports the port is in LR3 state test error, and sets the port in LR3 state test completion flag to valid.

[0107] To perform a "Link Fault Protocol Test under Link Fault Timeout Status": The N / F_Port port of the DUT keeps sending the NOS primitive, and the PORT_TEST port of the test equipment sends the OLS primitive. After the N / F_Port port returns the LR primitive, the PORT_TEST port sends the LRR primitive. If the N / F_Port port sends the IDLE primitive after receiving the LRR primitive, the PORT_TEST port returns to the "link fault timeout test selection state", and the link fault protocol is executed correctly in the link fault timeout state; otherwise, the PORT_TEST port returns to the "test enable state", and the link fault protocol is executed correctly in the link fault timeout state, and the link fault timeout test completion flag is set to valid.

[0108] "Testing Completed": Determine the link timeout and link fault timeout test completion flags and the related state test completion flags under link timeout and link fault timeout conditions, and output the corresponding test results. If a start test signal is received, the related test completion flag is set to invalid, and the PORT_TEST port returns to the "test enable state"; otherwise, the state machine remains in the "test completion state".

[0109] The automatic testing method for optical fiber channel timeout fault identification and processing correctness designed by the present invention has the following advantages:

[0110] 1. Automatically detect the correctness of fiber channel timeout fault identification and processing;

[0111] 2. The core function of the Fibre Channel port fault test is applicable to the test of the execution of the FC port link timeout fault of various types of equipment;

[0112] 3. The state machine control is clear and easy to implement in hardware logic;

[0113] 4. Standard logic design, can be applied to various FC port test equipment.

[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

[0115] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

Claims

1. An automatic testing method for optical fiber channel timeout fault identification and processing correctness, characterized in that: Connecting the test port PORT_TEST to the tested port N / F_Port, so that the test port PORT_TEST and the tested port N / F_Port interact and control data frames and primitives, using a link timeout scenario established between the test port PORT_TEST and the tested port N / F_Port to automatically test the correctness of the execution of the Fibre Channel link reset protocol; and / or using a link failure timeout scenario established between the test port PORT_TEST and the tested port N / F_Port to automatically test the correctness of the execution of the Fibre Channel link failure protocol; The method for automatically testing the correctness of the execution of the Fibre Channel Link Reset Protocol using the established link timeout scenario comprises the following steps: S1, the test port PORT_TEST is initialized when it is powered on or reset; S2. After initialization is completed, an enable test is performed on the link timeout, and the enable test result is output; S21, when the link timeout enable test is normal, enter the corresponding link reset protocol test and output the reset protocol test result; S211, if the link reset protocol test is normal, the link timeout test completion flag is set to valid; S212: If the link reset protocol test fails, a link timeout test error signal is output; S22, if the link timeout enable test error occurs, a link timeout test error signal is output; S3. Outputting the execution result of the Fibre Channel link reset protocol according to the link timeout test result.

2. The automatic testing method for optical fiber channel timeout fault identification and processing correctness according to claim 1 is characterized in that: In step S2, the link timeout enabling test method is: controlling the tested port N / F_Port to send N Class 3 data frames to the test port PORT_TEST according to the maximum credit value N, and after PORT_TEST receives the N Class 3 data frames, it does not return the R_RDY primitive within the E_D_TOV time; If the detected port N / F_Port detects a link timeout error and sends an LR primitive, the link timeout is enabled correctly; Otherwise, a link timeout enable error occurs and a link timeout test error signal is reported.

3. The automatic testing method for optical fiber channel timeout fault identification and processing correctness according to claim 1, characterized in that: In step S21, the link reset protocol test method is: The tested port N / F_Port sends the LR primitive, and controls the test port PORT_TEST to send the LRR primitive. If the N / F_Port sends the IDLE primitive, the link timeout test normal signal is reported, and the link timeout test completion flag is set to valid; Otherwise, a link reset protocol test abnormal signal is reported, and the link timeout test completion flag is set to valid.

4. The automatic testing method for optical fiber channel timeout fault identification and processing correctness according to claim 1, characterized in that: The method for automatically testing the correctness of the execution of the fiber channel link failure protocol using the established link failure timeout scenario comprises the following steps: Step 1: Initialize the test port PORT_TEST when it is powered on or reset; Step 2: After the initialization is completed, enter the link fault timeout test selection state, perform an enable test and a link fault protocol test on the link fault timeout, and output the link fault timeout test result. The link fault timeout includes five states: signal loss state, synchronization loss state, port in LR send enable state, port in LR receive enable state, and port in LRR receive enable state; Step 3: Output the Fibre Channel link failure protocol execution result according to the link failure timeout test result.

5. The automatic testing method for optical fiber channel timeout fault identification and processing correctness according to claim 4 is characterized in that: The link failure timeout enable test and link failure protocol test include: Step 21: Perform enable tests on the five states respectively; Step 211: If the enable tests of the port being in the LR send enable state, the port being in the LR receive enable state, and the port being in the LRR receive enable state are all normal, then a link fault timeout enable correct signal is output and a link fault protocol test is performed; Step 2111: If the link fault protocol test is normal, output a link fault protocol execution correct signal; Step 2112: If the link failure protocol test fails, a link failure protocol execution error signal is output; Step 212: If an enable test error occurs in one of the following: the port is in the LR send enable state, the port is in the LR receive enable state, or the port is in the LRR receive enable state, then a link fault timeout enable error signal of the corresponding state is output; Step 22: If there is an error in the enable test under the five states, a link fault timeout enable error signal is output.

6. The automatic testing method for optical fiber channel timeout fault identification and processing correctness according to claim 5, characterized in that: The method of link fault protocol testing in the link fault timeout state in step 211 is: The N / F_Port port keeps sending NOS primitives, and the PORT_TEST port of the test equipment sends OLS primitives. After the N / F_Port port returns the LR primitive, the PORT_TEST port sends the LRR primitive. If the N / F_Port port sends the IDLE primitive after receiving the LRR primitive, the link fault protocol execution correct signal under the link fault timeout state is reported; otherwise, the link fault protocol execution error correct signal under the link fault timeout state is reported, and the link fault timeout test completion flag is set to valid.

7. The automatic testing method for optical fiber channel timeout fault identification and processing correctness according to claim 1, characterized in that: The method for automatically testing the correctness of the execution of the Fibre Channel link reset protocol using the established link timeout scenario and the method for automatically testing the correctness of the execution of the Fibre Channel link failure protocol using the link failure timeout scenario established between the test port PORT_TEST and the tested port N / F_Port comprises the following steps: Step 1: Initialize the test port PORT_TEST when it is powered on or reset; Step 2: After initialization is completed, the test port PORT_TEST enters the test selection state and tests the link timeout and link failure timeout respectively; Step 21: Perform an enable test and a Fibre Channel link reset protocol test on a link timeout, and output a link timeout test result; Step 22: Perform an enable test and a fiber channel link fault protocol test on the link fault timeout, and output the link fault timeout test result; Step 3: Based on the link timeout test result and the link fault timeout test result, output the fiber channel timeout fault identification and processing correctness result.