Link initialization operation test method in offline state of network communication port

By designing the link initialization operation test method for offline network communication ports, we automatically detect the correctness of the link initialization protocol execution of the fiber network communication port, and solve the problem of the link initialization protocol execution when the fiber network communication port is converted to the online state. The incorrect problem realizes accurate status detection of network communication ports and correctness verification of link initialization.

CN115833930BActive Publication Date: 2025-01-03XIAN AVIATION COMPUTING TECH RES INST OF AVIATION IND CORP OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When the fiber optic network communication port is converted to the online state, the link initialization protocol is incorrectly executed, resulting in the link being unable to reach the effective state. A method is needed to automatically detect the correctness of the offline state machine of the network communication port.

Method used

Design a test method for link initialization operation in offline state of network communication port. By connecting the network communication port of the device to be tested with the test port of the detection device, performing offline protocols, and determining the network communication port from offline to online state The correctness of link initialization execution, including state and primitive testing steps, ensures the correct execution of the state machine.

Benefits of technology

It realizes automated detection of the link initialization protocol of network communication ports to ensure its execution accuracy. It is suitable for offline state testing of various types of network communication ports, is easy to implement hardware logic, and can automatically detect the correctness of offline state machines of network communication ports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115833930B_ABST
    Figure CN115833930B_ABST
Patent Text Reader

Abstract

The present invention provides a link initialization operation test method under the offline state of a network communication port, based on the link initialization operation correctness test when the network communication port is in the offline state, the link initialization operation test method is based on connecting the network communication port of the device to be tested with the test port of the detection device, using the network communication port to execute the offline protocol, and using the test port to judge the correctness of the link initialization execution of the offline state detection of the network communication port, and the test method includes executing the test of multiple states of the network communication port and the test of multiple primitives in each state. The above method can accurately execute the judgment of the link initialization protocol.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to computer communication technology, and in particular to a link initialization operation test method in an offline state of a network communication port. Background Art

[0002] The fiber optic network communication port provides high-speed interconnection communication support for various subsystems in the new generation of aircraft. When the network communication port is abnormal and enters the offline state, the link initialization protocol will be executed when it is converted from the offline state to the online state. The link initialization protocol starts from entering the OL1 (OLS sending state) state. When the offline state machine of the network communication port is executed incorrectly, the link will not be able to reach a valid state. Therefore, it is necessary to design a method to automatically detect the correctness of the execution of the offline state machine of the network communication port to ensure the correctness of the implementation and execution of the link initialization protocol of the network communication port. Summary of the invention

[0003] The purpose of the present invention is to design a link initialization operation test method for a network communication port in an offline state, which can determine whether the offline state machine of the network communication port can accurately execute the link initialization protocol when the network communication port is restored from an offline state to an online state.

[0004] The technical solution to achieve the purpose of the invention is as follows: a link initialization operation test method when a network communication port is in an offline state, based on testing the correctness of the link initialization operation when the network communication port is in an offline state, the link initialization operation test method is based on connecting the network communication port of the device to be tested with the test port of the detection device, executing the offline protocol with the network communication port, and using the test port to judge the correctness of the link initialization execution in the process from the offline state to the online state of the network communication port.

[0005] The test method includes the following steps:

[0006] Step 1: The test port enters the test selection state from the initial state to determine whether the three states of OL1 (OLS sending state), OL2 (OLS receiving state), and OL3 (OLS waiting state) of the network communication port have completed the test;

[0007] Step 2: If any state has not completed the test, enter the enable state corresponding to the state where the test has not been completed and perform the enable test;

[0008] Step 3: If the enable test of this state is normal, then enter the primitive test selection state of this state and perform tests on multiple primitives; if the enable test of this state is wrong, then the test port enters the initial state from the enable state;

[0009] Step 4: If any primitive has not completed the test, enter the primitive test state of the primitive, perform the primitive test, and output the primitive test result;

[0010] Step 5: When all primitives in this state have been tested, the test port enters the test selection state from the test state and outputs the test result of this state;

[0011] Step 6, repeat step 2 to step 5 until the three states of the network communication port are tested, the test port enters the test completion state from the test selection state, and the state test result is output;

[0012] Step 7: Test completion state: Output the test results according to the state test results and the primitive test results of each state, and complete the link initialization operation test.

[0013] In one embodiment, in the above step 1, before the test port enters the test selection state from the initial state, an initial state judgment is first performed;

[0014] If the initial state is judged to be passed, the test selection state is entered from the initial state;

[0015] If the initial state judgment fails, it stays in the initial state until it passes the judgment and then enters the test selection state.

[0016] In one embodiment, in the above step 2, the method for enabling testing of the OLS sending status includes:

[0017] The network communication port is powered on again, and the test port detects the received OLS primitive signal (offline primitive sequence signal), and records the duration of the OLS primitive signal;

[0018] If the duration of the OLS primitive signal is greater than 5ms, the test port enters the primitive test selection state from the enable state.

[0019] In one embodiment, in the above step 2, the method for enabling testing of the OLS receiving state includes:

[0020] The test port sends OLS primitives;

[0021] If the LR primitive (link reset primitive sequence) sent by the network communication port is detected, the test port enters the primitive test selection state; otherwise, the test port returns to the initial state and reports an OLS receive state enable error.

[0022] In one embodiment, in the above step 2, the method for enabling the test of the OLS waiting state includes:

[0023] The test port sends OLS primitives;

[0024] When the LR primitive sent by the network communication port is detected, the test port stops sending the OLS primitive;

[0025] If a NOS primitive (non-operable primitive sequence) sent by the network communication port is detected, the test port enters the primitive test selection state; otherwise, the test port returns to the initial state and reports an OLS wait state enable error.

[0026] In one embodiment, the primitive test of the OLS sending state includes four types: LR, LRR (link reset response primitive sequence), OLS, and IDLE (link valid).

[0027] In one embodiment, the primitive test of the OLS receiving state includes four types: IDLE, NOS, signal loss, and out-of-synchronization time greater than a limit value.

[0028] In one embodiment, the primitive tests of the OLS waiting state include six types: LR, LRR, IDLE, NOS, signal loss, and out-of-synchronization time greater than a limit value.

[0029] Compared with the prior art, the beneficial effects of the present invention are: the link initialization operation test method of the network communication port in the offline state designed by the present invention is a core function of the primitive sequence protocol detection, which is suitable for testing the offline execution status of various types of network communication ports; and the state machine has clear control over the offline execution detection and is easy to implement in hardware logic, and it can automatically detect the correctness of the execution of the offline state machine of the network communication port. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] 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.

[0031] Figure 1 This is a diagram of the link initialization operation test phase when the network communication port is in an offline state in a specific implementation manner. DETAILED DESCRIPTION

[0032] 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.

[0033] This specific embodiment discloses a link initialization operation test method when a network communication port is in an offline state, and the link initialization operation correctness is tested based on the offline state of the network communication port. The link initialization operation test method is based on connecting the network communication port of the device to be tested with the test port of the detection device, executing the offline protocol with the network communication port, and using the test port to judge the correctness of the link initialization execution in the process from the offline state to the online state of the network communication port.

[0034] The test method includes the following steps:

[0035] Step 1: The test port enters the test selection state from the initial state to determine whether the OLS sending state, OLS receiving state, and OLS waiting state of the network communication port have completed the test;

[0036] Step 2: If any state has not completed the test, enter the enable state corresponding to the state where the test has not been completed and perform the enable test;

[0037] Step 3: If the enable test of this state is normal, then enter the primitive test selection state of this state and perform tests on multiple primitives; if the enable test of this state is wrong, then the test port enters the initial state from the enable state;

[0038] Step 4: If any primitive has not completed the test, enter the primitive test state of the primitive, perform the primitive test, and output the primitive test result;

[0039] Step 5: When all primitives in this state have been tested, the test port enters the test selection state from the test state and outputs the test result of this state;

[0040] Step 6, repeat step 2 to step 5 until the three states of the network communication port are tested, the test port enters the test completion state from the test selection state, and the state test result is output;

[0041] Step 7: Test completion state: Output the test results according to the state test results and the primitive test results of each state, and complete the link initialization operation test.

[0042] In one embodiment, in the above step 1, before the test port enters the test selection state from the initial state, an initial state judgment is first performed;

[0043] If the initial state is judged to be passed, the test selection state is entered from the initial state;

[0044] If the initial state judgment fails, it stays in the initial state until it passes the judgment and then enters the test selection state.

[0045] In one embodiment, in the above step 2, the method for enabling testing of the OLS sending status includes:

[0046] The network communication port is powered on again, the test port detects the received OLS primitive signal, and records the duration of the OLS primitive signal;

[0047] If the duration of the OLS primitive signal is greater than 5ms, the test port enters the primitive test selection state from the enable state.

[0048] In one embodiment, in the above step 2, the method for enabling testing of the OLS receiving state includes:

[0049] The test port sends OLS primitives;

[0050] If the LR primitive sent by the network communication port is detected, the test port enters the primitive test selection state; otherwise, the test port returns to the initial state and reports an OLS receiving state enable error.

[0051] In one embodiment, in the above step 2, the method for enabling the test of the OLS waiting state includes:

[0052] The test port sends OLS primitives;

[0053] When the LR primitive sent by the network communication port is detected, the test port stops sending the OLS primitive;

[0054] If the NOS primitive sent by the network communication port is detected, the test port enters the primitive test selection state; otherwise, the test port returns to the initial state and reports an OLS wait state enable error.

[0055] In one embodiment, the primitive test of the OLS sending state includes four types: LR, LRR, OLS, and IDLE.

[0056] In one embodiment, the primitive test of the OLS receiving state includes four types: IDLE, NOS, signal loss, and out-of-synchronization time greater than a limit value.

[0057] In one embodiment, the primitive tests of the OLS waiting state include six types: LR, LRR, IDLE, NOS, signal loss, and out-of-synchronization time greater than a limit value.

[0058] The following uses a specific example to determine the correctness of the link initialization protocol when the network communication port is converted from an offline state to an online state. The network communication port offline state machine test model is defined as follows: the FC port Port_A of the device under test (DUT) is connected to the FC test port Port_B of the test device, and the Port_A port executes the network communication port offline protocol, and the Port_B port implements the network communication port offline detection process. The FC test port of the test device interacts and controls with the FC port of the DUT through primitives, and performs automated test operations according to the network communication port offline detection process.

[0059] Offline testing process Figure 1 As shown, the specific tests are as follows:

[0060] 1. Phase 0: This phase enters the initial state of the test equipment Port_B. When the power is initially turned on or reset, Port_B enters this state. In this state, the FC test port Port_B of the test equipment and the FC port Port_A of the DUT perform synchronous operations. If the Active state is reached, Port_B enters Phase 1; otherwise, it stays in Phase 0.

[0061] 2. Phase 1: This phase enters the test selection state. In this state, the test completion flags corresponding to the OL1, OL2, and OL3 states are determined, and the tests in the three states are carried out in sequence; if the OL1 state test is not performed, Port_B enters phase 2; if the OL2 state test is not performed, Port_B enters phase 4; if the OL3 state test is not performed, Port_B enters phase 6; if the OL1, OL2, and OL3 state tests are all completed, Port_B enters phase 8.

[0062] 3. Phase 2: This phase enters the OL1 enable state. In this phase, the Port_A port of the DUT is powered on again, and the received primitive signal is detected at the Port_B port of the test equipment and the duration of the primitive signal is recorded. If the Port_B port detects the OLS primitive and the duration is not less than 5ms, the Port_B port enters Phase 3; otherwise, the Port_B port returns to state 0, reports an OL1 enable error, and sets the OL1 test completion flag to valid.

[0063] 4. Phase 3: This phase enters the OL1 test state. In this state, Port_A of the DUT keeps sending the OLS primitive. Determine the test completion flags corresponding to the LR, LRR, OLS, and IDLE primitive tests, and carry out the tests in the four states in turn; if the LR primitive test is not performed, Port_B enters phase 3.1; if the LRR primitive test is not performed, Port_B enters phase 3.2; if the OLS primitive test is not performed, Port_B enters phase 3.3; if the IDLE primitive test is not performed, Port_B enters phase 3.4; if the LR, LRR, OLS, and IDLE primitive tests are all completed, Port_B returns to phase 1 and sets the OL1 test completion flag to valid.

[0064] a) Phase 3.1: This phase enters the LR primitive received test state in the OL1 state. In this state, Port_B sends the LR primitive. If it detects that the DUT's Port_A port sends the LRR primitive, Port_B returns to Phase 3, reports that the LR primitive received test in the OL1 state is normal, and sets the LR primitive test completion flag in the OL1 state to be valid; otherwise, Port_B returns to Phase 2, reports that the LR primitive received test in the OL1 state is abnormal, and sets the LR primitive received test completion flag in the OL1 state to be valid.

[0065] b) Phase 3.2: This phase enters the state of receiving the LRR primitive test in the OL1 state. In this state, Port_B sends the LRR primitive. If it detects that the DUT's Port_A port sends the OLS primitive, Port_B returns to Phase 3, reports that the test of receiving the LRR primitive in the OL1 state is normal, and sets the LRR primitive test completion flag in the OL1 state to be valid; otherwise, Port_B returns to Phase 2, reports that the test of receiving the LRR primitive in the OL1 state is abnormal, and sets the LRR primitive test completion flag in the OL1 state to be valid.

[0066] c) Phase 3.3: This phase enters the OLS primitive test state received in the OL1 state. In this state, Port_B sends the OLS primitive. If it detects that the DUT's Port_A port sends the LR primitive, Port_B returns to Phase 3, reports that the OLS primitive test received in the OL1 state is normal, and sets the OLS primitive test completion flag in the OL1 state to be valid; otherwise, Port_B returns to Phase 2, reports that the OLS primitive test received in the OL1 state is abnormal, and sets the OLS primitive test completion flag in the OL1 state to be valid.

[0067] d) Phase 3.4: This phase enters the IDLE primitive test state received in the OL1 state. In this state, Port_B sends the IDLE primitive. If it detects that the DUT's Port_A port sends the OLS primitive, Port_B returns to Phase 3, reports that the IDLE primitive test received in the OL1 state is normal, and sets the IDLE primitive test completion flag in the OL1 state to be valid; otherwise, Port_B returns to Phase 2, reports that the IDLE primitive test received in the OL1 state is abnormal, and sets the IDLE primitive test completion flag in the OL1 state to be valid.

[0068] 5. Phase 4: This phase enters the OL2 enable state. In this state, the Port_B port of the control test equipment sends the OLS primitive. If the LR primitive sent by Port_A is detected, the Port_B port enters phase 5; otherwise, the Port_B port returns to phase 0, reports the OL2 enable error, and sets the OL2 test completion flag to valid.

[0069] 6. Phase 5: This phase enters the OL2 test state. In this state, Port_A of the DUT keeps sending LR primitives. Determine the test completion flags corresponding to the four tests of IDLE, NOS, signal loss, and desynchronization time greater than the limit value, and carry out the tests in the four states in turn; if the IDLE primitive test is not performed, Port_B enters phase 5.1; if the NOS primitive test is not performed, Port_B enters phase 5.2; if the signal loss test is not performed, Port_B enters phase 5.3; if the desynchronization time greater than the limit value test is not performed, Port_B enters phase 5.4; if the four tests of IDLE, NOS, signal loss, and desynchronization time greater than the limit value are completed, Port_B returns to phase 1 and sets the OL2 test completion flag to valid.

[0070] a) Phase 5.1: This phase enters the IDLE primitive test state in the OL2 state. In this state, Port_B sends the IDLE primitive. If it detects that the Port_A port of the DUT is still sending LR within the R_T_TOV time, and waits for R_T_TOV to time out before sending NOS, then Port_B returns to Phase 5, reports that the IDLE primitive test in the OL2 state is normal, and sets the IDLE primitive test completion flag in the OL2 state to valid; otherwise, Port_B returns to Phase 4, reports that the IDLE primitive test in the OL2 state is abnormal, and sets the IDLE primitive test completion flag in the OL2 state to valid.

[0071] b) Phase 5.2: This phase enters the NOS primitive test state received in the OL2 state. In this state, Port_B sends the NOS primitive. If it detects that the DUT's Port_A port sends the OLS primitive, Port_B returns to Phase 5, reports that the NOS primitive test received in the OL2 state is normal, and sets the NOS primitive test completion flag in the OL2 state to be valid; otherwise, Port_B returns to Phase 4, reports that the NOS primitive test received in the OL2 state is abnormal, and sets the NOS primitive test completion flag in the OL2 state to be valid.

[0072] c) Phase 5.3: This phase enters the signal loss test state detected in the OL2 state. In this state, Port_B stops sending signals. If it is detected that the DUT's Port_A port sends the NOS primitive, Port_B returns to Phase 5, reports that the signal loss test detected in the OL2 state is normal, and sets the signal loss test completion flag in the OL2 state to valid; otherwise, Port_B returns to Phase 4, reports that the signal loss test detected in the OL2 state is abnormal, and sets the signal loss test completion flag in the OL2 state to valid.

[0073] d) Phase 5.4: This phase enters the test state of detecting the desynchronization time greater than the limit value in the OL2 state. In this state, Port_B changes the port rate and maintains this state for a duration greater than the limit value. If it is detected that the Port_A port of the DUT sends the NOS primitive, the Port_B port returns to Phase 5, reports that the test of detecting the desynchronization time greater than the limit value in the OL2 state is normal, and sets the test completion flag of detecting the desynchronization time greater than the limit value in the OL2 state to valid; otherwise, the Port_B port returns to Phase 4, reports that the test of detecting the desynchronization time greater than the limit value in the OL2 state is abnormal, and sets the test completion flag of detecting the desynchronization time greater than the limit value in the OL2 state to valid.

[0074] 7. Phase 6: This phase enters the OL3 enabled state. In this state, the Port_B port of the control test equipment sends the OLS primitive. After detecting the LR primitive sent by the Port_A port of the DUT, the Port_B port stops sending signals. If the NOS primitive sent by Port_A is detected, the Port_B port enters phase 7; otherwise, the Port_B port returns to phase 0, reports the OL3 enable error, and sets the OL3 test completion flag to valid.

[0075] 8. Phase 7: This phase enters the OL3 test state. In this state, Port_A of the DUT keeps sending the NOS primitive. Determine the test completion flags corresponding to the six tests of LR, LRR, IDLE, NOS, signal loss, and loss of synchronization time greater than the limit value, and carry out the tests in the six states in turn; if the LR primitive test is not performed, Port_B enters phase 7.1; if the LRR primitive test is not performed, Port_B enters phase 7.2; if the IDLE primitive test is not performed, Port_B enters phase 7.3; if the NOS primitive test is not performed, Port_B enters phase 7.4; if the signal loss test is not performed, Port_B enters phase 7.5; if the loss of synchronization time greater than the limit value test is not performed, Port_B enters phase 7.6; if the six tests of LR, LRR, IDLE, NOS, signal loss, and loss of synchronization time greater than the limit value are all completed, Port_B returns to phase 1 and sets the OL3 test completion flag to valid.

[0076] a) Phase 7.1: This phase enters the LR primitive test state in the OL3 state. In this state, Port_B sends the LR primitive. If it detects that the DUT's Port_A port sends the NOS primitive, Port_B returns to Phase 3.4, reports that the LR primitive test in the OL3 state is normal, and sets the LR primitive test completion flag in the OL3 state to be valid; otherwise, Port_B returns to Phase 3.3, reports that the LR primitive test in the OL3 state is abnormal, and sets the LR primitive test completion flag in the OL3 state to be valid.

[0077] b) Phase 7.2: This phase enters the LRR primitive test state in the OL3 state. In this state, Port_B sends the LRR primitive. If it detects that the DUT's Port_A port sends the NOS primitive, Port_B returns to Phase 3.4, reports that the LRR primitive test in the OL3 state is normal, and sets the LRR primitive test completion flag in the OL3 state to valid; otherwise, Port_B returns to Phase 3.3, reports that the LRR primitive test in the OL3 state is abnormal, and sets the LRR primitive test completion flag in the OL3 state to valid.

[0078] c) Phase 7.3: This phase enters the IDLE primitive test state in the OL3 state. In this state, Port_B sends the IDLE primitive. If it detects that the DUT's Port_A port sends the NOS primitive, Port_B returns to Phase 3.4, reports that the IDLE primitive test in the OL3 state is normal, and sets the IDLE primitive test completion flag in the OL3 state to be valid; otherwise, Port_B returns to Phase 3.3, reports that the IDLE primitive test in the OL3 state is abnormal, and sets the IDLE primitive test completion flag in the OL3 state to be valid.

[0079] d) Stage 7.4: This stage enters the NOS primitive test state received in the OL3 state. In this state, Port_B sends the NOS primitive. If it detects that the DUT's Port_A port sends the OLS primitive, Port_B returns to stage 3.4, reports that the NOS primitive test received in the OL3 state is normal, and sets the NOS primitive test completion flag in the OL3 state to be valid; otherwise, Port_B returns to stage 3.3, reports that the NOS primitive test received in the OL3 state is abnormal, and sets the NOS primitive test completion flag in the OL3 state to be valid.

[0080] e) Stage 7.5: This stage enters the signal loss test state under OL3 state. In this state, Port_B stops sending signals. If it is detected that Port_A of DUT keeps sending NOS primitives, Port_B returns to stage 3.4, reports that the signal loss test under OL3 state is normal, and sets the signal loss test completion flag under OL3 state to valid; otherwise, Port_B returns to stage 3.3, reports that the signal loss test under OL3 state is abnormal, and sets the signal loss test completion flag under OL3 state to valid.

[0081] f) Stage 7.6: This stage enters the test state of detecting the desynchronization time greater than the limit value in the OL3 state. In this state, Port_B changes the port rate and maintains this state for a duration greater than the limit value. If it is detected that the Port_A port of the DUT has been sending NOS primitives, the Port_B port returns to stage 3.4, reports that the test of detecting the desynchronization time greater than the limit value in the OL3 state is normal, and sets the test completion flag of detecting the desynchronization time greater than the limit value in the OL3 state to valid; otherwise, the Port_B port returns to stage 3.3, reports that the test of detecting the desynchronization time greater than the limit value in the OL3 state is abnormal, and sets the test completion flag of detecting the desynchronization time greater than the limit value in the OL3 state to valid.

[0082] 9. Phase 8: This phase enters the test completion state. In this state, the OL1, OL2, OL3 test completion flags and the related primitive test completion flags received in the OL1, OL2, OL3 states are judged, and the related test results are output. If the start test signal is received, the related test completion flag is set to invalid, and Port_B returns to phase 0; otherwise, Port_B stays in phase 8.

[0083] The link initialization operation test method under the offline state of the above-mentioned network communication port, whose core function of primitive sequence protocol detection is suitable for testing the offline execution status of various types of network communication ports; and the state machine has clear control over the offline execution detection and is easy to implement in hardware logic, which can automatically detect the correctness of the execution of the offline state machine of the network communication port.

[0084] 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.

[0085] 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. A link initialization operation test method in an offline state of a network communication port, characterized in that: The correctness of link initialization operation is tested based on the offline state of the network communication port. The test method includes the following steps: Step 1: The test port enters the test selection state from the initial state to determine whether the OLS sending state, OLS receiving state, and OLS waiting state of the network communication port have completed the test; Step 2: If any state has not completed the test, enter the enable state corresponding to the state where the test has not been completed and perform the enable test; Step 3: If the enable test of this state is normal, then enter the primitive test selection state of this state and perform tests on multiple primitives; if the enable test of this state is wrong, then the test port enters the initial state from the enable state; Step 4: If any primitive has not completed the test, enter the primitive test state of the primitive, perform the primitive test, and output the primitive test result; Step 5: When all primitives in this state have been tested, the test port enters the test selection state from the test state and outputs the test result of this state; Step 6, repeat step 2 to step 5 until the three states of the network communication port are tested, the test port enters the test completion state from the test selection state, and the state test result is output; Step 7: Test completion state: Output the test results according to the state test results and the primitive test results of each state, and complete the link initialization operation test.

2. The link initialization operation test method in the offline state of the network communication port according to claim 1, characterized in that: In step 1, before the test port enters the test selection state from the initial state, the initial state judgment is first performed; If the initial state is judged to be passed, the test selection state is entered from the initial state; If the initial state judgment fails, it stays in the initial state until it passes the judgment and then enters the test selection state.

3. The link initialization operation test method in the offline state of the network communication port according to claim 1, characterized in that: In step 2, the method for enabling the test of the OLS sending status includes: The network communication port is powered on again, the test port detects the received OLS primitive signal, and records the duration of the OLS primitive signal; If the duration of the OLS primitive signal is greater than 5ms, the test port enters the primitive test selection state from the enable state.

4. The link initialization operation test method in the offline state of the network communication port according to claim 1, characterized in that: In step 2, the method for enabling testing of the OLS receiving state includes: The test port sends OLS primitives; If the LR primitive sent by the network communication port is detected, the test port enters the primitive test selection state; otherwise, the test port returns to the initial state and reports an OLS receiving state enabling error.

5. The link initialization operation test method in the offline state of the network communication port according to claim 1, characterized in that: In step 2, the OLS wait state enabling test method includes: The test port sends OLS primitives; When the LR primitive sent by the network communication port is detected, the test port stops sending the OLS primitive; If the NOS primitive sent by the network communication port is detected, the test port enters the primitive test selection state; otherwise, the test port returns to the initial state and reports an OLS wait state enable error.

6. The link initialization operation test method in the offline state of the network communication port according to claim 1, characterized in that: The primitive tests of OLS sending status include LR, LRR, OLS, and IDLE.

7. The link initialization operation test method in the offline state of the network communication port according to claim 1, characterized in that: The primitive tests of OLS receiving status include IDLE, NOS, signal loss, and out-of-synchronization time greater than the limit value.

8. The link initialization operation test method in the offline state of the network communication port according to claim 1, characterized in that: The primitive tests of OLS waiting state include LR, LRR, IDLE, NOS, signal loss, and out-of-synchronization time greater than the limit value.